Fix wrong class name case
- Use leading backslash for non-namespace class names in App
This commit is contained in:
parent
146258680b
commit
4b16de6d80
|
@ -144,7 +144,6 @@ class NotificationsManager {
|
|||
/**
|
||||
* @brief List of pages for the Notifications TabBar
|
||||
*
|
||||
* @param app $a The
|
||||
* @return array with with notifications TabBar data
|
||||
*/
|
||||
public function getTabs() {
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
@ -64,41 +66,41 @@ class Smilies {
|
|||
);
|
||||
|
||||
$icons = array(
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-heart.gif" alt="<3" title="<3" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" title="</3" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" title="<\\3" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-smile.gif" alt=":-)" title=":-)" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-wink.gif" alt=";-)" title=";-)" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-frown.gif" alt=":-(" title=":-(" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" title=":-P" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-p" title=":-P" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-kiss.gif" alt=":-\" title=":-\" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-kiss.gif" alt=":-\" title=":-\" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" title=":-x" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" title=":-X" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" title=":-D" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" title="8-|" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" title="8-O" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" title="8-O" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" title="\\o/" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" title="o.O" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" title="O.o" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-Oo.gif" alt="o_O" title="o_O" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-Oo.gif" alt="O_o" title="O_o" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" title=":\'("/>',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" title=":-!" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" title=":-/" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-embarassed.gif" alt=":-[" title=":-[" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-cool.gif" alt="8-)" title="8-)" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/beer_mug.gif" alt=":beer" title=":beer" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" title=":homebrew" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/coffee.gif" alt=":coffee" title=":coffee" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" title=":facepalm" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/like.gif" alt=":like" title=":like" />',
|
||||
'<img class="smiley" src="' . app::get_baseurl() . '/images/dislike.gif" alt=":dislike" title=":dislike" />',
|
||||
'<a href="http://friendica.com">~friendica <img class="smiley" src="' . app::get_baseurl() . '/images/friendica-16.png" alt="~friendica" title="~friendica" /></a>',
|
||||
'<a href="http://redmatrix.me/">red<img class="smiley" src="' . app::get_baseurl() . '/images/rm-16.png" alt="red#" title="red#" />matrix</a>',
|
||||
'<a href="http://redmatrix.me/">red<img class="smiley" src="' . app::get_baseurl() . '/images/rm-16.png" alt="red#matrix" title="red#matrix" />matrix</a>'
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-heart.gif" alt="<3" title="<3" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" title="</3" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" title="<\\3" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-smile.gif" alt=":-)" title=":-)" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-wink.gif" alt=";-)" title=";-)" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-frown.gif" alt=":-(" title=":-(" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" title=":-P" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-p" title=":-P" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-kiss.gif" alt=":-\" title=":-\" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-kiss.gif" alt=":-\" title=":-\" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" title=":-x" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" title=":-X" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" title=":-D" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" title="8-|" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" title="8-O" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" title="8-O" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" title="\\o/" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" title="o.O" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" title="O.o" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-Oo.gif" alt="o_O" title="o_O" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-Oo.gif" alt="O_o" title="O_o" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" title=":\'("/>',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" title=":-!" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" title=":-/" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-embarassed.gif" alt=":-[" title=":-[" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-cool.gif" alt="8-)" title="8-)" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/beer_mug.gif" alt=":beer" title=":beer" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" title=":homebrew" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/coffee.gif" alt=":coffee" title=":coffee" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" title=":facepalm" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/like.gif" alt=":like" title=":like" />',
|
||||
'<img class="smiley" src="' . App::get_baseurl() . '/images/dislike.gif" alt=":dislike" title=":dislike" />',
|
||||
'<a href="http://friendica.com">~friendica <img class="smiley" src="' . App::get_baseurl() . '/images/friendica-16.png" alt="~friendica" title="~friendica" /></a>',
|
||||
'<a href="http://redmatrix.me/">red<img class="smiley" src="' . App::get_baseurl() . '/images/rm-16.png" alt="red#" title="red#" />matrix</a>',
|
||||
'<a href="http://redmatrix.me/">red<img class="smiley" src="' . App::get_baseurl() . '/images/rm-16.png" alt="red#matrix" title="red#matrix" />matrix</a>'
|
||||
);
|
||||
|
||||
$params = array('texts' => $texts, 'icons' => $icons);
|
||||
|
@ -174,7 +176,7 @@ class Smilies {
|
|||
return $x[0];
|
||||
$t = '';
|
||||
for($cnt = 0; $cnt < strlen($x[1]); $cnt ++)
|
||||
$t .= '<img class="smiley" src="' . app::get_baseurl() . '/images/smiley-heart.gif" alt="<3" />';
|
||||
$t .= '<img class="smiley" src="' . App::get_baseurl() . '/images/smiley-heart.gif" alt="<3" />';
|
||||
$r = str_replace($x[0],$t,$x[0]);
|
||||
return $r;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -108,8 +108,6 @@ function api_content(App $a) {
|
|||
'$no' => t('No'),
|
||||
));
|
||||
|
||||
//echo "<pre>"; var_dump($app); killme();
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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) {
|
||||
|
|
10
src/App.php
10
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'));
|
||||
|
||||
|
|
|
@ -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"])) : "");
|
||||
|
|
Loading…
Reference in New Issue
Block a user