mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 19:41:55 +02:00
missed some requires, tweaked the lastfm class and removed an unused function from general
This commit is contained in:
parent
edf482ff3d
commit
83c7a25a76
8 changed files with 58 additions and 63 deletions
|
@ -25,14 +25,14 @@ class AmpacheLastfm {
|
|||
var $description ='Records your played songs to your Last.FM Account';
|
||||
var $url ='';
|
||||
var $version ='000001';
|
||||
var $min_ampache ='333001';
|
||||
var $max_ampache ='333005';
|
||||
var $min_ampache ='334001';
|
||||
var $max_ampache ='334005';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* This function does nothing...
|
||||
*/
|
||||
function PluginLastfm() {
|
||||
public function __construct() {
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -43,16 +43,16 @@ class AmpacheLastfm {
|
|||
* This is a required plugin function it inserts the required preferences
|
||||
* into Ampache
|
||||
*/
|
||||
function install() {
|
||||
public function install() {
|
||||
|
||||
/* We need to insert the new preferences */
|
||||
$sql = "INSERT INTO preferences (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
|
||||
$sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
|
||||
"VALUES ('lastfm_user',' ','Last.FM Username','25','string','options')";
|
||||
$db_results = mysql_query($sql,dbh());
|
||||
$db_results = Dba::query($sql);
|
||||
|
||||
$sql = "INSERT INTO preferences (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
|
||||
$sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
|
||||
"VALUES ('lastfm_pass',' ','Last.FM Password','25','string','options')";
|
||||
$db_results = mysql_query($sql,dbh());
|
||||
$db_results = Dba::query($sql);
|
||||
|
||||
fix_all_users_prefs();
|
||||
|
||||
|
@ -66,8 +66,8 @@ class AmpacheLastfm {
|
|||
function uninstall() {
|
||||
|
||||
/* We need to remove the preivously added preferences */
|
||||
$sql = "DELETE FROM preferences WHERE name='lastfm_pass' OR name='lastfm_user'";
|
||||
$db_results = mysql_query($sql,dbh());
|
||||
$sql = "DELETE FROM preference WHERE name='lastfm_pass' OR name='lastfm_user'";
|
||||
$db_results = Dba::query($sql);
|
||||
|
||||
fix_all_users_prefs();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue