From cf7188a4586c5ce5b539229035866cf494413a76 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 18 Nov 2009 18:25:36 -0800 Subject: Design admin panel mostly done. --- lib/adminpanelaction.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'lib/adminpanelaction.php') 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; + } } /** -- cgit v1.2.3-54-g00ecf