本文整理汇总了PHP中Attachments::deleteAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Attachments::deleteAll方法的具体用法?PHP Attachments::deleteAll怎么用?PHP Attachments::deleteAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attachments
的用法示例。
在下文中一共展示了Attachments::deleteAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteBackup
private function deleteBackup()
{
if ($this->_realAccessLevel < ACCESS_LEVEL_SA) {
CommonErrors::fatal(COMMONERROR_PERMISSION, $this);
return;
//$this->fatal(ERROR_NO_PERMISSION);
}
$attachments = new Attachments(CATS_ADMIN_SITE);
$attachments->deleteAll(DATA_ITEM_COMPANY, $_SESSION['CATS']->getSiteCompanyID(), "AND content_type = 'catsbackup'");
CATSUtility::transferRelativeURI('m=settings&a=createBackup');
}
示例2: Attachments
$directory = $_SESSION['CATS']->retrieveValueByName('backupDirectory');
@file_put_contents($directory . 'progress.txt', $command);
}
if ($action == 'start')
{
$companyID = $_SESSION['CATS']->getSiteCompanyID();
$attachmentsOnly = $interface->isChecked('attachmentsOnly');
/* Delete any old backups. */
$attachments = new Attachments(CATS_ADMIN_SITE);
$attachments->deleteAll(
DATA_ITEM_COMPANY,
$companyID,
"AND content_type = 'catsbackup'"
);
/* Build title string. */
if ($attachmentsOnly)
{
$title = 'CATS Attachments Backup';
}
else
{
$title = 'CATS Backup';
}
$attachmentCreator = new AttachmentCreator(CATS_ADMIN_SITE);
$attachmentCreator->createFromFile(