本文整理匯總了PHP中cmsActions::removeTargetLog方法的典型用法代碼示例。如果您正苦於以下問題:PHP cmsActions::removeTargetLog方法的具體用法?PHP cmsActions::removeTargetLog怎麽用?PHP cmsActions::removeTargetLog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cmsActions
的用法示例。
在下文中一共展示了cmsActions::removeTargetLog方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: deleteAlbum
/**
* Удаляет альбом
* @param int $album_id
* @param str $differ
* @param obj $inUploadPhoto
* @return bool
*/
public function deleteAlbum($album_id, $differ = '', $inUploadPhoto) {
$album = cmsCore::c('db')->getNsCategory('cms_photo_albums', $album_id, $differ);
if(!$album) { return false; }
cmsCore::callEvent('DELETE_ALBUM', $album_id);
//устанавливаем нужный альбом и все вложенные
$this->whereThisAndNestedCats($album['NSLeft'], $album['NSRight']);
cmsCore::c('db')->addJoin("INNER JOIN cms_photo_albums a ON a.id = f.album_id AND a.NSDiffer = '{$differ}'");
$photos = $this->getPhotos(true);
if ($photos){
foreach($photos as $photo){
$this->deletePhoto($photo, $inUploadPhoto);
}
}
cmsCore::deleteComments($this->getTarget('comments_album'), $album_id);
cmsActions::removeTargetLog($this->getTarget('actions_photo'), $album_id);
return cmsCore::c('db')->deleteNS('cms_photo_albums', $album_id, $differ);
}
示例2: deletePhotoAlbum
public function deletePhotoAlbum($user_id, $album_id) {
$photos = $this->getAlbumPhotos($user_id, 'private', $album_id);
if ($photos){
foreach($photos as $photo){
$this->deletePhoto($photo['id']);
}
}
cmsActions::removeTargetLog('add_user_photo_multi', $album_id);
$this->inDB->query("DELETE FROM cms_user_albums WHERE id = '$album_id'") ;
return true;
}