diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-09-09 04:30:12 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-09-09 04:30:12 +0000 |
commit | 83815169ceb211d4449928b21c02539795f81624 (patch) | |
tree | aaaba2fda75b216c456ce99fd07aa3c98fbd1c24 /lib | |
parent | b33aa8aec67006e641f2054e01b35a0bba316922 (diff) | |
download | ampache-83815169ceb211d4449928b21c02539795f81624.tar.gz ampache-83815169ceb211d4449928b21c02539795f81624.tar.bz2 ampache-83815169ceb211d4449928b21c02539795f81624.zip |
fixed some +x stuff that shouldnt have been +x and moved the catalog functions back into the content area
Diffstat (limited to 'lib')
-rw-r--r-- | lib/class/browse.class.php | 6 | ||||
-rw-r--r-- | lib/class/catalog.class.php | 24 | ||||
-rw-r--r--[-rwxr-xr-x] | lib/class/vainfo.class.php | 0 |
3 files changed, 27 insertions, 3 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php index 0cc75d31..b7a54757 100644 --- a/lib/class/browse.class.php +++ b/lib/class/browse.class.php @@ -101,6 +101,7 @@ class Browse { case 'user': case 'playlist': case 'song': + case 'catalog': case 'album': case 'artist': case 'genre': @@ -474,6 +475,11 @@ class Browse { require_once Config::get('prefix') . '/templates/show_playlists.inc.php'; show_box_bottom(); break; + case 'catalog': + show_box_top(_('Catalogs')); + require_once Config::get('prefix') . '/templates/show_catalogs.inc.php'; + show_box_bottom(); + break; default: // Rien a faire break; diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 6f03e296..e4aa43a2 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -82,16 +82,34 @@ class Catalog { } // _get_info /** + * format + * This makes the object human readable + */ + public function format() { + + $this->f_name = truncate_with_ellipsis($this->name,Config::get('ellipse_threshold_title')); + $this->f_name_link = '<a href="' . Config::get('web_path') . '/admin/catalog.php?action=show_customize_catalog&catalog_id=' . $this->id . '" title="' . scrub_out($this->name) . '">' . scrub_out($this->f_name) . '</a>'; + $this->f_path = truncate_with_ellipsis($this->path,Config::get('ellipse_threshold_title')); + $this->f_update = date('d/m/Y h:i',$this->last_update); + $this->f_add = date('d/m/Y h:i',$this->last_add); + + + } // format + + /** * get_catalogs - *Pull all the current catalogs + * Pull all the current catalogs and return an array of ids + * of what you find */ public static function get_catalogs() { $sql = "SELECT `id` FROM `catalog`"; $db_results = Dba::query($sql); - while ($r = Dba::fetch_assoc($db_results)) { - $results[] = new Catalog($r['id']); + $results = array(); + + while ($row = Dba::fetch_assoc($db_results)) { + $results[] = $row['id']; } return $results; diff --git a/lib/class/vainfo.class.php b/lib/class/vainfo.class.php index 34447277..34447277 100755..100644 --- a/lib/class/vainfo.class.php +++ b/lib/class/vainfo.class.php |