]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/adminpanelaction.php
Fix plural forms notation: replace " or " by " || ". Missed the comment on http:...
[quix0rs-gnu-social.git] / lib / adminpanelaction.php
index 33b210da34b0b55b6d8a0acfb8883012dd4219af..7997eb2b1f4b13a7db84f7c78fd3af07d0c44527 100644 (file)
@@ -224,6 +224,33 @@ class AdminPanelAction extends Action
         $this->clientError(_('saveSettings() not implemented.'));
         return;
     }
+    
+    /**
+     * Delete a design setting
+     *
+     * // XXX: Maybe this should go in Design? --Z
+     *
+     * @return mixed $result false if something didn't work
+     */
+
+    function deleteSetting($section, $setting)
+    {
+        $config = new Config();
+
+        $config->section = $section;
+        $config->setting = $setting;
+
+        if ($config->find(true)) {
+            $result = $config->delete();
+            if (!$result) {
+                common_log_db_error($config, 'DELETE', __FILE__);
+                $this->clientError(_("Unable to delete design setting."));
+                return null;
+            }
+        }
+
+        return $result;
+    }
 }
 
 /**
@@ -275,6 +302,12 @@ class AdminPanelNav extends Widget
             $this->out->menuItem(common_local_url('designadminpanel'), _('Design'),
                 _('Design configuration'), $action_name == 'designadminpanel', 'nav_design_admin_panel');
 
+            $this->out->menuItem(common_local_url('useradminpanel'), _('User'),
+                _('Paths configuration'), $action_name == 'useradminpanel', 'nav_design_admin_panel');
+
+            $this->out->menuItem(common_local_url('pathsadminpanel'), _('Paths'),
+                _('Paths configuration'), $action_name == 'pathsadminpanel', 'nav_design_admin_panel');
+
             Event::handle('EndAdminPanelNav', array($this));
         }
         $this->action->elementEnd('ul');