summaryrefslogtreecommitdiff
path: root/lib/adminpanelaction.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-11-18 18:25:36 -0800
committerZach Copley <zach@status.net>2009-11-18 18:25:36 -0800
commitcf7188a4586c5ce5b539229035866cf494413a76 (patch)
treef8bc8f22fcd3883994e8cbb2b042eb0a0cf654df /lib/adminpanelaction.php
parent8f2db3820f6ab2c8881521c0adc9a6427b5ea86b (diff)
Design admin panel mostly done.
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;
+ }
}
/**