diff options
author | Zach Copley <zach@status.net> | 2009-11-18 18:25:36 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2009-11-18 18:25:36 -0800 |
commit | cf7188a4586c5ce5b539229035866cf494413a76 (patch) | |
tree | f8bc8f22fcd3883994e8cbb2b042eb0a0cf654df /lib/adminpanelaction.php | |
parent | 8f2db3820f6ab2c8881521c0adc9a6427b5ea86b (diff) |
Design admin panel mostly done.
Diffstat (limited to 'lib/adminpanelaction.php')
-rw-r--r-- | lib/adminpanelaction.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/adminpanelaction.php b/lib/adminpanelaction.php index 33b210da3..e0c253ccf 100644 --- a/lib/adminpanelaction.php +++ b/lib/adminpanelaction.php @@ -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; + } } /** |