summaryrefslogtreecommitdiffstats
path: root/modules/plugins
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-14 07:21:35 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-14 07:21:35 +0000
commitc8bfff18ef4f70b0abf9f3d7e2eaf0079bab29f8 (patch)
tree4e222ec7806b68d8910c6f8775855225b9cec518 /modules/plugins
parentdf2f009920f2ed128eea364870f4df94d9b89486 (diff)
downloadampache-c8bfff18ef4f70b0abf9f3d7e2eaf0079bab29f8.tar.gz
ampache-c8bfff18ef4f70b0abf9f3d7e2eaf0079bab29f8.tar.bz2
ampache-c8bfff18ef4f70b0abf9f3d7e2eaf0079bab29f8.zip
step one of toasting /lib/preference.lib.php and also added a missing GPL note
Diffstat (limited to 'modules/plugins')
-rw-r--r--modules/plugins/Lastfm.plugin.php30
-rw-r--r--modules/plugins/OpenStrands.plugin.php10
2 files changed, 8 insertions, 32 deletions
diff --git a/modules/plugins/Lastfm.plugin.php b/modules/plugins/Lastfm.plugin.php
index c0896b71..7407d7ba 100644
--- a/modules/plugins/Lastfm.plugin.php
+++ b/modules/plugins/Lastfm.plugin.php
@@ -45,30 +45,12 @@ class AmpacheLastfm {
*/
public function install() {
- /* We need to insert the new preferences */
- $sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
- "VALUES ('lastfm_user',' ','Last.FM Username','25','string','options')";
- $db_results = Dba::query($sql);
-
- $sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
- "VALUES ('lastfm_pass',' ','Last.FM Password','25','string','options')";
- $db_results = Dba::query($sql);
-
- $sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
- "VALUES ('lastfm_port',' ','Last.FM Submission port','5','string','internal')";
- $db_results = Dba::query($sql);
-
- $sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
- "VALUES ('lastfm_host',' ','Last.FM Submission host','5','string','internal')";
- $db_results = Dba::query($sql);
-
- $sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
- "VALUES ('lastfm_url',' ','Last.FM Submission url','5','string','internal')";
- $db_results = Dba::query($sql);
-
- $sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
- "VALUES ('lastfm_challenge',' ','Last.FM Submission Challenge','5','string','internal')";
- $db_results = Dba::query($sql);
+ Preference::insert('lastfm_user','Last.FM Username',' ','25','string','options');
+ Preference::insert('lastfm_pass','Last.FM Password',' ','25','string','options');
+ Preference::insert('lastfm_port','Last.FM Submit Port',' ','25','string','internal');
+ Preference::insert('lastfm_host','Last.FM Submit Host',' ','25','string','internal');
+ Preference::insert('lastfm_url','Last.FM Submit URL',' ','25','string','internal');
+ Preference::insert('lastfm_challenge','Last.FM Submit Challenge',' ','25','string','internal');
} // install
diff --git a/modules/plugins/OpenStrands.plugin.php b/modules/plugins/OpenStrands.plugin.php
index 5fe6821e..1a7b1b78 100644
--- a/modules/plugins/OpenStrands.plugin.php
+++ b/modules/plugins/OpenStrands.plugin.php
@@ -45,14 +45,8 @@ class AmpacheOpenStrands {
*/
public function install() {
- /* We need to insert the new preferences */
- $sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
- "VALUES ('mystrands_user',' ','MyStrands Username','25','string','options')";
- $db_results = Dba::query($sql);
-
- $sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
- "VALUES ('mystrands_pass',' ','MyStrands Password','25','string','options')";
- $db_results = Dba::query($sql);
+ Preference::insert('mystrands_user','MyStrands Login',' ','25','string','options');
+ Preference::insert('mystrands_pass','MyStrands Password',' ','25','string','options');
} // install