diff options
author | friendica <info@friendica.com> | 2015-01-29 00:28:23 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-29 00:28:23 -0800 |
commit | fd0b6c967fce4d8a82e9dad121ae7d8301d3f342 (patch) | |
tree | 5c37812ef7baeadc17fce088c4394d25f75b593c /doc/Plugins.md | |
parent | c993ddd86ee25832e35e65333fa25b396e7aefdf (diff) | |
parent | 872b165eb2bb5d632a12f2d7e1a28e195c2d5348 (diff) | |
download | volse-hubzilla-fd0b6c967fce4d8a82e9dad121ae7d8301d3f342.tar.gz volse-hubzilla-fd0b6c967fce4d8a82e9dad121ae7d8301d3f342.tar.bz2 volse-hubzilla-fd0b6c967fce4d8a82e9dad121ae7d8301d3f342.zip |
Merge branch 'master' into pocorate
Diffstat (limited to 'doc/Plugins.md')
-rw-r--r-- | doc/Plugins.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/Plugins.md b/doc/Plugins.md index b657f5ceb..e3e4688d9 100644 --- a/doc/Plugins.md +++ b/doc/Plugins.md @@ -93,10 +93,10 @@ Let's go ahead and add some code to implement our post_local hook handler. logger('randplace invoked'); - if(! local_user()) /* non-zero if this is a logged in user of this system */ + if(! local_channel()) /* non-zero if this is a logged in user of this system */ return; - if(local_user() != $item['uid']) /* Does this person own the post? */ + if(local_channel() != $item['uid']) /* Does this person own the post? */ return; if(($item['parent']) || ($item['item_restrict'])) { @@ -106,7 +106,7 @@ Let's go ahead and add some code to implement our post_local hook handler. /* Retrieve our personal config setting */ - $active = get_pconfig(local_user(), 'randplace', 'enable'); + $active = get_pconfig(local_channel(), 'randplace', 'enable'); if(! $active) return; @@ -148,10 +148,10 @@ Now let's add our functions to create and store preference settings. */ function randplace_settings_post($a,$post) { - if(! local_user()) + if(! local_channel()) return; if($_POST['randplace-submit']) - set_pconfig(local_user(),'randplace','enable',intval($_POST['randplace'])); + set_pconfig(local_channel(),'randplace','enable',intval($_POST['randplace'])); } @@ -175,7 +175,7 @@ Now let's add our functions to create and store preference settings. function randplace_settings(&$a,&$s) { - if(! local_user()) + if(! local_channel()) return; /* Add our stylesheet to the page so we can make our settings look nice */ @@ -184,7 +184,7 @@ Now let's add our functions to create and store preference settings. /* Get the current state of our config variable */ - $enabled = get_pconfig(local_user(),'randplace','enable'); + $enabled = get_pconfig(local_channel(),'randplace','enable'); $checked = (($enabled) ? ' checked="checked" ' : ''); |