mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-29 04:39:56 +03:00
multisize: remove 2 php warnings, delete custom derivatives (batch man + maintenance), watermark applied to custom derivatives
git-svn-id: http://piwigo.org/svn/trunk@13651 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
bd0cf9cab4
commit
b95925dcaa
5 changed files with 9 additions and 3 deletions
|
@ -677,10 +677,12 @@ foreach(ImageStdParams::get_defined_type_map() as $params)
|
||||||
{
|
{
|
||||||
$del_deriv_map[$params->type] = l10n($params->type);
|
$del_deriv_map[$params->type] = l10n($params->type);
|
||||||
}
|
}
|
||||||
|
$gen_deriv_map = $del_deriv_map;
|
||||||
|
$del_deriv_map[IMG_CUSTOM] = l10n(IMG_CUSTOM);
|
||||||
$template->assign(
|
$template->assign(
|
||||||
array(
|
array(
|
||||||
'del_derivatives_types' => $del_deriv_map,
|
'del_derivatives_types' => $del_deriv_map,
|
||||||
'generate_derivatives_types' => $del_deriv_map,
|
'generate_derivatives_types' => $gen_deriv_map,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -170,6 +170,7 @@ DELETE FROM '.USER_CACHE_CATEGORIES_TABLE.'
|
||||||
// @return image ids where files are deleted successfully
|
// @return image ids where files are deleted successfully
|
||||||
function delete_element_files($ids)
|
function delete_element_files($ids)
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
if (count($ids) == 0)
|
if (count($ids) == 0)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2277,7 +2278,7 @@ function clear_derivative_cache($types='all')
|
||||||
}
|
}
|
||||||
|
|
||||||
$pattern.='(_[a-zA-Z0-9]+)*\.[a-zA-Z0-9]{3,4}$#';
|
$pattern.='(_[a-zA-Z0-9]+)*\.[a-zA-Z0-9]{3,4}$#';
|
||||||
if ($contents = opendir(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR))
|
if ($contents = @opendir(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR))
|
||||||
{
|
{
|
||||||
while (($node = readdir($contents)) !== false)
|
while (($node = readdir($contents)) !== false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -159,11 +159,12 @@ $template->set_filenames(array('maintenance'=>'maintenance.tpl'));
|
||||||
|
|
||||||
$url_format = get_root_url().'admin.php?page=maintenance&action=%s&pwg_token='.get_pwg_token();
|
$url_format = get_root_url().'admin.php?page=maintenance&action=%s&pwg_token='.get_pwg_token();
|
||||||
|
|
||||||
$purge_urls[l10n('all')] = sprintf($url_format, 'derivatives').'&type=all';
|
$purge_urls[l10n('All')] = sprintf($url_format, 'derivatives').'&type=all';
|
||||||
foreach(ImageStdParams::get_defined_type_map() as $params)
|
foreach(ImageStdParams::get_defined_type_map() as $params)
|
||||||
{
|
{
|
||||||
$purge_urls[ l10n($params->type) ] = sprintf($url_format, 'derivatives').'&type='.$params->type;
|
$purge_urls[ l10n($params->type) ] = sprintf($url_format, 'derivatives').'&type='.$params->type;
|
||||||
}
|
}
|
||||||
|
$purge_urls[ l10n(IMG_CUSTOM) ] = sprintf($url_format, 'derivatives').'&type='.IMG_CUSTOM;
|
||||||
|
|
||||||
$template->assign(
|
$template->assign(
|
||||||
array(
|
array(
|
||||||
|
|
1
i.php
1
i.php
|
@ -240,6 +240,7 @@ function parse_request()
|
||||||
if ($page['derivative_type'] == IMG_CUSTOM)
|
if ($page['derivative_type'] == IMG_CUSTOM)
|
||||||
{
|
{
|
||||||
$params = $page['derivative_params'] = parse_custom_params($deriv);
|
$params = $page['derivative_params'] = parse_custom_params($deriv);
|
||||||
|
ImageStdParams::apply_global($params);
|
||||||
|
|
||||||
if ($params->sizing->ideal_size[0] < 20 or $params->sizing->ideal_size[1] < 20)
|
if ($params->sizing->ideal_size[0] < 20 or $params->sizing->ideal_size[1] < 20)
|
||||||
{
|
{
|
||||||
|
|
|
@ -874,4 +874,5 @@ $lang['Permission granted for users'] = 'Permission granted for users';
|
||||||
$lang['Select users...'] = 'Select users...';
|
$lang['Select users...'] = 'Select users...';
|
||||||
$lang['%u users have automatic permission because they belong to a granted group.'] = '%u users have automatic permission because they belong to a granted group.';
|
$lang['%u users have automatic permission because they belong to a granted group.'] = '%u users have automatic permission because they belong to a granted group.';
|
||||||
$lang['include photos with lower privacy level'] = 'include photos with lower privacy level';
|
$lang['include photos with lower privacy level'] = 'include photos with lower privacy level';
|
||||||
|
$lang['custom']='Custom';
|
||||||
?>
|
?>
|
Loading…
Add table
Add a link
Reference in a new issue