Esempio n. 1
0
////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$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                                                                   *