diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-12 05:30:30 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-12 05:30:30 +0000 |
commit | 7be9eb4ea1e868fa0725334697057e1b7b994460 (patch) | |
tree | 5d4c634f2d64f2202cad95b4ce74c87838655e3d /lib/class | |
parent | 12f679cf51ed9440c44cdc0cb178687f0ad17c3b (diff) | |
download | ampache-7be9eb4ea1e868fa0725334697057e1b7b994460.tar.gz ampache-7be9eb4ea1e868fa0725334697057e1b7b994460.tar.bz2 ampache-7be9eb4ea1e868fa0725334697057e1b7b994460.zip |
re-added ability to delete catalogs, fixed exception error with id3 library
Diffstat (limited to 'lib/class')
-rw-r--r-- | lib/class/catalog.class.php | 14 | ||||
-rwxr-xr-x | lib/class/vainfo.class.php | 7 |
2 files changed, 14 insertions, 7 deletions
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index c25d9c3f..7e598e00 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -105,7 +105,7 @@ class Catalog { public static function get_catalog_ids() { $sql = "SELECT `id` FROM `catalog`"; - $db_results = Dba::qery($sql); + $db_results = Dba::query($sql); while ($r = Dba::fetch_assoc($db_results)) { $results[] = $r['id']; @@ -2061,20 +2061,22 @@ class Catalog { /** * delete * Deletes the catalog and everything assoicated with it - * assumes $this + * it takes the catalog id */ - public static function delete() { + public static function delete($catalog_id) { + + $catalog_id = Dba::escape($catalog_id); // First remove the songs in this catalog - $sql = "DELETE FROM `song` WHERE `catalog` = '$this->id'"; + $sql = "DELETE FROM `song` WHERE `catalog` = '$catalog_id'"; $db_results = Dba::query($sql); // Next Remove the Catalog Entry it's self - $sql = "DELETE FROM `catalog` WHERE `id` = '$this->id'"; + $sql = "DELETE FROM `catalog` WHERE `id` = '$catalog_id'"; $db_results = Dba::query($sql); // Run the Aritst/Album Cleaners... - self::clean($this->id); + self::clean($catalog_id); } // delete diff --git a/lib/class/vainfo.class.php b/lib/class/vainfo.class.php index e2212838..85b12659 100755 --- a/lib/class/vainfo.class.php +++ b/lib/class/vainfo.class.php @@ -88,7 +88,12 @@ class vainfo { function get_info() { /* Get the Raw file information */ - $this->_raw = $this->_getID3->analyze($this->filename); + try { + $this->_raw = $this->_getID3->analyze($this->filename); + } + catch (Exception $error) { + debug_event('getid3',$e->message,'1'); + } /* Figure out what type of file we are dealing with */ $this->type = $this->_get_type(); |