From e3acf5b72b3ed3e3a0e683a28451f8d2cee4219d Mon Sep 17 00:00:00 2001 From: Samantha Doherty Date: Wed, 18 May 2011 10:13:06 -0400 Subject: [PATCH] Remove primary nav and notice form overrides, and extra notice forms, from MobileProfile. --- plugins/MobileProfile/MobileProfilePlugin.php | 90 +------------------ 1 file changed, 1 insertion(+), 89 deletions(-) diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 7e005731b6..659c6bed84 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -277,10 +277,7 @@ class MobileProfilePlugin extends WAP20Plugin $action->elementStart('div', array('id' => 'header')); $this->_showLogo($action); - $this->_showPrimaryNav($action); - if (common_logged_in()) { - $action->showNoticeForm(); - } + $action->showPrimaryNav(); $action->elementEnd('div'); return false; @@ -305,91 +302,6 @@ class MobileProfilePlugin extends WAP20Plugin $action->elementEnd('address'); } - function _showPrimaryNav($action) - { - $user = common_current_user(); - $action->elementStart('ul', array('id' => 'site_nav_global_primary')); - if ($user) { - $action->menuItem(common_local_url('all', array('nickname' => $user->nickname)), - // TRANS: Menu item in mobile profile to go to start page of site. - _m('Home')); - $action->menuItem(common_local_url('profilesettings'), - // TRANS: Menu item in mobile profile to go to user account settings. - _m('Account')); - $action->menuItem(common_local_url('oauthconnectionssettings'), - // TRANS: Menu item in mobile profile to connect to other services. - _m('Connect')); - if ($user->hasRight(Right::CONFIGURESITE)) { - $action->menuItem(common_local_url('siteadminpanel'), - // TRANS: Menu item in mobile profile to manage site settings. - _m('Admin'), - _m('Change site configuration'), false, 'nav_admin'); - } - if (common_config('invite', 'enabled')) { - $action->menuItem(common_local_url('invite'), - // TRANS: Menu item in mobile profile to invite other people. - _m('Invite')); - } - $action->menuItem(common_local_url('logout'), - // TRANS: Menu item in mobile profile log the current user off. - _m('Logout')); - } else { - if (!common_config('site', 'closed')) { - $action->menuItem(common_local_url('register'), - // TRANS: Menu item in mobile profile to register with the site. - _m('Register')); - } - $action->menuItem(common_local_url('login'), - // TRANS: Menu item in mobile profile to log in. - _m('Login')); - } - if ($user || !common_config('site', 'private')) { - $action->menuItem(common_local_url('peoplesearch'), - // TRANS: Menu item in mobile profile to search the site. - _m('Search')); - } - $action->elementEnd('ul'); - } - - function onStartShowNoticeFormData($form) - { - if (!$this->serveMobile) { - return true; - } - - $form->out->element('textarea', array('id' => 'notice_data-text', - 'cols' => 15, - 'rows' => 4, - 'name' => 'status_textarea'), - ($form->content) ? $form->content : ''); - - $contentLimit = Notice::maxContent(); - - if ($contentLimit > 0) { - $form->out->element('div', array('class' => 'count'), - $contentLimit); - } - - if (common_config('attachments', 'uploads')) { - if ($this->mobileFeatures['inputfiletype']) { - $form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota')); - // TRANS: Field label in mobile profile to attach a file to a status. - $form->out->element('label', array('for' => 'notice_data-attach'), _m('Attach')); - $form->out->element('input', array('id' => 'notice_data-attach', - 'type' => 'file', - 'name' => 'attach', - // TRANS: Field title in mobile profile to attach a file to a status. - 'title' => _m('Attach a file.'))); - } - } - if ($form->action) { - $form->out->hidden('notice_return-to', $form->action, 'returnto'); - } - $form->out->hidden('notice_in-reply-to', $form->inreplyto, 'inreplyto'); - - return false; - } - function onStartShowAside($action) { if ($this->serveMobile) { -- 2.39.5