diff --git a/boot.php b/boot.php
index b689b73ee..afee3ac77 100644
--- a/boot.php
+++ b/boot.php
@@ -19,7 +19,7 @@
require_once(__DIR__ . DIRECTORY_SEPARATOR. 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
-use \Friendica\Core\Config;
+use Friendica\Core\Config;
require_once('include/config.php');
require_once('include/network.php');
diff --git a/include/Probe.php b/include/Probe.php
index f67a821f9..653e90b53 100644
--- a/include/Probe.php
+++ b/include/Probe.php
@@ -5,8 +5,8 @@
*
*/
-use \Friendica\Core\Config;
-use \Friendica\Core\PConfig;
+use Friendica\Core\Config;
+use Friendica\Core\PConfig;
require_once("include/feed.php");
require_once('include/email.php');
diff --git a/include/api.php b/include/api.php
index 97c09c20a..2e0409cb7 100644
--- a/include/api.php
+++ b/include/api.php
@@ -6,7 +6,7 @@
* @todo Automatically detect if incoming data is HTML or BBCode
*/
-use \Friendica\Core\Config;
+use Friendica\Core\Config;
require_once 'include/HTTPExceptions.php';
require_once 'include/bbcode.php';
diff --git a/include/auth.php b/include/auth.php
index c1a6120db..76662d666 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -1,6 +1,6 @@
gen_token();
$sec = $this->gen_token();
-
+
if ($consumer->key){
$k = $consumer->key;
} else {
$k = $consumer;
}
-
+
$r = q("INSERT INTO tokens (id, secret, client_id, scope, expires) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP()+%d)",
dbesc($key),
dbesc($sec),
@@ -80,19 +80,19 @@ class FKOAuthDataStore extends OAuthDataStore {
function new_access_token($token, $consumer, $verifier = null) {
logger(__function__.":".$token.", ". $consumer.", ". $verifier);
-
+
// return a new access token attached to this consumer
// for the user associated with this token if the request token
// is authorized
// should also invalidate the request token
-
+
$ret=Null;
-
+
// get user for this verifier
$uverifier = get_config("oauth", $verifier);
logger(__function__.":".$verifier.",".$uverifier);
if (is_null($verifier) || ($uverifier!==false)){
-
+
$key = $this->gen_token();
$sec = $this->gen_token();
$r = q("INSERT INTO tokens (id, secret, client_id, scope, expires, uid) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP()+%d, %d)",
@@ -103,13 +103,13 @@ class FKOAuthDataStore extends OAuthDataStore {
intval(ACCESS_TOKEN_DURATION),
intval($uverifier));
if ($r)
- $ret = new OAuthToken($key,$sec);
+ $ret = new OAuthToken($key,$sec);
}
-
-
+
+
q("DELETE FROM tokens WHERE id='%s'", $token->key);
-
-
+
+
if (!is_null($ret) && $uverifier!==false){
del_config("oauth", $verifier);
/* $apps = get_pconfig($uverifier, "oauth", "apps");
@@ -117,9 +117,9 @@ class FKOAuthDataStore extends OAuthDataStore {
$apps[] = $consumer->key;
set_pconfig($uverifier, "oauth", "apps", $apps);*/
}
-
+
return $ret;
-
+
}
}
@@ -172,9 +172,9 @@ class FKOAuth1 extends OAuthServer {
intval($_SESSION['uid'])
);
- call_hooks('logged_in', $a->user);
+ call_hooks('logged_in', $a->user);
}
-
+
}
/*
class FKOAuth2 extends OAuth2 {
@@ -190,13 +190,13 @@ class FKOAuth2 extends OAuth2 {
dbesc($client_secret),
dbesc($redirect_uri)
);
-
+
return $r;
}
protected function checkClientCredentials($client_id, $client_secret = NULL) {
$client_secret = $this->db_secret($client_secret);
-
+
$r = q("SELECT pw FROM clients WHERE client_id = '%s'",
dbesc($client_id));
@@ -218,21 +218,21 @@ class FKOAuth2 extends OAuth2 {
protected function getAccessToken($oauth_token) {
$r = q("SELECT client_id, expires, scope FROM tokens WHERE id = '%s'",
dbesc($oauth_token));
-
+
if (dbm::is_result($r))
return $r[0];
return null;
}
-
+
protected function setAccessToken($oauth_token, $client_id, $expires, $scope = NULL) {
$r = q("INSERT INTO tokens (id, client_id, expires, scope) VALUES ('%s', '%s', %d, '%s')",
dbesc($oauth_token),
dbesc($client_id),
intval($expires),
dbesc($scope));
-
+
return $r;
}
@@ -246,23 +246,23 @@ class FKOAuth2 extends OAuth2 {
protected function getAuthCode($code) {
$r = q("SELECT id, client_id, redirect_uri, expires, scope FROM auth_codes WHERE id = '%s'",
dbesc($code));
-
+
if (dbm::is_result($r))
return $r[0];
return null;
}
protected function setAuthCode($code, $client_id, $redirect_uri, $expires, $scope = NULL) {
- $r = q("INSERT INTO auth_codes
- (id, client_id, redirect_uri, expires, scope) VALUES
+ $r = q("INSERT INTO auth_codes
+ (id, client_id, redirect_uri, expires, scope) VALUES
('%s', '%s', '%s', %d, '%s')",
dbesc($code),
dbesc($client_id),
dbesc($redirect_uri),
intval($expires),
dbesc($scope));
- return $r;
- }
-
+ return $r;
+ }
+
}
*/
diff --git a/include/oembed.php b/include/oembed.php
index 0b8b71366..564626317 100755
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -4,8 +4,8 @@
* @file include/oembed.php
*/
-use \Friendica\ParseUrl;
-use \Friendica\Core\Config;
+use Friendica\ParseUrl;
+use Friendica\Core\Config;
function oembed_replacecb($matches){
$embedurl=$matches[1];
diff --git a/include/plaintext.php b/include/plaintext.php
index 6ab4ec77d..246f7c31f 100644
--- a/include/plaintext.php
+++ b/include/plaintext.php
@@ -4,7 +4,7 @@
* @file include/plaintext.php
*/
-use \Friendica\ParseUrl;
+use Friendica\ParseUrl;
require_once("include/Photo.php");
require_once("include/bbcode.php");
diff --git a/include/plugin.php b/include/plugin.php
index 83f6f1ab9..f7423d7c6 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -1,7 +1,7 @@
apps)==0)
- notice( t('No installed applications.') . EOL);
+ $title = t('Applications');
+ if (count($a->apps) == 0) {
+ notice(t('No installed applications.') . EOL);
+ }
$tpl = get_markup_template("apps.tpl");
return replace_macros($tpl, array(
'$title' => $title,
'$apps' => $a->apps,
));
-
-
-
}
diff --git a/mod/community.php b/mod/community.php
index 45326e291..6d318a539 100644
--- a/mod/community.php
+++ b/mod/community.php
@@ -1,6 +1,6 @@
t('Credits'),
- '$thanks' => t('Friendica is a community project, that would not be possible without the help of many people. Here is a list of those who have contributed to the code or the translation of Friendica. Thank you all!'),
- '$names' => $arr,
- ));
+
+function credits_content(App $a) {
+ /* fill the page with credits */
+ $f = fopen('util/credits.txt', 'r');
+ $names = fread($f, filesize('util/credits.txt'));
+ $arr = explode("\n", htmlspecialchars($names));
+ fclose($f);
+ $tpl = get_markup_template('credits.tpl');
+ return replace_macros($tpl, array(
+ '$title' => t('Credits'),
+ '$thanks' => t('Friendica is a community project, that would not be possible without the help of many people. Here is a list of those who have contributed to the code or the translation of Friendica. Thank you all!'),
+ '$names' => $arr,
+ ));
}
diff --git a/mod/delegate.php b/mod/delegate.php
index 4212ec9b1..ade6737f6 100644
--- a/mod/delegate.php
+++ b/mod/delegate.php
@@ -5,7 +5,6 @@ function delegate_init(App $a) {
return settings_init($a);
}
-
function delegate_content(App $a) {
if (! local_user()) {
diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php
index 506f9f162..9a19cfc8d 100644
--- a/mod/dfrn_poll.php
+++ b/mod/dfrn_poll.php
@@ -3,10 +3,7 @@ require_once('include/items.php');
require_once('include/auth.php');
require_once('include/dfrn.php');
-
function dfrn_poll_init(App $a) {
-
-
$dfrn_id = ((x($_GET,'dfrn_id')) ? $_GET['dfrn_id'] : '');
$type = ((x($_GET,'type')) ? $_GET['type'] : 'data');
$last_update = ((x($_GET,'last_update')) ? $_GET['last_update'] : '');
diff --git a/mod/directory.php b/mod/directory.php
index ba48bb392..4f7af868d 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -9,24 +9,18 @@ function directory_init(App $a) {
$a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= follow_widget();
-
}
else {
unset($_SESSION['theme']);
unset($_SESSION['mobile-theme']);
}
-
-
}
-
function directory_post(App $a) {
if(x($_POST,'search'))
$a->data['search'] = $_POST['search'];
}
-
-
function directory_content(App $a) {
global $db;
diff --git a/mod/dirfind.php b/mod/dirfind.php
index c5844d13d..a62eded39 100644
--- a/mod/dirfind.php
+++ b/mod/dirfind.php
@@ -21,8 +21,6 @@ function dirfind_init(App $a) {
$a->page['aside'] .= follow_widget();
}
-
-
function dirfind_content(App $a, $prefix = "") {
$community = false;
diff --git a/mod/display.php b/mod/display.php
index 1f1fd1120..c2b5ef17c 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -106,7 +106,6 @@ function display_init(App $a) {
}
profile_load($a, $nick, 0, $profiledata);
-
}
function display_fetchauthor($a, $item) {
diff --git a/mod/filer.php b/mod/filer.php
index 47c4aa5e4..2f07cb6ee 100644
--- a/mod/filer.php
+++ b/mod/filer.php
@@ -4,7 +4,6 @@ require_once('include/security.php');
require_once('include/bbcode.php');
require_once('include/items.php');
-
function filer_content(App $a) {
if (! local_user()) {
diff --git a/mod/friendica.php b/mod/friendica.php
index 7bfb7c869..f4d7aac10 100644
--- a/mod/friendica.php
+++ b/mod/friendica.php
@@ -1,6 +1,6 @@
argv[1] == "json"){
diff --git a/mod/hovercard.php b/mod/hovercard.php
index 65b03f2b9..9deb071eb 100644
--- a/mod/hovercard.php
+++ b/mod/hovercard.php
@@ -15,6 +15,7 @@ function hovercard_init(App $a) {
// Just for testing purposes
$_GET["mode"] = "minimal";
}
+
function hovercard_content() {
$profileurl = (x($_REQUEST,'profileurl') ? $_REQUEST['profileurl'] : "");
$datatype = (x($_REQUEST,'datatype') ?$_REQUEST['datatype'] : "json");
diff --git a/mod/install.php b/mod/install.php
index d1d2fd077..0b96e8551 100755
--- a/mod/install.php
+++ b/mod/install.php
@@ -1,8 +1,8 @@
config['register_policy'] == REGISTER_CLOSED) ? false : true);
-
}
diff --git a/mod/maintenance.php b/mod/maintenance.php
index c4839de79..b1fb2a53e 100644
--- a/mod/maintenance.php
+++ b/mod/maintenance.php
@@ -1,6 +1,6 @@
App::get_baseurl(),
- '$touch_icon' => $touch_icon,
- '$title' => Config::get('config', 'sitename', 'Friendica'),
- ));
-
- echo $o;
-
- killme();
+ header('Content-type: application/manifest+json');
+ $touch_icon = Config::get('system', 'touch_icon', 'images/friendica-128.png');
+ if ($touch_icon == '') {
+ $touch_icon = 'images/friendica-128.png';
}
-?>
+
+ $o = replace_macros($tpl, array(
+ '$baseurl' => App::get_baseurl(),
+ '$touch_icon' => $touch_icon,
+ '$title' => Config::get('config', 'sitename', 'Friendica'),
+ ));
+
+ echo $o;
+
+ killme();
+}
diff --git a/mod/match.php b/mod/match.php
index 44f5141ad..77fcbaa72 100644
--- a/mod/match.php
+++ b/mod/match.php
@@ -1,5 +1,5 @@
' . t('Welcome to Friendica') . '';
-
$o .= '
' . t('New Member Checklist') . '
';
-
$o .= '
';
-
$o .= t('We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page. A link to this page will be visible from your home page for two weeks after your initial registration and then will quietly disappear.');
-
$o .= '
' . t('Getting Started') . '
';
-
$o .= '
';
-
$o .= '
' . '' . t('Friendica Walk-Through') . ' ' . t('On your Quick Start page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.') . '
' . EOL;
-
$o .= '
';
-
$o .= '
' . t('Settings') . '
';
-
$o .= '
';
-
$o .= '
' . '' . t('Go to Your Settings') . ' ' . t('On your Settings page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.') . '
' . EOL;
-
$o .= '
' . t('Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you.') . '
' . EOL;
-
$o .= '
';
-
$o .= '
' . t('Profile') . '
';
-
$o .= '
';
-
$o .= '
' . '' . t('Upload Profile Photo') . ' ' . t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.') . '
' . EOL;
-
$o .= '
' . '' . t('Edit Your Profile') . ' ' . t('Edit your default profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors.') . '
' . EOL;
-
$o .= '
' . '' . t('Profile Keywords') . ' ' . t('Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships.') . '
' . '' . t('Importing Emails') . ' ' . t('Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX') . '
' . EOL;
+ }
$o .= '
' . '' . t('Go to Your Contacts Page') . ' ' . t('Your Contacts page is your gateway to managing friendships and connecting with friends on other networks. Typically you enter their address or site URL in the Add New Contact dialog.') . '
' . EOL;
-
$o .= '
' . '' . t("Go to Your Site's Directory") . ' ' . t('The Directory page lets you find other people in this network or other federated sites. Look for a Connect or Follow link on their profile page. Provide your own Identity Address if requested.') . '
' . EOL;
-
$o .= '
' . '' . t('Finding New People') . ' ' . t("On the side panel of the Contacts page are several tools to find new friends. We can match people by interest, look up people by name or interest, and provide suggestions based on network relationships. On a brand new site, friend suggestions will usually begin to be populated within 24 hours.") . '
' . EOL;
-
$o .= '
';
-
$o .= '
' . t('Groups') . '
';
-
$o .= '
';
-
$o .= '
' . '' . t('Group Your Contacts') . ' ' . t('Once you have made some friends, organize them into private conversation groups from the sidebar of your Contacts page and then you can interact with each group privately on your Network page.') . '
' . '' . t("Why Aren't My Posts Public?") . ' ' . t("Friendica respects your privacy. By default, your posts will only show up to people you've added as friends. For more information, see the help section from the link above.") . '