本文整理汇总了PHP中gallery::cleanUpIndexes方法的典型用法代码示例。如果您正苦于以下问题:PHP gallery::cleanUpIndexes方法的具体用法?PHP gallery::cleanUpIndexes怎么用?PHP gallery::cleanUpIndexes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gallery
的用法示例。
在下文中一共展示了gallery::cleanUpIndexes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gallery
$gallery = new gallery();
if (!empty($_POST['rebuild'])) {
$save = false;
if (!empty($_POST['scanfornew'])) {
$gallery->scanForNewImages();
rcms_showAdminMessage(__('Scan for new uploaded images') . '... ' . __('Done'));
$save = true;
}
if (!empty($_POST['cleanupdirs'])) {
$gallery->cleanUpDirectories();
rcms_showAdminMessage(__('Directories cleanup from images not listed in index') . '... ' . __('Done'));
$save = true;
}
if (!empty($_POST['cleanup'])) {
$gallery->scanForRemovedImages();
$gallery->cleanUpIndexes();
rcms_showAdminMessage(__('Indexes cleanup') . '... ' . __('Done'));
$save = true;
}
if ($save) {
$gallery->saveIndexFiles();
}
}
/******************************************************************************
* Interface *
******************************************************************************/
$frm = new InputForm('', 'post', __('Rebuild index'));
$frm->addbreak(__('Indexes management'));
$frm->hidden('rebuild', '1');
$frm->addrow(__('Scan for new uploaded images'), $frm->checkbox('scanfornew', '1', '', 1));
$frm->addrow(__('Directories cleanup from images not listed in index'), $frm->checkbox('cleanupdirs', '1', '', 1));