diff options
Diffstat (limited to '')
-rw-r--r-- | install/db/145-database.php (renamed from plugins/LocalFilesEditor/index.php) | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/plugins/LocalFilesEditor/index.php b/install/db/145-database.php index c8de97f60..012ca7a61 100644 --- a/plugins/LocalFilesEditor/index.php +++ b/install/db/145-database.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2016 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ @@ -21,10 +21,24 @@ // | USA. | // +-----------------------------------------------------------------------+ -// Recursive call -$url = '../'; -header( 'Request-URI: '.$url ); -header( 'Content-Location: '.$url ); -header( 'Location: '.$url ); -exit(); +if (!defined('PHPWG_ROOT_PATH')) +{ + die('Hacking attempt!'); +} + +$upgrade_description = 'add image formats table'; + +// we use PREFIX_TABLE, in case Piwigo uses an external user table +pwg_query(' +CREATE TABLE `'.PREFIX_TABLE.'image_format` ( + `format_id` int(11) unsigned NOT NULL auto_increment, + `image_id` mediumint(8) unsigned NOT NULL DEFAULT \'0\', + `ext` varchar(255) NOT NULL, + `filesize` mediumint(9) unsigned DEFAULT NULL, + PRIMARY KEY (`format_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +;'); + +echo "\n".$upgrade_description."\n"; + ?> |