mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #2377 add 3XL and 4XL derivatives
This commit is contained in:
33
install/db/177-database.php
Normal file
33
install/db/177-database.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This file is part of Piwigo. |
|
||||
// | |
|
||||
// | For copyright and license information, please view the COPYING.txt |
|
||||
// | file that was distributed with this source code. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (!defined('PHPWG_ROOT_PATH'))
|
||||
{
|
||||
die('Hacking attempt!');
|
||||
}
|
||||
|
||||
global $conf;
|
||||
load_conf_from_db();
|
||||
|
||||
$upgrade_description = 'Add 3XL and 4XL sizes';
|
||||
|
||||
//Get predefined image sizes
|
||||
$derivatives = unserialize($conf['derivatives']);
|
||||
|
||||
//get default sizes from derivative_std_params
|
||||
$default_sizes = ImageStdParams::get_default_sizes();
|
||||
|
||||
//Get 3XL and 4XL from default values
|
||||
$derivatives['d'][IMG_3XLARGE] = $default_sizes['3xlarge'];
|
||||
$derivatives['d'][IMG_4XLARGE] = $default_sizes['4xlarge'];
|
||||
|
||||
// Save derivative new settings
|
||||
ImageStdParams::set_and_save($derivatives['d']);
|
||||
|
||||
echo "\n".$upgrade_description."\n";
|
||||
?>
|
||||
Reference in New Issue
Block a user