getDB(); $start = $page*$pagesize; $sql = 'SELECT * FROM '.$db->escapeTableName(self::GALLERYTABLE); $sql .= ' WHERE site_id=? AND instance=? ORDER BY gallerydate DESC'; return $db->getObjectListP($sql,array($site,$instance),'\\MCMS\\_\\Modx\\MCMS\\Gallery\\_\\Model\\Gallery',array(),-1,0); } public static function removeGallery(Gallery $gallery) { $db = System::getInstance()->getDB(); $db->isTransactionSupported() and $db->startTransaction(); $db->table(self::GALLERYTABLE)->delete(array('id' => $gallery->id)); $db->table(self::PICTABLE)->delete(array('gallery_id' => $gallery->id)); $db->isTransactionSupported() and $db->commit(); } public static function storePic(Gallery $gallery,PicInfo $info,$data) { $db = System::getInstance()->getDB(); $db->isTransactionSupported() and $db->startTransaction(); $gid = $gallery->id; $db->isTransactionSupported() and $db->commit(); } public static function updatePicBinData(MMModGalleryPicInfo $info,$data) { $db = System::getInstance()->getDB(); // TODO: Implement } public static function getPicList($gallery,$page,$pageSize) { $db = System::getInstance()->getDB(); // TODO: Implement } public static function getPicInfo($picId) { $db = System::getInstance()->getDB(); // TODO: Implement } public static function getPicBinData($picId) { $db = System::getInstance()->getDB(); // TODO: Implement } public static function removePic(Gallery $gallery,PicInfo $info) { $db = System::getInstance()->getDB(); // TODO: Implement } }