本文整理匯總了PHP中Gallery::garbageCollect方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gallery::garbageCollect方法的具體用法?PHP Gallery::garbageCollect怎麽用?PHP Gallery::garbageCollect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Gallery
的用法示例。
在下文中一共展示了Gallery::garbageCollect方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: gettext
<p>
<?php
$plugins = array_keys($plugins);
natcasesort($plugins);
echo gettext('Plugin setup:') . '<br />';
foreach ($plugins as $extension) {
?>
<span>
<img src="<?php
echo FULLWEBPATH . '/' . ZENFOLDER . '/setup/setup_pluginOptions.php?plugin=' . $extension;
?>
" title="<?php
echo $extension;
?>
" alt="<?php
echo $extension;
?>
" height="16px" width="16px" />
</span>
<?php
}
?>
</p>
<?php
$_zp_gallery->garbageCollect();
if (extensionEnabled('auto_backup')) {
//Run the backup since for sure things have changed.
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/auto_backup.php';
auto_backup::timer_handler('');
}
示例2: dirname
require_once dirname(__FILE__) . '/admin-globals.php';
require_once dirname(__FILE__) . '/template-functions.php';
if (isset($_REQUEST['album'])) {
$localrights = ALBUM_RIGHTS;
} else {
$localrights = NULL;
}
admin_securityChecks($localrights, $return = currentRelativeURL(__FILE__));
XSRFdefender('refresh');
$gallery = new Gallery();
$imageid = '';
if (isset($_GET['refresh'])) {
if (isset($_GET['id'])) {
$imageid = sanitize_numeric($_GET['id']);
}
$imageid = $gallery->garbageCollect(true, true, $imageid);
}
if (isset($_GET['prune'])) {
$type = 'prune&';
$title = gettext('Refresh Database');
$finished = gettext('Finished refreshing the database');
$incomplete = gettext('Database refresh is incomplete');
$allset = gettext("We're all set to refresh the database");
$continue = gettext('Continue refreshing the database.');
} else {
$type = '';
$title = gettext('Refresh Metadata');
$finished = gettext('Finished refreshing the metadata');
$incomplete = gettext('Metadata refresh is incomplete');
$allset = gettext("We're all set to refresh the metadata");
$continue = gettext('Continue refreshing the metadata.');
示例3: gallerystats_filesize_r
* @package admin
*/
define('OFFSET_PATH', 3);
chdir(dirname(dirname(__FILE__)));
require_once dirname(dirname(__FILE__)) . '/admin-globals.php';
require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/image_album_statistics.php';
if (getOption('zp_plugin_zenpage')) {
require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/zenpage/zenpage-admin-functions.php';
}
$button_text = gettext('Gallery Statistics');
$button_hint = gettext('Shows statistical graphs and info about your gallery\'s images and albums.');
$button_icon = 'images/bar_graph.png';
$button_rights = OVERVIEW_RIGHTS;
admin_securityChecks(OVERVIEW_RIGHTS, currentRelativeURL(__FILE__));
$gallery = new Gallery();
$gallery->garbageCollect();
$webpath = WEBPATH . '/' . ZENFOLDER . '/';
printAdminHeader(gettext('utilities'), gettext('statistics'));
?>
<link rel="stylesheet" href="../admin-statistics.css" type="text/css" media="screen" />
<?php
/*
* http://php.net/manual/de/function.filesize.php
*
* @author Jonas Sweden
*/
function gallerystats_filesize_r($path)
{
if (!file_exists($path)) {
return 0;
}
示例4: setupLog
}
// set defaults on any options that need it
setupLog("Done with database creation and update");
$prevRel = getOption('zenphoto_release');
setupLog("Previous Release was {$prevRel}");
$gallery = new Gallery();
require dirname(__FILE__) . '/setup-option-defaults.php';
// 1.1.6 special cleanup section for plugins
$badplugs = array('exifimagerotate.php', 'flip_image.php', 'image_mirror.php', 'image_rotate.php', 'supergallery-functions.php');
foreach ($badplugs as $plug) {
$path = SERVERPATH . '/' . ZENFOLDER . '/plugins/' . $plug;
@unlink($path);
}
if ($prevRel < 1690) {
// cleanup root album DB records
$gallery->garbageCollect(true, true);
}
// 1.1.7 conversion to the theme option tables
$albums = $gallery->getAlbums();
foreach ($albums as $albumname) {
$album = new Album($gallery, $albumname);
$theme = $album->getAlbumTheme();
if (!empty($theme)) {
$tbl = prefix(getOptionTableName($album->name));
$sql = "SELECT `name`,`value` FROM " . $tbl;
$result = query_full_array($sql, true);
if (is_array($result)) {
foreach ($result as $row) {
setThemeOption($album, $row['name'], $row['value']);
}
}