diff --git a/browse.php b/browse.php index b802d5b5..bcd87812 100644 --- a/browse.php +++ b/browse.php @@ -59,7 +59,7 @@ switch ($_REQUEST['action']) { break; case 'album': $browse->set_filter('catalog',$_SESSION['catalog']); - $browse->set_filter('catalog_enabled', '1'); + $browse->set_filter('catalog_enabled', '1'); $browse->set_sort('name','ASC'); $browse->show_objects(); break; @@ -83,19 +83,19 @@ switch ($_REQUEST['action']) { break; case 'artist': $browse->set_filter('catalog',$_SESSION['catalog']); - $browse->set_filter('catalog_enabled', '1'); + $browse->set_filter('catalog_enabled', '1'); $browse->set_sort('name','ASC'); $browse->show_objects(); break; case 'song': $browse->set_filter('catalog',$_SESSION['catalog']); - $browse->set_filter('catalog_enabled', '1'); - $browse->set_filter('catalog_enabled', '1'); + $browse->set_filter('catalog_enabled', '1'); + $browse->set_filter('catalog_enabled', '1'); $browse->set_sort('title','ASC'); $browse->show_objects(); break; case 'live_stream': - $browse->set_filter('catalog_enabled', '1'); + $browse->set_filter('catalog_enabled', '1'); $browse->set_sort('name','ASC'); $browse->show_objects(); break; @@ -113,7 +113,7 @@ switch ($_REQUEST['action']) { $browse->show_objects(); break; case 'video': - $browse->set_filter('catalog_enabled', '1'); + $browse->set_filter('catalog_enabled', '1'); $browse->set_sort('title','ASC'); $browse->show_objects(); break; diff --git a/lib/class/album.class.php b/lib/class/album.class.php index b3039bb9..0d6b989c 100644 --- a/lib/class/album.class.php +++ b/lib/class/album.class.php @@ -128,10 +128,10 @@ class Album extends database_object "`artist`.`id` AS `artist_id`, `song`.`album`" . "FROM `song` " . "INNER JOIN `artist` ON `artist`.`id`=`song`.`artist` " . - "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . - "WHERE `song`.`album` IN $idlist " . - "AND `catalog`.`enabled` = '1' " . - "GROUP BY `song`.`album`"; + "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . + "WHERE `song`.`album` IN $idlist " . + "AND `catalog`.`enabled` = '1' " . + "GROUP BY `song`.`album`"; $db_results = Dba::read($sql); @@ -171,9 +171,9 @@ class Album extends database_object "`artist`.`id` AS `artist_id` " . "FROM `song` INNER JOIN `artist` " . "ON `artist`.`id`=`song`.`artist` " . - "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . + "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . "WHERE `song`.`album` = ? " . - "AND `catalog`.`enabled` = '1' " . + "AND `catalog`.`enabled` = '1' " . "GROUP BY `song`.`album`"; $db_results = Dba::read($sql, array($this->id)); @@ -277,14 +277,14 @@ class Album extends database_object $results = array(); $sql = "SELECT `song`.`id` FROM `song` "; - $sql .= "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` "; - $sql .= "WHERE `song`.`album` = ? "; + $sql .= "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` "; + $sql .= "WHERE `song`.`album` = ? "; $params = array($this->id); if (strlen($artist)) { $sql .= "AND `artist` = ? "; $params[] = $artist; } - $sql .= "AND `catalog`.`enabled` = '1' "; + $sql .= "AND `catalog`.`enabled` = '1' "; $sql .= "ORDER BY `song`.`track`, `song`.`title`"; if ($limit) { $sql .= " LIMIT " . intval($limit); @@ -429,7 +429,7 @@ class Album extends database_object } // if updated Tag::update_tag_list($data['edit_tags'], 'album', $current_id); - + return $current_id; } // update @@ -443,16 +443,16 @@ class Album extends database_object { $results = false; - $sql = "SELECT `album`.`id` FROM `album` " . - "LEFT JOIN `song` ON `song`.`album` = `album`.`id` " . - "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` "; - $where = "WHERE `catalog`.`enabled` = '1' "; + $sql = "SELECT `album`.`id` FROM `album` " . + "LEFT JOIN `song` ON `song`.`album` = `album`.`id` " . + "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` "; + $where = "WHERE `catalog`.`enabled` = '1' "; if ($with_art) { $sql .= "LEFT JOIN `image` ON (`image`.`object_type` = 'album' AND `image`.`object_id` = `album`.`id`) "; - $where .="AND `image`.`id` IS NOT NULL "; + $where .="AND `image`.`id` IS NOT NULL "; } - $sql .= $where; + $sql .= $where; $sql .= "ORDER BY RAND() LIMIT " . intval($count); $db_results = Dba::read($sql); diff --git a/lib/class/artist.class.php b/lib/class/artist.class.php index f3708b3e..26349461 100644 --- a/lib/class/artist.class.php +++ b/lib/class/artist.class.php @@ -146,12 +146,12 @@ class Artist extends database_object */ public function get_albums($catalog = null) { - $catalog_where = ""; - $catalog_join = "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`"; + $catalog_where = ""; + $catalog_join = "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`"; if ($catalog) { $catalog_where .= " AND `catalog`.`id` = '$catalog'"; } - $catalog_where .= " AND `catalog`.`enabled` = '1'"; + $catalog_where .= " AND `catalog`.`enabled` = '1'"; $results = array(); @@ -181,7 +181,7 @@ class Artist extends database_object public function get_songs() { $sql = "SELECT `song`.`id` FROM `song` LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . - "WHERE `song`.`artist`='" . Dba::escape($this->id) . "' AND `catalog`.`enabled` = '1' ORDER BY album, track"; + "WHERE `song`.`artist`='" . Dba::escape($this->id) . "' AND `catalog`.`enabled` = '1' ORDER BY album, track"; $db_results = Dba::read($sql); while ($r = Dba::fetch_assoc($db_results)) { @@ -200,8 +200,8 @@ class Artist extends database_object { $results = array(); - $sql = "SELECT `song`.`id` FROM `song` LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . - "WHERE `song`.`artist`='$this->id' AND `catalog`.`enabled` = '1' ORDER BY RAND()"; + $sql = "SELECT `song`.`id` FROM `song` LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . + "WHERE `song`.`artist`='$this->id' AND `catalog`.`enabled` = '1' ORDER BY RAND()"; $db_results = Dba::read($sql); while ($r = Dba::fetch_assoc($db_results)) { @@ -224,11 +224,11 @@ class Artist extends database_object } else { $uid = Dba::escape($this->id); $sql = "SELECT `song`.`artist`,COUNT(`song`.`id`) AS `song_count`, COUNT(DISTINCT `song`.`album`) AS `album_count`, SUM(`song`.`time`) AS `time` FROM `song` LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . - "WHERE `song`.`artist`='$uid' "; + "WHERE `song`.`artist`='$uid' "; if ($catalog) { $sql .= "AND (`song`.`catalog` = '$catalog') "; } - $sql .= " AND `catalog`.`enabled` = '1'"; + $sql .= " AND `catalog`.`enabled` = '1'"; $sql .= "GROUP BY `song`.`artist`"; @@ -409,7 +409,7 @@ class Artist extends database_object Rating::gc(); Userflag::gc(); } // if updated - + Tag::update_tag_list($data['edit_tags'], 'artist', $current_id); return $current_id; diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index eebf0d30..6e68bb5b 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -265,8 +265,8 @@ abstract class Catalog extends database_object return true; } - - /** + + /** * update_enabled * sets the enabled flag */ diff --git a/lib/class/query.class.php b/lib/class/query.class.php index d9f7727d..0ecef8b7 100644 --- a/lib/class/query.class.php +++ b/lib/class/query.class.php @@ -101,7 +101,7 @@ class Query 'exact_match', 'alpha_match', 'catalog', - 'catalog_enabled' + 'catalog_enabled' ), 'artist' => array( 'add_lt', @@ -113,7 +113,7 @@ class Query 'starts_with', 'tag', 'catalog', - 'catalog_enabled' + 'catalog_enabled' ), 'song' => array( 'add_lt', @@ -125,12 +125,12 @@ class Query 'starts_with', 'tag', 'catalog', - 'catalog_enabled' + 'catalog_enabled' ), 'live_stream' => array( 'alpha_match', 'starts_with', - 'catalog_enabled' + 'catalog_enabled' ), 'playlist' => array( 'alpha_match', @@ -321,7 +321,7 @@ class Query case 'add_gt': case 'update_lt': case 'update_gt': - case 'catalog_enabled': + case 'catalog_enabled': $this->_state['filter'][$key] = intval($value); break; case 'exact_match': @@ -769,7 +769,7 @@ class Query { // Only allow it to be set once if (strlen($this->_state['base']) && !$force) { return true; } - + // Custom sql base if ($force && !empty($custom_base)) { $this->_state['custom'] = true; @@ -977,7 +977,7 @@ class Query } $final_sql .= $order_sql . $limit_sql; debug_event("Catalog", "catalog sql: " . $final_sql, "6"); - + return $final_sql; } // get_sql @@ -1074,10 +1074,10 @@ class Query $filter_sql = " `song`.`catalog` = '$value' AND "; } break; - case 'catalog_enabled': - $this->set_join('left', '`catalog`', '`catalog`.`id`', '`song`.`catalog`', 100); - $filter_sql = " `catalog`.`enabled` = '1' AND "; - break; + case 'catalog_enabled': + $this->set_join('left', '`catalog`', '`catalog`.`id`', '`song`.`catalog`', 100); + $filter_sql = " `catalog`.`enabled` = '1' AND "; + break; default: // Rien a faire break; @@ -1114,7 +1114,7 @@ class Query $this->set_join('left','`song`','`album`.`id`','`song`.`album`', 100); $this->set_join('left','`catalog`','`song`.`catalog`','`catalog`.`id`', 100); $filter_sql = " (`song`.`catalog` = '$value') AND "; - } + } break; case 'update_lt': $this->set_join('left', '`song`', '`song`.`album`', '`album`.`id`', 100); @@ -1124,11 +1124,11 @@ class Query $this->set_join('left', '`song`', '`song`.`album`', '`album`.`id`', 100); $filter_sql = " `song`.`update_time` >= '" . Dba::escape($value) . "' AND "; break; - case 'catalog_enabled': - $this->set_join('left', '`song`', '`song`.`album`', '`album`.`id`', 100); - $this->set_join('left', '`catalog`', '`catalog`.`id`', '`song`.`catalog`', 100); - $filter_sql = " `catalog`.`enabled` = '1' AND "; - break; + case 'catalog_enabled': + $this->set_join('left', '`song`', '`song`.`album`', '`album`.`id`', 100); + $this->set_join('left', '`catalog`', '`catalog`.`id`', '`song`.`catalog`', 100); + $filter_sql = " `catalog`.`enabled` = '1' AND "; + break; default: // Rien a faire break; @@ -1172,11 +1172,11 @@ class Query $this->set_join('left', '`song`', '`song`.`artist`', '`artist`.`id`', 100); $filter_sql = " `song`.`update_time` >= '" . Dba::escape($value) . "' AND "; break; - case 'catalog_enabled': - $this->set_join('left', '`song`', '`song`.`artist`', '`artist`.`id`', 100); - $this->set_join('left', '`catalog`', '`catalog`.`id`', '`song`.`catalog`', 100); - $filter_sql = " `catalog`.`enabled` = '1' AND "; - break; + case 'catalog_enabled': + $this->set_join('left', '`song`', '`song`.`artist`', '`artist`.`id`', 100); + $this->set_join('left', '`catalog`', '`catalog`.`id`', '`song`.`catalog`', 100); + $filter_sql = " `catalog`.`enabled` = '1' AND "; + break; default: // Rien a faire break; @@ -1190,10 +1190,10 @@ class Query case 'starts_with': $filter_sql = " `live_stream`.`name` LIKE '" . Dba::escape($value) . "%' AND "; break; - case 'catalog_enabled': - $this->set_join('left', '`catalog`', '`catalog`.`id`', '`live_stream`.`catalog`', 100); - $filter_sql = " `catalog`.`enabled` = '1' AND "; - break; + case 'catalog_enabled': + $this->set_join('left', '`catalog`', '`catalog`.`id`', '`live_stream`.`catalog`', 100); + $filter_sql = " `catalog`.`enabled` = '1' AND "; + break; default: // Rien a faire break; diff --git a/lib/class/random.class.php b/lib/class/random.class.php index 1ada1f62..63e8d720 100644 --- a/lib/class/random.class.php +++ b/lib/class/random.class.php @@ -51,11 +51,11 @@ class Random implements media public static function artist() { $sql = "SELECT `artist`.`id` FROM `artist` " . - "LEFT JOIN `song` ON `song`.`artist` = `artist`.`id` " . - "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . - "WHERE `catalog`.`enabled` = '1' " . - "GROUP BY `artist`.`id` " . - "ORDER BY RAND() LIMIT 1"; + "LEFT JOIN `song` ON `song`.`artist` = `artist`.`id` " . + "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . + "WHERE `catalog`.`enabled` = '1' " . + "GROUP BY `artist`.`id` " . + "ORDER BY RAND() LIMIT 1"; $db_results = Dba::read($sql); $results = Dba::fetch_assoc($db_results); @@ -133,9 +133,9 @@ class Random implements media $results = array(); $sql = "SELECT `song`.`id` FROM `song` " . - "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . - "WHERE `catalog`.`enabled` = '1' " . - "ORDER BY RAND() LIMIT $limit"; + "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . + "WHERE `catalog`.`enabled` = '1' " . + "ORDER BY RAND() LIMIT $limit"; $db_results = Dba::read($sql); while ($row = Dba::fetch_assoc($db_results)) { @@ -162,9 +162,9 @@ class Random implements media } $sql = "SELECT `song`.`id` FROM `song` " . - "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . - "WHERE `catalog`.`enabled` = '1' " . - "$where_sql ORDER BY RAND() LIMIT $limit"; + "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . + "WHERE `catalog`.`enabled` = '1' " . + "$where_sql ORDER BY RAND() LIMIT $limit"; $db_results = Dba::read($sql); while ($row = Dba::fetch_assoc($db_results)) { @@ -190,9 +190,9 @@ class Random implements media } $sql = "SELECT `song`.`id` FROM `song` " . - "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . - "WHERE `catalog`.`enabled` = '1' " . - "$where_sql ORDER BY RAND() LIMIT $limit"; + "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . + "WHERE `catalog`.`enabled` = '1' " . + "$where_sql ORDER BY RAND() LIMIT $limit"; $db_results = Dba::read($sql); while ($row = Dba::fetch_assoc($db_results)) { @@ -234,10 +234,10 @@ class Random implements media "FROM `song` "; if ($search_info) { $sql .= $search_info['table_sql']; - } - $sql .= " LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`"; - $sql .= " WHERE `catalog`.`enabled` = '1'"; - if ($search_info) { + } + $sql .= " LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`"; + $sql .= " WHERE `catalog`.`enabled` = '1'"; + if ($search_info) { $sql .= ' AND ' . $search_info['where_sql']; } break; @@ -248,10 +248,10 @@ class Random implements media } if ($search_info) { $sql .= $search_info['table_sql']; - } - $sql .= " LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`"; - $sql .= " WHERE `catalog`.`enabled` = '1'"; - if ($search_info) { + } + $sql .= " LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`"; + $sql .= " WHERE `catalog`.`enabled` = '1'"; + if ($search_info) { $sql .= ' AND ' . $search_info['where_sql']; } $sql .= ' GROUP BY `album`.`id`'; @@ -263,10 +263,10 @@ class Random implements media } if ($search_info) { $sql .= $search_info['table_sql']; - } - $sql .= " LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`"; - $sql .= " WHERE `catalog`.`enabled` = '1'"; - if ($search_info) { + } + $sql .= " LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`"; + $sql .= " WHERE `catalog`.`enabled` = '1'"; + if ($search_info) { $sql .= ' AND ' . $search_info['where_sql']; } $sql .= ' GROUP BY `artist`.`id`'; diff --git a/lib/class/rating.class.php b/lib/class/rating.class.php index 06636598..88f2953b 100644 --- a/lib/class/rating.class.php +++ b/lib/class/rating.class.php @@ -176,7 +176,7 @@ class Rating extends database_object " GROUP BY object_id ORDER BY `rating` "; return $sql; } - + /** * get_highest * Get objects with the highest average rating. diff --git a/lib/class/search.class.php b/lib/class/search.class.php index 340b1eee..7dbd9518 100644 --- a/lib/class/search.class.php +++ b/lib/class/search.class.php @@ -272,7 +272,7 @@ class Search extends playlist_object ) ); } - + if (Config::get('show_played_times')) { $this->types[] = array( 'name' => 'played_times', diff --git a/lib/class/song.class.php b/lib/class/song.class.php index f96d16c5..79ef7592 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -176,9 +176,9 @@ class Song extends database_object implements media 'FROM `song` LEFT JOIN `tag_map` ' . 'ON `tag_map`.`object_id`=`song`.`id` ' . "AND `tag_map`.`object_type`='song' " . - "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . + "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . "WHERE `song`.`id` IN $idlist " . - "AND `catalog`.`enabled` = '1' "; + "AND `catalog`.`enabled` = '1' "; $db_results = Dba::read($sql); while ($row = Dba::fetch_assoc($db_results)) { diff --git a/lib/class/stats.class.php b/lib/class/stats.class.php index ddfc92df..a41e68d2 100644 --- a/lib/class/stats.class.php +++ b/lib/class/stats.class.php @@ -116,11 +116,11 @@ class Stats $user_id = $user_id ? $user_id : $GLOBALS['user']->id; $sql = "SELECT * FROM `object_count` " . - "LEFT JOIN `song` ON `song`.`id` = `object_count`.`object_id` " . - "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . - "WHERE `object_count`.`user` = ? AND `object_count`.`object_type`='song' " . - "AND `catalog`.`enabled` = '1' " . - "ORDER BY `object_count`.`date` DESC LIMIT 1"; + "LEFT JOIN `song` ON `song`.`id` = `object_count`.`object_id` " . + "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . + "WHERE `object_count`.`user` = ? AND `object_count`.`object_type`='song' " . + "AND `catalog`.`enabled` = '1' " . + "ORDER BY `object_count`.`date` DESC LIMIT 1"; $db_results = Dba::read($sql, array($user_id)); $results = Dba::fetch_assoc($db_results); @@ -139,10 +139,10 @@ class Stats $user_id = $user_id ? $user_id : $GLOBALS['user']->id; $sql = "SELECT * FROM `object_count` " . - "LEFT JOIN `song` ON `song`.`id` = `object_count`.`object_id` " . - "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . - "WHERE `object_count`.`user` = ? AND `object_count`.`object_type`='song' AND `object_count`.`date` >= ? " . - "AND `catalog`.`enabled` = '1' " . + "LEFT JOIN `song` ON `song`.`id` = `object_count`.`object_id` " . + "LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog` " . + "WHERE `object_count`.`user` = ? AND `object_count`.`object_type`='song' AND `object_count`.`date` >= ? " . + "AND `catalog`.`enabled` = '1' " . "ORDER BY `object_count`.`date` DESC"; $db_results = Dba::read($sql, array($user_id, $time)); @@ -155,12 +155,13 @@ class Stats return $results; } // get_object_history - + /** * get_top_sql * This returns the get_top sql */ - public static function get_top_sql($type, $threshold = '') { + public static function get_top_sql($type, $threshold = '') + { $type = self::validate_type($type); /* If they don't pass one, then use the preference */ if (!$threshold) { @@ -299,12 +300,13 @@ class Stats } // end switch } // validate_type - + /** * get_newest_sql * This returns the get_newest sql */ - public static function get_newest_sql($type) { + public static function get_newest_sql($type) + { $type = self::validate_type($type); $sql = "SELECT DISTINCT(`$type`) as `id`, MIN(`addition_time`) AS `real_atime` FROM `song` GROUP BY `$type` ORDER BY `real_atime` "; diff --git a/lib/class/tag.class.php b/lib/class/tag.class.php index 2a4c2ab8..dc6d58d8 100644 --- a/lib/class/tag.class.php +++ b/lib/class/tag.class.php @@ -490,7 +490,7 @@ class Tag extends database_object return $results; } // get_display - + /** * update_tag_list * Update the tags list based on commated list (ex. tag1,tag2,tag3,..) @@ -498,10 +498,10 @@ class Tag extends database_object public static function update_tag_list($tags_comma, $type, $object_id) { debug_event('tag.class', 'Updating tags for values {'.$tags_comma.'} type {'.$type.'} object_id {'.$object_id.'}', '5'); - + $ctags = Tag::get_top_tags($type, $object_id); $editedTags = explode(",", $tags_comma); - + foreach ($ctags as $ctid => $ctv) { $ctag = new Tag($ctid); foreach ($editedTags as $tk => $tv) { @@ -517,14 +517,14 @@ class Tag extends database_object } } } - + // Look if we need to add some new tags foreach ($editedTags as $tk => $tv) { debug_event('tag.class', 'Adding new tag {'.$tv.'}', '5'); Tag::add($type, $object_id, $tv, false); } } // update_tag_list - + /** * count * This returns the count for the all objects associated with this tag diff --git a/lib/class/userflag.class.php b/lib/class/userflag.class.php index 25d87aa4..1cabd22d 100644 --- a/lib/class/userflag.class.php +++ b/lib/class/userflag.class.php @@ -159,13 +159,14 @@ class Userflag extends database_object * get_latest_sql * Get the latest sql */ - public static function get_latest_sql($type, $user_id=null) { + public static function get_latest_sql($type, $user_id=null) + { if (is_null($user_id)) { $user_id = $GLOBALS['user']->id; } $user_id = intval($user_id); $type = Stats::validate_type($type); - + $sql = "SELECT `object_id` as `id` FROM user_flag" . " WHERE object_type = '" . $type . "' AND `user` = '" . $user_id . "'" . " ORDER BY `date` DESC "; diff --git a/server/ajax.server.php b/server/ajax.server.php index 7e796ac9..847994e1 100644 --- a/server/ajax.server.php +++ b/server/ajax.server.php @@ -83,7 +83,7 @@ switch ($page) { case 'index': require_once Config::get('prefix') . '/server/index.ajax.php'; exit; - case 'catalog': + case 'catalog': require_once Config::get('prefix') . '/server/catalog.ajax.php'; exit; break; @@ -165,7 +165,7 @@ switch ($_REQUEST['action']) { $_POST[$key] = unhtmlentities(scrub_in($data)); debug_event('ajax_server', $key.'='.$_POST[$key], '5'); } - + $level = '50'; if ($_POST['type'] == 'playlist_row' || $_POST['type'] == 'playlist_title') { diff --git a/templates/header.inc.php b/templates/header.inc.php index 809d58a7..4bcbcf64 100644 --- a/templates/header.inc.php +++ b/templates/header.inc.php @@ -68,7 +68,7 @@ function forceIframe() $(document).ready(function(){ $("a[rel^='prettyPhoto']").prettyPhoto({social_tools:false}); }); - + // Using the following work-around to set ajex.server.php path available from any javascript script. var jsAjaxUrl = ""; diff --git a/templates/show_catalog_row.inc.php b/templates/show_catalog_row.inc.php index 1166b211..5db3d690 100644 --- a/templates/show_catalog_row.inc.php +++ b/templates/show_catalog_row.inc.php @@ -37,7 +37,7 @@ $button_flip_state_id = 'button_flip_state_' . $catalog->id; | | | - | - id, $icon, T_(ucfirst($icon)),'flip_state_' . $catalog->id); ?> - + | + id, $icon, T_(ucfirst($icon)),'flip_state_' . $catalog->id); ?> + diff --git a/templates/show_edit_album_row.inc.php b/templates/show_edit_album_row.inc.php index df344195..d882b26c 100644 --- a/templates/show_edit_album_row.inc.php +++ b/templates/show_edit_album_row.inc.php @@ -57,4 +57,4 @@ - \ No newline at end of file + diff --git a/templates/show_edit_artist_row.inc.php b/templates/show_edit_artist_row.inc.php index a2cd9faf..6ec1ba34 100644 --- a/templates/show_edit_artist_row.inc.php +++ b/templates/show_edit_artist_row.inc.php @@ -37,4 +37,4 @@ - \ No newline at end of file +