Merge branch 'develop' into feature/settings

This commit is contained in:
slawkens
2023-02-08 15:02:56 +01:00
362 changed files with 7410 additions and 2732 deletions

View File

@@ -3,12 +3,12 @@
$db->query("RENAME TABLE
" . TABLE_PREFIX . "screenshots TO " . TABLE_PREFIX . "gallery,
" . TABLE_PREFIX . "movies TO " . TABLE_PREFIX . "videos;");
// rename images dir
if(file_exists(BASE . 'images/screenshots') && !file_exists(BASE .'images/gallery')) {
rename(BASE . 'images/screenshots', BASE . 'images/gallery');
if(file_exists(BASE . 'images/screenshots') && !file_exists(BASE . GALLERY_DIR)) {
rename(BASE . 'images/screenshots', BASE . GALLERY_DIR);
}
// convert old database screenshots images to gallery
$query = $db->query('SELECT `id`, `image`, `thumb` FROM `' . TABLE_PREFIX . 'gallery`;');
foreach($query->fetchAll() as $item) {
@@ -17,4 +17,4 @@
'thumb' => str_replace('/screenshots/', '/gallery/', $item['thumb']),
), array('id' => $item['id']));
}
?>
?>

View File

@@ -1,13 +1,6 @@
<?php
// Increase size of ip in myaac_visitors table
// according to this answer: https://stackoverflow.com/questions/166132/maximum-length-of-the-textual-representation-of-an-ipv6-address
// the size of ipv6 can be maximal 45 chars
if(!$db->hasTable(TABLE_PREFIX . 'settings')) {
$db->exec("CREATE TABLE `" . TABLE_PREFIX . "settings`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_name` VARCHAR(255) NOT NULL DEFAULT '',
`key` VARCHAR(255) NOT NULL DEFAULT '',
`value` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `key` (`key`)
) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8;");
}
$db->exec('ALTER TABLE `' . TABLE_PREFIX . "visitors` MODIFY `ip` VARCHAR(45) NOT NULL;");

0
system/migrations/34.php Normal file
View File