diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-06-22 16:27:35 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-06-22 16:27:35 +0000 |
commit | 328da9378b3350602445b48fbe4976b8f55476bb (patch) | |
tree | ff0666f15c291c57d24738a81046bcc5e568f9b0 /lib | |
parent | 8371bcafe75ec3427530c378f2ff2600c91dc56a (diff) | |
download | ampache-328da9378b3350602445b48fbe4976b8f55476bb.tar.gz ampache-328da9378b3350602445b48fbe4976b8f55476bb.tar.bz2 ampache-328da9378b3350602445b48fbe4976b8f55476bb.zip |
fixed keyword searches
Diffstat (limited to 'lib')
-rw-r--r-- | lib/general.lib.php | 23 | ||||
-rw-r--r-- | lib/init.php | 2 |
2 files changed, 12 insertions, 13 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php index b8e8d1e8..c3c1e061 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -596,13 +596,12 @@ function cleanup_and_exit($playing_id) { */ function get_global_popular($type) { - $dbh = dbh(); - + /* Select out the most popular based on object_count */ $sql = "SELECT object_id, SUM(count) as count FROM object_count" . " WHERE object_type = '$type'" . " GROUP BY object_id" . " ORDER BY count DESC LIMIT " . conf('popular_threshold'); - $db_result = mysql_query($sql, $dbh); + $db_result = mysql_query($sql,dbh()); $items = array(); $web_path = conf('web_path'); @@ -614,33 +613,33 @@ function get_global_popular($type) { $artist = $song->get_artist_name(); $text = "$artist - $song->title"; /* Add to array */ - $items[] = "<li> <a href=\"$web_path/song.php?action=single_song&song_id=$song->id\" title=\"". htmlspecialchars($text) ."\">" . - htmlspecialchars(truncate_with_ellipse($text, conf('ellipse_threshold_title')+3)) . " ($r->count)</a> </li>"; + $items[] = "<li> <a href=\"$web_path/song.php?action=single_song&song_id=$song->id\" title=\"". scrub_out($text) ."\">" . + scrub_out(truncate_with_ellipse($text, conf('ellipse_threshold_title')+3)) . " ($r->count)</a> </li>"; } // if it's a song /* If Artist */ elseif ( $type == 'artist' ) { $artist = get_artist_name($r->object_id); - $items[] = "<li> <a href=\"$web_path/artists.php?action=show&artist=$r->object_id\" title=\"". htmlspecialchars($artist) ."\">" . - htmlspecialchars(truncate_with_ellipse($artist, conf('ellipse_threshold_artist')+3)) . " ($r->count)</a> </li>"; + $items[] = "<li> <a href=\"$web_path/artists.php?action=show&artist=$r->object_id\" title=\"". scrub_out($artist) ."\">" . + scrub_out(truncate_with_ellipse($artist, conf('ellipse_threshold_artist')+3)) . " ($r->count)</a> </li>"; } // if type isn't artist /* If Album */ elseif ( $type == 'album' ) { $album = new Album($r->object_id); - $items[] = "<li> <a href=\"$web_path/albums.php?action=show&album=$r->object_id\" title=\"". htmlspecialchars($album->name) ."\">" . - htmlspecialchars(truncate_with_ellipse($album->name,conf('ellipse_threshold_album')+3)) . " ($r->count)</a> </li>"; + $items[] = "<li> <a href=\"$web_path/albums.php?action=show&album=$r->object_id\" title=\"". scrub_out($album->name) ."\">" . + scrub_out(truncate_with_ellipse($album->name,conf('ellipse_threshold_album')+3)) . " ($r->count)</a> </li>"; } // else not album elseif ($type == 'genre') { $genre = new Genre($r->object_id); - $items[] = "<li> <a href=\"$web_path/browse.php?action=genre&genre=$r->object_id\" title=\"" . htmlspecialchars($genre->name) . "\">" . - htmlspecialchars(truncate_with_ellipse($genre->name,conf('ellipse_threshold_title')+3)) . " ($r->count)</a> </li>"; + $items[] = "<li> <a href=\"$web_path/browse.php?action=genre&genre=$r->object_id\" title=\"" . scrub_out($genre->name) . "\">" . + scrub_out(truncate_with_ellipse($genre->name,conf('ellipse_threshold_title')+3)) . " ($r->count)</a> </li>"; } // end if genre } // end while if (count($items) == 0) { - $items[] = "<li style=\"list-style-type: none\"><span class=\"error\">" . _("Not Enough Data") . "</span></li>\n"; + $items[] = "<li style=\"list-style-type: none\"><span class=\"error\">" . _('Not Enough Data') . "</span></li>\n"; } return $items; diff --git a/lib/init.php b/lib/init.php index 45d71625..9fbf8e6f 100644 --- a/lib/init.php +++ b/lib/init.php @@ -80,7 +80,7 @@ if (!$results['allow_stream_playback']) { /** This is the version.... fluf nothing more... **/ -$results['version'] = '3.3.2-Beta3'; +$results['version'] = '3.3.2 Build (001)'; $results['raw_web_path'] = $results['web_path']; $results['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path']; |