mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 02:45:16 +02:00
Some rewrites:
- max_proccesses_reach() and maxload_reached() (why no _ behind max?) are called both way, static and with object reference. - this is strongly discouraged and should be avoided as its support (in PHP) may be dropped in future releases. - used $a = get_app(); to encapsulate code (even when the function does currently the same, it may be changed later) Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
47c60aa486
commit
293436e5fd
27 changed files with 69 additions and 67 deletions
|
@ -1443,6 +1443,7 @@ class dfrn {
|
|||
* @param array $importer Record of the importer user mixed with contact of the content
|
||||
*/
|
||||
private function process_suggestion($xpath, $suggestion, $importer) {
|
||||
$a = get_app();
|
||||
|
||||
logger("Processing suggestions");
|
||||
|
||||
|
@ -1524,7 +1525,7 @@ class dfrn {
|
|||
"to_email" => $importer["email"],
|
||||
"uid" => $importer["importer_uid"],
|
||||
"item" => $suggest,
|
||||
"link" => App::get_baseurl()."/notifications/intros",
|
||||
"link" => $a->get_baseurl()."/notifications/intros",
|
||||
"source_name" => $importer["name"],
|
||||
"source_link" => $importer["url"],
|
||||
"source_photo" => $importer["photo"],
|
||||
|
@ -1791,6 +1792,8 @@ class dfrn {
|
|||
* @param int $posted_id The record number of item record that was just posted
|
||||
*/
|
||||
private function do_poke($item, $importer, $posted_id) {
|
||||
$a = get_app();
|
||||
|
||||
$verb = urldecode(substr($item["verb"],strpos($item["verb"], "#")+1));
|
||||
if(!$verb)
|
||||
return;
|
||||
|
@ -1810,7 +1813,7 @@ class dfrn {
|
|||
}
|
||||
}
|
||||
|
||||
if($Blink && link_compare($Blink,App::get_baseurl()."/profile/".$importer["nickname"])) {
|
||||
if($Blink && link_compare($Blink,$a->get_baseurl()."/profile/".$importer["nickname"])) {
|
||||
|
||||
// send a notification
|
||||
notification(array(
|
||||
|
@ -1821,7 +1824,7 @@ class dfrn {
|
|||
"to_email" => $importer["email"],
|
||||
"uid" => $importer["importer_uid"],
|
||||
"item" => $item,
|
||||
"link" => App::get_baseurl()."/display/".urlencode(get_item_guid($posted_id)),
|
||||
"link" => $a->get_baseurl()."/display/".urlencode(get_item_guid($posted_id)),
|
||||
"source_name" => stripslashes($item["author-name"]),
|
||||
"source_link" => $item["author-link"],
|
||||
"source_photo" => ((link_compare($item["author-link"],$importer["url"]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue