public function sort() { $oImage = new Catalog_Image(); $oImage->updateSorting($this->show->itemID, $this->post['Sorting']); exit; }
public function delete($itemIDs) { if (!is_array($itemIDs)) { $itemIDs = array($itemIDs); } $db = MySQL::getInstance(); $db->query('SELECT `Image` FROM `catalog` WHERE ItemID IN (' . implode(',', $db->escape($itemIDs)) . ')'); while ($fileName = $db->fetchField()) { // File::delete($fileName, 'var/catalog/'); // File::delete('thumb_' . $fileName, 'var/catalog/'); File::delete($fileName, 'var/catalog/'); File::delete($fileName, 'var/catalog/tmb/'); } $db->query('DELETE FROM `catalog` WHERE ItemID IN (' . implode(',', $db->escape($itemIDs)) . ')'); $oImage = new Catalog_Image(); $oImage->deleteByItemID($itemIDs); return true; }