diff --git a/browse.php b/browse.php index e7d105a4..656bba80 100644 --- a/browse.php +++ b/browse.php @@ -64,7 +64,11 @@ switch($_REQUEST['action']) { Browse::save_objects(Tag::get_tags(Config::get('offset_limit'),array())); $keys = array_keys(Browse::get_saved()); Tag::build_cache($keys); - Browse::show_objects(); + $object_ids = Browse::get_saved(); + show_box_top(_('Tag Cloud'),$class); + require_once Config::get('prefix') . '/templates/show_tagcloud.inc.php'; + show_box_bottom(); + require_once Config::get('prefix') . '/templates/browse_content.inc.php'; break; case 'artist': Browse::set_sort('name','ASC'); diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 78d48e5c..643f0213 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,7 @@ -------------------------------------------------------------------------- v.3.6-Alpha1 + - Fix the url to song function - Add full path to the files needed by the installation just to make it a little clearer - Fixed potential endless loop with malformed genre tags in mp3s diff --git a/lib/class/song.class.php b/lib/class/song.class.php index d0311112..9f5259ef 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -887,7 +887,7 @@ class Song extends database_object implements media { // We only care about the question mark stuff $query = parse_url($url,PHP_URL_QUERY); - $elements = explode("&",unhtmlentities($query)); + $elements = explode("&",$query); foreach ($elements as $items) { list($key,$value) = explode("=",$items); diff --git a/lib/class/xmldata.class.php b/lib/class/xmldata.class.php index 5fa58e71..b1b97264 100644 --- a/lib/class/xmldata.class.php +++ b/lib/class/xmldata.class.php @@ -339,6 +339,9 @@ class xmlData { // Foreach the ids! foreach ($songs as $song_id) { $song = new Song($song_id); + + // If the song id is invalid/null + if (!$song->id) { continue; } $song->format(); $tag_string = ''; diff --git a/server/tag.ajax.php b/server/tag.ajax.php index 51d86c80..af7ebfe3 100644 --- a/server/tag.ajax.php +++ b/server/tag.ajax.php @@ -35,6 +35,17 @@ switch ($_REQUEST['action']) { $tag = new Tag($_REQUEST['tag_id']); $tag->remove_map($_REQUEST['type'],$_REQUEST['object_id']); break; + case 'browse_type': + Browse::set_type('tag'); + Browse::set_filter('object_type',$_REQUEST['type']) + break; + case 'add_filter': + + // Set browse method + Browse::set_type('tag'); + + // Retrive current objects of type based on combined filters + break; default: $results['rfc3514'] = '0x1'; break; diff --git a/server/xml.server.php b/server/xml.server.php index bbe3cab2..9806eaae 100644 --- a/server/xml.server.php +++ b/server/xml.server.php @@ -251,9 +251,11 @@ switch ($_REQUEST['action']) { echo xmlData::songs(array($uid)); break; case 'url_to_song': - $url = scrub_in($_REQUEST['url']); + // Don't scrub in we need to give her raw and juicy to the function + $url = $_REQUEST['url']; $song_id = Song::parse_song_url($url); + ob_end_clean(); echo xmlData::songs(array($song_id)); break; diff --git a/templates/browse_content.inc.php b/templates/browse_content.inc.php new file mode 100644 index 00000000..e7dd3a31 --- /dev/null +++ b/templates/browse_content.inc.php @@ -0,0 +1,25 @@ + + + + diff --git a/templates/show_tagcloud.inc.php b/templates/show_tagcloud.inc.php index 56831589..0f6d6e24 100644 --- a/templates/show_tagcloud.inc.php +++ b/templates/show_tagcloud.inc.php @@ -27,6 +27,6 @@ $web_path = Config::get('web_path'); $tag->format(); ?> name; ?> -id),'click',Ajax::action('?page=browse&action=toggle_tag&tag_id=' . intval($tag->id),'')); ?> +id),'click',Ajax::action('?page=tag&action=add_filter&tag_id=' . intval($tag->id),'')); ?> diff --git a/templates/sidebar_home.inc.php b/templates/sidebar_home.inc.php index a3b7891d..7bcd65af 100644 --- a/templates/sidebar_home.inc.php +++ b/templates/sidebar_home.inc.php @@ -32,7 +32,7 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
  • - +
  • @@ -70,15 +70,16 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); - + + />
    - +
    - +
    - +