diff options
-rw-r--r-- | bin/install/install-db.inc | 2 | ||||
-rw-r--r-- | install.php | 32 | ||||
-rw-r--r-- | lib/class/dba.class.php | 4 | ||||
-rw-r--r-- | lib/class/preference.class.php | 4 | ||||
-rw-r--r-- | lib/class/vauth.class.php | 2 | ||||
-rw-r--r-- | lib/init.php | 6 | ||||
-rw-r--r-- | lib/install.php | 4 | ||||
-rw-r--r-- | modules/localplay/httpq.controller.php | 2 | ||||
-rw-r--r-- | modules/localplay/mpd.controller.php | 2 | ||||
-rw-r--r-- | modules/localplay/shoutcast.controller.php | 2 | ||||
-rw-r--r-- | modules/localplay/vlc.controller.php | 2 | ||||
-rw-r--r-- | server/stream.ajax.php | 2 | ||||
-rw-r--r-- | stream.php | 2 | ||||
-rw-r--r-- | templates/list_header.inc.php | 2 |
14 files changed, 34 insertions, 34 deletions
diff --git a/bin/install/install-db.inc b/bin/install/install-db.inc index 08626e29..c9d9e7cb 100644 --- a/bin/install/install-db.inc +++ b/bin/install/install-db.inc @@ -32,7 +32,7 @@ require_once $prefix . '/lib/init.php'; require_once 'lib/install.php'; require_once 'lib/debug.lib.php'; -Config::set('prefix',$prefix,'1'); +Config::set('prefix', $prefix, true); $configfile = "$prefix/config/ampache.cfg.php"; diff --git a/install.php b/install.php index f03c3842..b1316cff 100644 --- a/install.php +++ b/install.php @@ -47,7 +47,7 @@ if ($_SERVER['HTTPS'] == 'on') { $http_type = "https://"; } else { $http_type = "http://"; } $prefix = dirname(__FILE__); -Config::set('prefix',$prefix,'1'); +Config::set('prefix', $prefix, true); $configfile = "$prefix/config/ampache.cfg.php"; set_error_handler('ampache_error_handler'); @@ -92,8 +92,8 @@ switch ($_REQUEST['action']) { $charset = $_REQUEST['charset']; // Set the lang in the conf array - Config::set('lang', $htmllang,'1'); - Config::set('site_charset', $charset, '1'); + Config::set('lang', $htmllang, true); + Config::set('site_charset', $charset, true); load_gettext(); if (!install_insert_db($username,$password,$hostname,$database)) { @@ -136,7 +136,7 @@ switch ($_REQUEST['action']) { $charset = $_REQUEST['charset']; // Set the lang in the conf array - Config::set('lang',$htmllang,'1'); + Config::set('lang', $htmllang, true); // We need the charset for the different languages $charsets = array( @@ -155,7 +155,7 @@ switch ($_REQUEST['action']) { $charset = $charsets[$_REQUEST['htmllang']]; // Set the site_charset in the conf array - Config::set('site_charset',$charsets[$_REQUEST['htmllang']],'1'); + Config::set('site_charset', $charsets[$_REQUEST['htmllang']], true); /* load_gettext mojo */ load_gettext(); @@ -166,15 +166,15 @@ switch ($_REQUEST['action']) { case 'create_account': $results = parse_ini_file($configfile); - Config::set_by_array($results,'1'); + Config::set_by_array($results, true); /* Get the variables for the language */ $htmllang = $_REQUEST['htmllang']; $charset = $_REQUEST['charset']; // Set the lang in the conf array - Config::set('lang', $htmllang,'1'); - Config::set('site_charset', $charset, '1'); + Config::set('lang', $htmllang, true); + Config::set('site_charset', $charset, true); load_gettext(); $password2 = scrub_in($_REQUEST['local_pass2']); @@ -195,8 +195,8 @@ switch ($_REQUEST['action']) { $charset = $_REQUEST['charset']; // Set the lang in the conf array - Config::set('lang', $htmllang,'1'); - Config::set('site_charset', $charset, '1'); + Config::set('lang', $htmllang, true); + Config::set('site_charset', $charset, true); load_gettext(); /* Make sure we've got a valid config file */ @@ -211,7 +211,7 @@ switch ($_REQUEST['action']) { $charset = $_REQUEST['charset']; // Set the lang in the conf array - Config::set('lang',$htmllang,'1'); + Config::set('lang', $htmllang, true); // We need the charset for the different languages $charsets = array( @@ -229,7 +229,7 @@ switch ($_REQUEST['action']) { $charset = $charsets[$_REQUEST['htmllang']]; // Set the site_charset in the conf array - Config::set('site_charset',$charsets[$_REQUEST['htmllang']],'1'); + Config::set('site_charset', $charsets[$_REQUEST['htmllang']], true); /* load_gettext mojo */ load_gettext(); @@ -243,7 +243,7 @@ switch ($_REQUEST['action']) { $htmllang = $_POST['htmllang']; // Set the lang in the conf array - Config::set('lang',$htmllang,'1'); + Config::set('lang', $htmllang, true); // We need the charset for the different languages $charsets = array( @@ -262,7 +262,7 @@ switch ($_REQUEST['action']) { $charset = $charsets[$_POST['htmllang']]; // Set the site_charset in the conf array - Config::set('site_charset',$charsets[$_POST['htmllang']],'1'); + Config::set('site_charset', $charsets[$_POST['htmllang']], true); // Now we make voodoo with the Load gettext mojo load_gettext(); @@ -285,8 +285,8 @@ switch ($_REQUEST['action']) { $htmllang = $lang; $charset = "UTF-8"; } - Config::set('lang',$htmllang,'1'); - Config::set('site_charset', $charset, '1'); + Config::set('lang', $htmllang, true); + Config::set('site_charset', $charset, true); load_gettext(); /* Show the language options first */ diff --git a/lib/class/dba.class.php b/lib/class/dba.class.php index e63c14af..3910fe50 100644 --- a/lib/class/dba.class.php +++ b/lib/class/dba.class.php @@ -307,7 +307,7 @@ class Dba { if (!is_resource(Config::get($handle))) { $dbh = self::_connect($database); - Config::set($handle,$dbh,1); + Config::set($handle, $dbh, true); return $dbh; } else { @@ -331,7 +331,7 @@ class Dba { mysql_close(Config::get($handle)); // Nuke it - Config::set($handle,false,1); + Config::set($handle, false, true); return true; diff --git a/lib/class/preference.class.php b/lib/class/preference.class.php index be70bdcd..4953aeec 100644 --- a/lib/class/preference.class.php +++ b/lib/class/preference.class.php @@ -363,7 +363,7 @@ class Preference { public static function load_from_session($uid=-1) { if (is_array($_SESSION['userdata']['preferences']) AND $_SESSION['userdata']['uid'] == $uid) { - Config::set_by_array($_SESSION['userdata']['preferences'],1); + Config::set_by_array($_SESSION['userdata']['preferences'], true); return true; } @@ -449,7 +449,7 @@ class Preference { $results['theme_path'] = '/themes/classic'; } - Config::set_by_array($results,1); + Config::set_by_array($results, true); $_SESSION['userdata']['preferences'] = $results; $_SESSION['userdata']['uid'] = $user_id; diff --git a/lib/class/vauth.class.php b/lib/class/vauth.class.php index 34bb813a..30dfe10c 100644 --- a/lib/class/vauth.class.php +++ b/lib/class/vauth.class.php @@ -259,7 +259,7 @@ class vauth { $remember_length = Config::get('remember_length'); $session_name = Config::get('session_name'); - Config::set('cookie_life',$remember_length,'1'); + Config::set('cookie_life', $remember_length, true); setcookie($session_name . '_remember',"Rappelez-vous, rappelez-vous le 27 mars", time() + $remember_length, '/'); } // create_remember_cookie diff --git a/lib/init.php b/lib/init.php index dc6a34cc..0b8cd639 100644 --- a/lib/init.php +++ b/lib/init.php @@ -54,7 +54,7 @@ if (!function_exists('gettext')) { } // Define some base level config options -Config::set('prefix',$prefix); +Config::set('prefix', $prefix); /* Check to see if this is http or https @@ -163,7 +163,7 @@ require_once $prefix . '/modules/ampacheapi/AmpacheApi.lib.php'; /* Temp Fixes */ $results = Preference::fix_preferences($results); -Config::set_by_array($results,1); +Config::set_by_array($results, true); // Modules (These are conditionally included depending upon config values) if (Config::get('ratings')) { @@ -264,7 +264,7 @@ if (session_id()) { } /* Add in some variables for ajax done here because we need the user */ -Config::set('ajax_url',Config::get('web_path') . '/server/ajax.server.php',1); +Config::set('ajax_url', Config::get('web_path') . '/server/ajax.server.php', true); // Load gettext mojo load_gettext(); diff --git a/lib/install.php b/lib/install.php index 16ce2b18..bb26cd47 100644 --- a/lib/install.php +++ b/lib/install.php @@ -132,7 +132,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false $data['database_hostname'] = $hostname; $data['database_name'] = $database; - Config::set_by_array($data,'1'); + Config::set_by_array($data, true); unset($data); @@ -247,7 +247,7 @@ function install_create_config($web_path,$username,$password,$hostname,$database $data['database_name'] = $database; $data['web_path'] = $web_path; - Config::set_by_array($data,'1'); + Config::set_by_array($data, true); /* Attempt to make DB connection */ $dbh = Dba::dbh(); diff --git a/modules/localplay/httpq.controller.php b/modules/localplay/httpq.controller.php index 92463329..6f863037 100644 --- a/modules/localplay/httpq.controller.php +++ b/modules/localplay/httpq.controller.php @@ -269,7 +269,7 @@ class AmpacheHttpq extends localplay_controller { $user_id = $user_id ? $user_id : $GLOBALS['user']->id; Preference::update('httpq_active',$user_id,intval($uid)); - Config::set('httpq_active',intval($uid),'1'); + Config::set('httpq_active', intval($uid), true); return true; diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php index 691e2659..553082e4 100644 --- a/modules/localplay/mpd.controller.php +++ b/modules/localplay/mpd.controller.php @@ -269,7 +269,7 @@ class AmpacheMpd extends localplay_controller { $user_id = $user_id ? $user_id : $GLOBALS['user']->id; Preference::update('mpd_active',$user_id,intval($uid)); - Config::set('mpd_active',intval($uid),'1'); + Config::set('mpd_active', intval($uid), true); return true; diff --git a/modules/localplay/shoutcast.controller.php b/modules/localplay/shoutcast.controller.php index 0f6c2e91..760b228f 100644 --- a/modules/localplay/shoutcast.controller.php +++ b/modules/localplay/shoutcast.controller.php @@ -272,7 +272,7 @@ class AmpacheShoutCast extends localplay_controller { $user_id = $user_id ? $user_id : $GLOBALS['user']->id; Preference::update('shoutcast_active',$user_id,intval($uid)); - Config::set('shoutcast_active',intval($uid),'1'); + Config::set('shoutcast_active', intval($uid), true); return true; diff --git a/modules/localplay/vlc.controller.php b/modules/localplay/vlc.controller.php index a99aba79..28e99292 100644 --- a/modules/localplay/vlc.controller.php +++ b/modules/localplay/vlc.controller.php @@ -269,7 +269,7 @@ class AmpacheVlc extends localplay_controller { $user_id = $user_id ? $user_id : $GLOBALS['user']->id; Preference::update('vlc_active',$user_id,intval($uid)); - Config::set('vlc_active',intval($uid),'1'); + Config::set('vlc_active', intval($uid), true); return true; diff --git a/server/stream.ajax.php b/server/stream.ajax.php index e217a996..394e6fbf 100644 --- a/server/stream.ajax.php +++ b/server/stream.ajax.php @@ -64,7 +64,7 @@ switch ($_REQUEST['action']) { // Go ahead and update their preference if (Preference::update('play_type',$GLOBALS['user']->id,$new)) { - Config::set('play_type',$new,'1'); + Config::set('play_type', $new, true); } @@ -156,7 +156,7 @@ switch ($_REQUEST['method']) { case 'democratic': // Don't let them loop it if (Config::get('play_type') == 'democratic') { - Config::set('play_type','stream','1'); + Config::set('play_type', 'stream', true); } default: if (Config::get('play_type') == 'stream') { diff --git a/templates/list_header.inc.php b/templates/list_header.inc.php index 2ace6f0e..26366a18 100644 --- a/templates/list_header.inc.php +++ b/templates/list_header.inc.php @@ -41,7 +41,7 @@ $uid = Config::get('list_header_uid'); $sides = 5; // ++ the uid -Config::set('list_header_uid', $uid + 1, 1); +Config::set('list_header_uid', $uid + 1, true); // Next $next_offset = $start + $limit; |