本文整理汇总了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;
}