diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-05-14 07:12:15 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-05-14 07:12:15 +0000 |
commit | 641e7de6373bcbf7ffb5ac3a8b737fb31f4f33c7 (patch) | |
tree | 66d335c53b446971aeee36de7a2ba9e6504a302b /lib/ui.lib.php | |
parent | 779f4bf4e560d7f415ea51a96ed547831745a8dc (diff) | |
download | ampache-641e7de6373bcbf7ffb5ac3a8b737fb31f4f33c7.tar.gz ampache-641e7de6373bcbf7ffb5ac3a8b737fb31f4f33c7.tar.bz2 ampache-641e7de6373bcbf7ffb5ac3a8b737fb31f4f33c7.zip |
catalog build technically works now, still working out some issues with the dynamic updating of the current state
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r-- | lib/ui.lib.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 0310f6df..3a7d3f7e 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -493,13 +493,12 @@ function show_local_catalog_info() { /* Before we display anything make sure that they have a catalog */ $query = "SELECT * FROM catalog"; $db_results = Dba::query($query); - + // Make sure we have something to display - if (!Dba::num_rows($db_results)) { + if (Dba::num_rows($db_results) < 1) { show_box_top(); - $items[] = "<span align=\"center\" class=\"error\">" . _('No Catalogs Found!') . "</span><br />"; - $items[] = "<a href=\"" . Config::get('web_path') . "/admin/catalog.php?action=show_add_catalog\">" ._('Add a Catalog') . "</a>"; - show_info_box('','catalog',$items); + echo "<span align=\"center\" class=\"error\">" . _('No Catalogs Found!') . "</span><br />"; + echo "<a href=\"" . Config::get('web_path') . "/admin/catalog.php?action=show_add_catalog\">" ._('Add a Catalog') . "</a>"; show_box_bottom(); return false; } @@ -1196,11 +1195,13 @@ function show_box_bottom() { * this function takes a name and a returns either a text representation * or an <img /> tag */ -function get_user_icon($name,$hover_name='') { +function get_user_icon($name,$hover_name='',$title='') { /* Because we do a lot of calls cache the URLs */ static $url_cache = array(); + if (!$title) { $title = $name; } + if (isset($url_cache[$name])) { $img_url = $url_cache[$name]; $cache_url = true; @@ -1239,7 +1240,7 @@ function get_user_icon($name,$hover_name='') { } // end if not cached - $string = "<img style=\"cursor: pointer;\" src=\"$img_url\" border=\"0\" alt=\"" . ucfirst($name) . "\" title=\"" . ucfirst($name) . "\" $hov_txt/>"; + $string = "<img style=\"cursor: pointer;\" src=\"$img_url\" border=\"0\" alt=\"" . ucfirst($title) . "\" title=\"" . ucfirst($title) . "\" $hov_txt/>"; return $string; |