diff --git a/include/NotificationsManager.php b/include/NotificationsManager.php
index 611860f9d0..bce65a092d 100644
--- a/include/NotificationsManager.php
+++ b/include/NotificationsManager.php
@@ -24,7 +24,7 @@ class NotificationsManager {
*
* @param array $notes array of note arrays from db
* @return array Copy of input array with added properties
- *
+ *
* Set some extra properties to note array from db:
* - timestamp as int in default TZ
* - date_rel : relative date string
@@ -143,8 +143,7 @@ class NotificationsManager {
/**
* @brief List of pages for the Notifications TabBar
- *
- * @param app $a The
+ *
* @return array with with notifications TabBar data
*/
public function getTabs() {
@@ -191,7 +190,7 @@ class NotificationsManager {
/**
* @brief Format the notification query in an usable array
- *
+ *
* @param array $notifs The array from the db query
* @param string $ident The notifications identifier (e.g. network)
* @return array
@@ -360,7 +359,7 @@ class NotificationsManager {
}
/**
- * @brief Total number of network notifications
+ * @brief Total number of network notifications
* @param int|string $seen
* If 0 only include notifications into the query
* which aren't marked as "seen"
@@ -388,13 +387,13 @@ class NotificationsManager {
/**
* @brief Get network notifications
- *
+ *
* @param int|string $seen
* If 0 only include notifications into the query
* which aren't marked as "seen"
* @param int $start Start the query at this point
* @param int $limit Maximum number of query results
- *
+ *
* @return array with
* string 'ident' => Notification identifier
* int 'total' => Total number of available network notifications
@@ -436,7 +435,7 @@ class NotificationsManager {
}
/**
- * @brief Total number of system notifications
+ * @brief Total number of system notifications
* @param int|string $seen
* If 0 only include notifications into the query
* which aren't marked as "seen"
@@ -460,13 +459,13 @@ class NotificationsManager {
/**
* @brief Get system notifications
- *
+ *
* @param int|string $seen
* If 0 only include notifications into the query
* which aren't marked as "seen"
* @param int $start Start the query at this point
* @param int $limit Maximum number of query results
- *
+ *
* @return array with
* string 'ident' => Notification identifier
* int 'total' => Total number of available system notifications
@@ -502,7 +501,7 @@ class NotificationsManager {
/**
* @brief Addional SQL query string for the personal notifications
- *
+ *
* @return string The additional sql query
*/
private function _personal_sql_extra() {
@@ -520,7 +519,7 @@ class NotificationsManager {
}
/**
- * @brief Total number of personal notifications
+ * @brief Total number of personal notifications
* @param int|string $seen
* If 0 only include notifications into the query
* which aren't marked as "seen"
@@ -550,13 +549,13 @@ class NotificationsManager {
/**
* @brief Get personal notifications
- *
+ *
* @param int|string $seen
* If 0 only include notifications into the query
* which aren't marked as "seen"
* @param int $start Start the query at this point
* @param int $limit Maximum number of query results
- *
+ *
* @return array with
* string 'ident' => Notification identifier
* int 'total' => Total number of available personal notifications
@@ -573,13 +572,13 @@ class NotificationsManager {
$sql_seen = " AND `item`.`unseen` = 1 ";
$r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`, `item`.`unseen`,
- `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` AS `object`,
- `pitem`.`author-name` AS `pname`, `pitem`.`author-link` AS `plink`, `pitem`.`guid` AS `pguid`
+ `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` AS `object`,
+ `pitem`.`author-name` AS `pname`, `pitem`.`author-link` AS `plink`, `pitem`.`guid` AS `pguid`
FROM `item` INNER JOIN `item` AS `pitem` ON `pitem`.`id`=`item`.`parent`
WHERE `item`.`visible` = 1
$sql_extra
$sql_seen
- AND `item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 0
+ AND `item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 0
ORDER BY `item`.`created` DESC LIMIT %d, %d " ,
intval(local_user()),
intval($start),
@@ -588,7 +587,7 @@ class NotificationsManager {
if (dbm::is_result($r))
$notifs = $this->formatNotifs($r, $ident);
-
+
$arr = array (
'notifications' => $notifs,
'ident' => $ident,
@@ -599,7 +598,7 @@ class NotificationsManager {
}
/**
- * @brief Total number of home notifications
+ * @brief Total number of home notifications
* @param int|string $seen
* If 0 only include notifications into the query
* which aren't marked as "seen"
@@ -626,13 +625,13 @@ class NotificationsManager {
/**
* @brief Get home notifications
- *
+ *
* @param int|string $seen
* If 0 only include notifications into the query
* which aren't marked as "seen"
* @param int $start Start the query at this point
* @param int $limit Maximum number of query results
- *
+ *
* @return array with
* string 'ident' => Notification identifier
* int 'total' => Total number of available home notifications
@@ -673,7 +672,7 @@ class NotificationsManager {
}
/**
- * @brief Total number of introductions
+ * @brief Total number of introductions
* @param bool $all
* If false only include introductions into the query
* which aren't marked as ignored
@@ -698,13 +697,13 @@ class NotificationsManager {
/**
* @brief Get introductions
- *
+ *
* @param bool $all
* If false only include introductions into the query
* which aren't marked as ignored
* @param int $start Start the query at this point
* @param int $limit Maximum number of query results
- *
+ *
* @return array with
* string 'ident' => Notification identifier
* int 'total' => Total number of available introductions
@@ -749,7 +748,7 @@ class NotificationsManager {
/**
* @brief Format the notification query in an usable array
- *
+ *
* @param array $intros The array from the db query
* @return array with the introductions
*/
diff --git a/include/Smilies.php b/include/Smilies.php
index d67b92d8b0..f4de32f8f8 100644
--- a/include/Smilies.php
+++ b/include/Smilies.php
@@ -5,6 +5,8 @@
* @brief This file contains the Smilies class which contains functions to handle smiles
*/
+use Friendica\App;
+
/**
* This class contains functions to handle smiles
*/
@@ -13,13 +15,13 @@ class Smilies {
/**
* @brief Function to list all smilies
- *
+ *
* Get an array of all smilies, both internal and from addons.
- *
+ *
* @return array
* 'texts' => smilie shortcut
* 'icons' => icon in html
- *
+ *
* @hook smilie ('texts' => smilies texts array, 'icons' => smilies html array)
*/
public static function get_list() {
@@ -64,41 +66,41 @@ class Smilies {
);
$icons = array(
- '',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '~friendica
',
- 'red
matrix',
- 'red
matrix'
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '~friendica
',
+ 'red
matrix',
+ 'red
matrix'
);
$params = array('texts' => $texts, 'icons' => $icons);
@@ -121,7 +123,7 @@ class Smilies {
*
* @param string $s
* @param boolean $sample
- *
+ *
* @return string HML Output of the Smilie
*/
public static function replace($s, $sample = false) {
@@ -166,7 +168,7 @@ class Smilies {
*
* @param string $x
* @return string HTML Output
- *
+ *
* @todo: Rework because it doesn't work correctly
*/
private function preg_heart($x) {
@@ -174,7 +176,7 @@ class Smilies {
return $x[0];
$t = '';
for($cnt = 0; $cnt < strlen($x[1]); $cnt ++)
- $t .= '
';
+ $t .= '
';
$r = str_replace($x[0],$t,$x[0]);
return $r;
}
diff --git a/include/dfrn.php b/include/dfrn.php
index 9109efce4f..004f136ac3 100644
--- a/include/dfrn.php
+++ b/include/dfrn.php
@@ -372,7 +372,7 @@ class dfrn {
$ext = Photo::supportedTypes();
foreach ($rp as $p) {
- $photos[$p['scale']] = app::get_baseurl().'/photo/'.$p['resource-id'].'-'.$p['scale'].'.'.$ext[$p['type']];
+ $photos[$p['scale']] = App::get_baseurl().'/photo/'.$p['resource-id'].'-'.$p['scale'].'.'.$ext[$p['type']];
}
unset($rp, $ext);
@@ -433,7 +433,7 @@ class dfrn {
$root->setAttribute("xmlns:ostatus", NAMESPACE_OSTATUS);
$root->setAttribute("xmlns:statusnet", NAMESPACE_STATUSNET);
- xml::add_element($doc, $root, "id", app::get_baseurl()."/profile/".$owner["nick"]);
+ xml::add_element($doc, $root, "id", App::get_baseurl()."/profile/".$owner["nick"]);
xml::add_element($doc, $root, "title", $owner["name"]);
$attributes = array("uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION);
@@ -450,13 +450,13 @@ class dfrn {
// DFRN itself doesn't uses this. But maybe someone else wants to subscribe to the public feed.
ostatus::hublinks($doc, $root);
- $attributes = array("rel" => "salmon", "href" => app::get_baseurl()."/salmon/".$owner["nick"]);
+ $attributes = array("rel" => "salmon", "href" => App::get_baseurl()."/salmon/".$owner["nick"]);
xml::add_element($doc, $root, "link", "", $attributes);
- $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => app::get_baseurl()."/salmon/".$owner["nick"]);
+ $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => App::get_baseurl()."/salmon/".$owner["nick"]);
xml::add_element($doc, $root, "link", "", $attributes);
- $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => app::get_baseurl()."/salmon/".$owner["nick"]);
+ $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => App::get_baseurl()."/salmon/".$owner["nick"]);
xml::add_element($doc, $root, "link", "", $attributes);
}
@@ -513,7 +513,7 @@ class dfrn {
}
xml::add_element($doc, $author, "name", $owner["name"], $attributes);
- xml::add_element($doc, $author, "uri", app::get_baseurl().'/profile/'.$owner["nickname"], $attributes);
+ xml::add_element($doc, $author, "uri", App::get_baseurl().'/profile/'.$owner["nickname"], $attributes);
xml::add_element($doc, $author, "dfrn:handle", $owner["addr"], $attributes);
$attributes = array("rel" => "photo", "type" => "image/jpeg",
@@ -814,7 +814,7 @@ class dfrn {
$parent = q("SELECT `guid` FROM `item` WHERE `id` = %d", intval($item["parent"]));
$parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
$attributes = array("ref" => $parent_item, "type" => "text/html",
- "href" => app::get_baseurl().'/display/'.$parent[0]['guid'],
+ "href" => App::get_baseurl().'/display/'.$parent[0]['guid'],
"dfrn:diaspora_guid" => $parent[0]['guid']);
xml::add_element($doc, $entry, "thr:in-reply-to", "", $attributes);
}
@@ -856,7 +856,7 @@ class dfrn {
// We save this value in "plink". Maybe we should read it from there as well?
xml::add_element($doc, $entry, "link", "", array("rel" => "alternate", "type" => "text/html",
- "href" => app::get_baseurl()."/display/".$item["guid"]));
+ "href" => App::get_baseurl()."/display/".$item["guid"]));
// "comment-allow" is some old fashioned stuff for old Friendica versions.
// It is included in the rewritten code for completeness
@@ -884,8 +884,8 @@ class dfrn {
xml::add_element($doc, $entry, "dfrn:bookmark", "true");
}
- if ($item['app']) {
- xml::add_element($doc, $entry, "statusnet:notice_info", "", array("local_id" => $item['id'], "source" => $item['app']));
+ if ($item['App']) {
+ xml::add_element($doc, $entry, "statusnet:notice_info", "", array("local_id" => $item['id'], "source" => $item['App']));
}
xml::add_element($doc, $entry, "dfrn:diaspora_guid", $item["guid"]);
@@ -2331,7 +2331,7 @@ class dfrn {
if ($notice_info AND ($notice_info->length > 0)) {
foreach ($notice_info->item(0)->attributes AS $attributes) {
if ($attributes->name == "source") {
- $item["app"] = strip_tags($attributes->textContent);
+ $item["App"] = strip_tags($attributes->textContent);
}
}
}
diff --git a/include/ostatus.php b/include/ostatus.php
index f0f59b272b..d582acfee6 100644
--- a/include/ostatus.php
+++ b/include/ostatus.php
@@ -2208,7 +2208,7 @@ class ostatus {
/**
* @brief Creates the XML feed for a given nickname
*
- * @param app $a The application class
+ * @param App $a The application class
* @param string $owner_nick Nickname of the feed owner
* @param string $last_update Date of the last update
*
diff --git a/mod/api.php b/mod/api.php
index b771af01b2..cd5d5241f8 100644
--- a/mod/api.php
+++ b/mod/api.php
@@ -108,8 +108,6 @@ function api_content(App $a) {
'$no' => t('No'),
));
- //echo "
"; var_dump($app); killme(); - return $o; } diff --git a/mod/contacts.php b/mod/contacts.php index ee501fb9dd..30d847e25f 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -830,7 +830,7 @@ function contacts_content(App $a) { * * Available Pages are 'Status', 'Profile', 'Contacts' and 'Common Friends' * - * @param app $a + * @param App $a * @param int $contact_id The ID of the contact * @param int $active_tab 1 if tab should be marked as active * diff --git a/mod/network.php b/mod/network.php index 5c840da063..0d37d4d2e2 100644 --- a/mod/network.php +++ b/mod/network.php @@ -795,7 +795,7 @@ function network_content(App $a, $update = 0) { /** * @brief Get the network tabs menu * - * @param app $a The global App + * @param App $a The global App * @return string Html of the networktab */ function network_tabs(App $a) { diff --git a/src/App.php b/src/App.php index 41ee5d3a02..45a9db435c 100644 --- a/src/App.php +++ b/src/App.php @@ -667,7 +667,7 @@ class App { q('START TRANSACTION'); $r = q('SELECT `pid` FROM `process` WHERE `pid` = %d', intval(getmypid())); - if (!dbm::is_result($r)) { + if (!\dbm::is_result($r)) { q("INSERT INTO `process` (`pid`,`command`,`created`) VALUES (%d, '%s', '%s')", intval(getmypid()), dbesc($command), dbesc(datetime_convert())); } q('COMMIT'); @@ -680,7 +680,7 @@ class App { q('START TRANSACTION'); $r = q('SELECT `pid` FROM `process`'); - if (dbm::is_result($r)) { + if (\dbm::is_result($r)) { foreach ($r AS $process) { if (!posix_kill($process['pid'], 0)) { q('DELETE FROM `process` WHERE `pid` = %d', intval($process['pid'])); @@ -785,7 +785,7 @@ class App { } } - $processlist = dbm::processlist(); + $processlist = \dbm::processlist(); if ($processlist['list'] != '') { logger('Processcheck: Processes: ' . $processlist['amount'] . ' - Processlist: ' . $processlist['list'], LOGGER_DEBUG); @@ -876,14 +876,14 @@ class App { // If the last worker fork was less than 10 seconds before then don't fork another one. // This should prevent the forking of masses of workers. $cachekey = 'app:proc_run:started'; - $result = Cache::get($cachekey); + $result = \Cache::get($cachekey); if (!is_null($result) AND ( time() - $result) < 10) { return; } // Set the timestamp of the last proc_run - Cache::set($cachekey, time(), CACHE_MINUTE); + \Cache::set($cachekey, time(), CACHE_MINUTE); array_unshift($args, ((x($this->config, 'php_path')) && (strlen($this->config['php_path'])) ? $this->config['php_path'] : 'php')); diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index 0e34709e9c..e0c382661a 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -132,7 +132,7 @@ function frio_item_photo_menu(App $a, &$arr) { * Additionally the profile, status and photo page links will be changed * to don't open in a new tab if the contact is a friendica contact. * - * @param app $a The app data + * @param App $a The app data * @param array $args Contains contact data and the original photo_menu */ function frio_contact_photo_menu(App $a, &$args){ @@ -184,7 +184,7 @@ function frio_contact_photo_menu(App $a, &$args){ * Some links will point to the local pages because the user would expect * local page (these pages are: search, community, help, apps, directory). * - * @param app $a The App class + * @param App $a The App class * @param array $nav The original nav menu */ function frio_remote_nav($a,&$nav) { @@ -273,7 +273,7 @@ function frio_remote_nav($a,&$nav) { * @param App $a The app data @TODO Unused * @param array $results The array with the originals from acl_lookup() */ -function frio_acl_lookup($a, &$results) { +function frio_acl_lookup(App $a, &$results) { require_once("mod/contacts.php"); $nets = ((x($_GET,"nets")) ? notags(trim($_GET["nets"])) : "");