diff options
| author | czaks <marcin@6irc.net> | 2014-06-10 17:51:25 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-06-10 17:51:25 +0200 |
| commit | e27c923b79e3d6d0817941bd3d7ca91576483397 (patch) | |
| tree | 3a19140bc4531a29217c79e2341e5fae3c831543 /install.php | |
| parent | c2cbbe7e225ba74ea5fd033d4672286ceb1e429c (diff) | |
| parent | 9b170ceae74fd613168ecf3a5b8a9cfd68fb6b50 (diff) | |
Merge branch 'master' of github.com:vichan-devel/Tinyboard
Diffstat (limited to 'install.php')
| -rw-r--r-- | install.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/install.php b/install.php index f719a5c6..0addcef9 100644 --- a/install.php +++ b/install.php @@ -539,6 +539,7 @@ if (file_exists($config['has_installed'])) { query(sprintf('ALTER TABLE ``posts_%s`` ADD `files` text DEFAULT NULL AFTER `bump`;', $board['uri'])) or error(db_error()); query(sprintf('ALTER TABLE ``posts_%s`` ADD `num_files` int(11) DEFAULT 0 AFTER `files`;', $board['uri'])) or error(db_error()); query(sprintf('UPDATE ``posts_%s`` SET `files` = CONCAT(\'[{"file":"\',`file`,\'", "thumb":"\',`thumb`,\'", "filename":"\',`filename`,\'", "size":"\',`filesize`,\'", "width":"\',`filewidth`,\'","height":"\',`fileheight`,\'","thumbwidth":"\',`thumbwidth`,\'","thumbheight":"\',`thumbheight`,\'", "file_path":"%s\/src\/\',`filename`,\'","thumb_path":"%s\/thumb\/\',`filename`,\'"}]\') WHERE `file` IS NOT NULL', $board['uri'], $board['uri'], $board['uri'])) or error(db_error()); + query(sprintf('UPDATE ``posts_%s`` SET `num_files` = 1 WHERE `file` IS NOT NULL', $board['uri'])) or error(db_error()); query(sprintf('ALTER TABLE ``posts_%s`` DROP COLUMN `thumb`, DROP COLUMN `thumbwidth`, DROP COLUMN `thumbheight`, DROP COLUMN `file`, DROP COLUMN `fileheight`, DROP COLUMN `filesize`, DROP COLUMN `filewidth`, DROP COLUMN `filename`', $board['uri'])) or error(db_error()); query(sprintf('REPAIR TABLE ``posts_%s``', $board['uri'])); } |
