/** * 删除商品品牌 * * @author Hyber * @param string $conditions * @param string $fields * @return void */ function drop($conditions, $fields = '') { $droped_rows = parent::drop($conditions, $fields); if ($droped_rows) { restore_error_handler(); reset_error_handler(); } return $droped_rows; }
function drop($file_id) { $files = $this->find($file_id); foreach ($files as $file) { $file_path = ROOT_PATH . '/' . $file['file_path']; file_exists($file_path) && unlink($file_path); } return parent::drop($file_id); }
function drop($conditions, $fields = 'portrait') { if ($droped_rows = parent::drop($conditions, $fields)) { restore_error_handler(); $droped_data = $this->getDroppedData(); foreach ($droped_data as $row) { $row['portrait'] && @unlink(ROOT_PATH . '/' . $row['portrait']); } reset_error_handler(); } return $droped_rows; }
/** * 删除友情链接 * * @author Garbin * @param string $conditions * @param string $fields * @return void */ function drop($conditions, $fields = 'logo') { $droped_rows = parent::drop($conditions, $fields); if ($droped_rows) { restore_error_handler(); $droped_data = $this->getDroppedData(); foreach ($droped_data as $key => $value) { if ($value['logo']) { @unlink(ROOT_PATH . '/' . $value['logo']); //删除Logo文件 } } reset_error_handler(); } return $droped_rows; }
function drop($conditions, $fields = '') { /* 清除缓存 */ $goods_list = $this->find(array('fields' => 'goods_id', 'conditions' => $conditions)); foreach ($goods_list as $goods) { $this->clear_cache($goods['goods_id']); } /* 清除店铺商品数缓存 */ $cache_server =& cache_server(); $cache_server->delete('goods_count_of_store'); return parent::drop($conditions, $fields); }
function drop($conditions, $fields = '') { /* 清除缓存 */ $store_list = $this->find(array('fields' => 'store_id', 'conditions' => $conditions)); foreach ($store_list as $store) { $this->clear_cache($store['store_id']); } return parent::drop($conditions, $fields); }
function drop($conditions, $fields = '') { $this->clear_cache(); return parent::drop($conditions, $fields); }