summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/song.class.php2
-rw-r--r--lib/class/user.class.php8
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index 0ad9af68..8a9a6637 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -888,9 +888,9 @@ class Song {
// Find the target for this transcode
$conf_type = 'transcode_' . $this->type . '_target';
+ $stream_cmd = 'transcode_cmd_' . $this->type;
$this->format_type(Config::get($conf_type));
- $stream_cmd = 'transcode_cmd_' . $this->type;
if (Config::get($stream_cmd)) {
return $stream_cmd;
}
diff --git a/lib/class/user.class.php b/lib/class/user.class.php
index 1fa24adb..97477ae7 100644
--- a/lib/class/user.class.php
+++ b/lib/class/user.class.php
@@ -137,11 +137,11 @@ class User {
// Fill out the user id
$user_id = $user_id ? Dba::escape($user_id) : Dba::escape($this->id);
- if (!Config::get('use_auth')) { $user_id = '-1'; }
-
if ($user_id != '-1') {
$user_limit = "AND preference.catagory != 'system'";
}
+
+ if (!Config::get('use_auth')) { $user_id = '-1'; }
if ($type != '0') {
$user_limit = "AND preference.catagory = '" . Dba::escape($type) . "'";
@@ -173,7 +173,9 @@ class User {
*/
public function set_preferences() {
- $sql = "SELECT preference.name,user_preference.value FROM preference,user_preference WHERE user_preference.user='$this->id' " .
+ $user_id = Dba::escape($this->id);
+
+ $sql = "SELECT preference.name,user_preference.value FROM preference,user_preference WHERE user_preference.user='$user_id'" .
"AND user_preference.preference=preference.id AND preference.type != 'system'";
$db_results = Dba::query($sql);