fixes #1419 add photos in a lounge as a temporary space

* at the end of the upload of after a maximum duration, move the photos from the lounge to their actual categories.
* do not invalidate user cache when photos are added in the lounge, thus avoiding to rebuild cache on every photo uploaded
* the lounge system activates itself only beyond 50k (by default) photo
This commit is contained in:
plegall
2021-06-11 16:35:29 +02:00
parent 4aa7a7b9bf
commit ac0d1a5b47
13 changed files with 307 additions and 7 deletions

View File

@@ -0,0 +1,26 @@
<?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!');
}
$upgrade_description = 'add lounge table';
pwg_query('
CREATE TABLE `'.PREFIX_TABLE.'lounge` (
`image_id` mediumint(8) unsigned NOT NULL,
`category_id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`image_id`,`category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
;');
echo "\n".$upgrade_description."\n";
?>

View File

@@ -260,6 +260,17 @@ CREATE TABLE `piwigo_languages` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Table structure for table `piwigo_lounge`
--
DROP TABLE IF EXISTS `piwigo_lounge`;
CREATE TABLE `piwigo_lounge` (
`image_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`category_id` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`image_id`,`category_id`)
) ENGINE=MyISAM;
--
-- Table structure for table `piwigo_old_permalinks`
--