mirror of
https://github.com/friendica/friendica
synced 2025-04-28 03:10:11 +00:00
Update Addon functions and calls
Update function names and calls for Addon class.
This commit is contained in:
parent
213f6ae1a1
commit
11cf36105c
73 changed files with 544 additions and 464 deletions
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
namespace Friendica\Util;
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Protocol\Email;
|
||||
|
||||
|
@ -30,7 +31,7 @@ class Emailer
|
|||
*/
|
||||
public static function send($params)
|
||||
{
|
||||
call_hooks('emailer_send_prepare', $params);
|
||||
Addon::callHooks('emailer_send_prepare', $params);
|
||||
|
||||
$email_textonly = false;
|
||||
if (x($params, "uid")) {
|
||||
|
@ -79,7 +80,7 @@ class Emailer
|
|||
'headers' => $messageHeader
|
||||
];
|
||||
//echo "<pre>"; var_dump($hookdata); killme();
|
||||
call_hooks("emailer_send", $hookdata);
|
||||
Addon::callHooks("emailer_send", $hookdata);
|
||||
$res = mail(
|
||||
$hookdata['to'], // send to address
|
||||
$hookdata['subject'], // subject
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
*/
|
||||
namespace Friendica\Util;
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
|
||||
/**
|
||||
* Leaflet Map related functions
|
||||
*/
|
||||
|
@ -12,13 +14,13 @@ class Map {
|
|||
$coord = trim($coord);
|
||||
$coord = str_replace([',','/',' '],[' ',' ',' '],$coord);
|
||||
$arr = ['lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'html' => ''];
|
||||
call_hooks('generate_map',$arr);
|
||||
Addon::callHooks('generate_map',$arr);
|
||||
return ($arr['html']) ? $arr['html'] : $coord;
|
||||
}
|
||||
|
||||
public static function byLocation($location) {
|
||||
$arr = ['location' => $location, 'html' => ''];
|
||||
call_hooks('generate_named_map',$arr);
|
||||
Addon::callHooks('generate_named_map',$arr);
|
||||
return ($arr['html']) ? $arr['html'] : $location;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
namespace Friendica\Util;
|
||||
|
||||
use Friendica\Content\OEmbed;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
|
@ -425,7 +426,7 @@ class ParseUrl
|
|||
|
||||
logger("parseurl_getsiteinfo: Siteinfo for ".$url." ".print_r($siteinfo, true), LOGGER_DEBUG);
|
||||
|
||||
call_hooks("getsiteinfo", $siteinfo);
|
||||
Addon::callHooks("getsiteinfo", $siteinfo);
|
||||
|
||||
return($siteinfo);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue