diff options
author | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-06-22 19:00:45 +0000 |
---|---|---|
committer | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-06-22 19:00:45 +0000 |
commit | a66bf4c5f663d16d6c2ceb4a6cb0a85f642dde43 (patch) | |
tree | 0eb8916039977a20e44260ab8fe522eae1522376 /lib/class/preference.class.php | |
parent | 91eab2086875ad35aa93af00fc8b37d039d9f93c (diff) | |
download | ampache-a66bf4c5f663d16d6c2ceb4a6cb0a85f642dde43.tar.gz ampache-a66bf4c5f663d16d6c2ceb4a6cb0a85f642dde43.tar.bz2 ampache-a66bf4c5f663d16d6c2ceb4a6cb0a85f642dde43.zip |
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.
Diffstat (limited to 'lib/class/preference.class.php')
-rw-r--r-- | lib/class/preference.class.php | 12 |
1 files changed, 12 insertions, 0 deletions
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 @@ -289,6 +289,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 */ |