* Description: Disable "Archives" widget on profile page
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* Description: Disable "Archives" widget on profile page
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
Addon::registerHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
Addon::registerHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
Addon::registerHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
Addon::registerHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
Addon::unregisterHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
Addon::unregisterHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
Addon::unregisterHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
Addon::unregisterHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
-
-function notimeline_settings_post($a,$post) {
- if(! local_user() || (! x($_POST,'notimeline-submit')))
+function notimeline_settings_post($a, $post)
+{
+ if (!local_user() || (!x($_POST, 'notimeline-submit'))) {
- PConfig::set(local_user(),'system','no_wall_archive_widget',intval($_POST['notimeline']));
- info( t('No Timeline settings updated.') . EOL);
+ PConfig::set(local_user(), 'system', 'no_wall_archive_widget', intval($_POST['notimeline']));
+ info(L10n::t('No Timeline settings updated.') . EOL);
$s .= '<input id="notimeline-checkbox" type="checkbox" name="notimeline" value="1" ' . $notimeline_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<input id="notimeline-checkbox" type="checkbox" name="notimeline" value="1" ' . $notimeline_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */