mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
Update function names
update function names and hook calls
This commit is contained in:
parent
0afd633346
commit
c71f7b0e1a
50 changed files with 356 additions and 348 deletions
|
@ -10,8 +10,8 @@ use Friendica\Core\PConfig;
|
|||
|
||||
function numfriends_install() {
|
||||
|
||||
Addon::registerHook('plugin_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
|
||||
Addon::registerHook('plugin_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
|
||||
Addon::registerHook('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
|
||||
Addon::registerHook('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
|
||||
|
||||
logger("installed numfriends");
|
||||
}
|
||||
|
@ -19,15 +19,13 @@ function numfriends_install() {
|
|||
|
||||
function numfriends_uninstall() {
|
||||
|
||||
Addon::unregisterHook('plugin_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
|
||||
Addon::unregisterHook('plugin_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
|
||||
Addon::unregisterHook('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
|
||||
Addon::unregisterHook('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
|
||||
|
||||
|
||||
logger("removed numfriends");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Callback from the settings post function.
|
||||
|
@ -36,7 +34,6 @@ function numfriends_uninstall() {
|
|||
* and if so set our configuration setting for this person.
|
||||
*
|
||||
*/
|
||||
|
||||
function numfriends_settings_post($a,$post) {
|
||||
if(! local_user() || (! x($_POST,'numfriends-submit')))
|
||||
return;
|
||||
|
@ -48,13 +45,10 @@ function numfriends_settings_post($a,$post) {
|
|||
|
||||
/**
|
||||
*
|
||||
* Called from the Plugin Setting form.
|
||||
* Called from the Addon Setting form.
|
||||
* Add our own settings info to the page.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function numfriends_settings(&$a, &$s)
|
||||
{
|
||||
if (! local_user()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue