summaryrefslogtreecommitdiff
path: root/lib/adminpanelaction.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/adminpanelaction.php')
-rw-r--r--lib/adminpanelaction.php27
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;
+ }
}
/**