track cites (remove broken links after a post 404s)

This commit is contained in:
Savetheinternet 2011-12-05 13:17:34 +11:00
parent 486842e9a1
commit b57be65c9f
6 changed files with 98 additions and 8 deletions

View file

@ -1,6 +1,6 @@
<?php
// Installation/upgrade file
define('VERSION', 'v0.9.5-dev-1');
define('VERSION', 'v0.9.5-dev-2');
require 'inc/functions.php';
require 'inc/display.php';
@ -159,8 +159,11 @@
CHANGE `email` `email` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL ,
CHANGE `name` `name` VARCHAR( 35 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL", $board['uri'])) or error(db_error());
}
case 'v0.9.5-dev-1':
foreach($boards as &$board) {
query(sprintf("ALTER TABLE `posts_%s` ADD `body_nomarkup` TEXT NULL AFTER `body`", $board['uri'])) or error(db_error());
}
query("CREATE TABLE IF NOT EXISTS `cites` ( `board` varchar(8) NOT NULL, `post` int(11) NOT NULL, `target_board` varchar(8) NOT NULL, `target` int(11) NOT NULL, KEY `target` (`target_board`,`target`), KEY `post` (`board`,`post`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;") or error(db_error());
case false:
// Update version number
file_write($config['has_installed'], VERSION);