diff options
Diffstat (limited to 'apps/media/lib/share')
-rw-r--r-- | apps/media/lib/share/artist.php | 6 | ||||
-rw-r--r-- | apps/media/lib/share/song.php | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/media/lib/share/artist.php b/apps/media/lib/share/artist.php index 7218fa1a279..d08a53da2a7 100644 --- a/apps/media/lib/share/artist.php +++ b/apps/media/lib/share/artist.php @@ -22,7 +22,7 @@ class OC_Share_Backend_Artist extends OCP\Share_Backend { public function getSource($item, $uid) { - $query = OCP\DB::prepare('SELECT artist_id FROM *PREFIX*media_artists WHERE artist_id = ? AND song_user = ?'); + $query = OCP\DB::prepare('SELECT `artist_id` FROM `*PREFIX*media_artists` WHERE `artist_id` = ? AND `song_user` = ?'); $result = $query->execute(array($item, $uid))->fetchRow(); if (is_array($result)) { return array('item' => $item, 'file' => $result['song_path']); @@ -43,10 +43,10 @@ class OC_Share_Backend_Artist extends OCP\Share_Backend { $ids = "'".implode("','", $ids)."'"; switch ($format) { case self::FORMAT_SOURCE_PATH: - $query = OCP\DB::prepare('SELECT path FROM *PREFIX*fscache WHERE id IN ('.$ids.')'); + $query = OCP\DB::prepare('SELECT `path` FROM `*PREFIX*fscache` WHERE `id` IN ('.$ids.')'); return $query->execute()->fetchAll(); case self::FORMAT_FILE_APP: - $query = OCP\DB::prepare('SELECT id, path, name, ctime, mtime, mimetype, size, encrypted, versioned, writable FROM *PREFIX*fscache WHERE id IN ('.$ids.')'); + $query = OCP\DB::prepare('SELECT `id`, `path`, `name`, `ctime`, `mtime`, `mimetype`, `size`, `encrypted`, `versioned`, `writable` FROM `*PREFIX*fscache` WHERE `id` IN ('.$ids.')'); $result = $query->execute(); $files = array(); while ($file = $result->fetchRow()) { diff --git a/apps/media/lib/share/song.php b/apps/media/lib/share/song.php index fc69975f353..65948581738 100644 --- a/apps/media/lib/share/song.php +++ b/apps/media/lib/share/song.php @@ -22,7 +22,7 @@ class OC_Share_Backend_Song extends OCP\Share_Backend { public function getSource($item, $uid) { - $query = OCP\DB::prepare('SELECT song_path FROM *PREFIX*media_songs WHERE song_id = ? AND song_user = ?'); + $query = OCP\DB::prepare('SELECT `song_path` FROM `*PREFIX*media_songs` WHERE `song_id` = ? AND `song_user` = ?'); $result = $query->execute(array($item, $uid))->fetchRow(); if (is_array($result)) { return array('item' => $item, 'file' => $result['song_path']); @@ -43,10 +43,10 @@ class OC_Share_Backend_Song extends OCP\Share_Backend { $ids = "'".implode("','", $ids)."'"; switch ($format) { case self::FORMAT_SOURCE_PATH: - $query = OCP\DB::prepare('SELECT path FROM *PREFIX*fscache WHERE id IN ('.$ids.')'); + $query = OCP\DB::prepare('SELECT `path` FROM `*PREFIX*fscache` WHERE `id` IN ('.$ids.')'); return $query->execute()->fetchAll(); case self::FORMAT_FILE_APP: - $query = OCP\DB::prepare('SELECT id, path, name, ctime, mtime, mimetype, size, encrypted, versioned, writable FROM *PREFIX*fscache WHERE id IN ('.$ids.')'); + $query = OCP\DB::prepare('SELECT `id`, `path`, `name`, `ctime`, `mtime`, `mimetype`, `size`, `encrypted`, `versioned`, `writable` FROM `*PREFIX*fscache` WHERE `id` IN ('.$ids.')'); $result = $query->execute(); $files = array(); while ($file = $result->fetchRow()) { |