From a66bf4c5f663d16d6c2ceb4a6cb0a85f642dde43 Mon Sep 17 00:00:00 2001 From: Paul 'flowerysong' Arthur Date: Tue, 22 Jun 2010 19:00:45 +0000 Subject: Plugin work. Plugins are now pluggable: no plugin-specific code in the main Ampache code. Plugins are now updatable, if configuration changes are needed for a new version. --- lib/class/preference.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/class/preference.class.php') diff --git a/lib/class/preference.class.php b/lib/class/preference.class.php index a6cf2d11..051e58d8 100644 --- a/lib/class/preference.class.php +++ b/lib/class/preference.class.php @@ -288,6 +288,18 @@ class Preference { } // delete + /** + * rename + * This renames a preference in the database + */ + public static function rename($old, $new) { + $old = Dba::escape($old); + $new = Dba::escape($new); + + $sql = "UPDATE `preference` SET `name`='$new' WHERE `name`='$old'"; + $db_results = Dba::write($sql); + } + /** * rebuild_preferences * This removes any garbage and then adds back in anything missing preferences wise -- cgit