summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/mod.php6
-rw-r--r--install.php7
-rw-r--r--install.sql6
-rw-r--r--mod.php6
4 files changed, 15 insertions, 10 deletions
diff --git a/inc/mod.php b/inc/mod.php
index 556a274e..f2e52b21 100644
--- a/inc/mod.php
+++ b/inc/mod.php
@@ -213,17 +213,17 @@
'<table>' .
'<tr>' .
'<th><label for="board">URI</label></th>' .
- '<td><input type="text" name="uri" id="board" size="3" maxlength="8" />' .
+ '<td><input type="text" name="uri" id="board" size="10" maxlength="15" />' .
' <span class="unimportant">(eg. "b"; "mu")</span></td>' .
'</tr>' .
'<tr>' .
'<th><label for="title">Title</label></th>' .
- '<td><input type="text" name="title" id="title" size="15" maxlength="20" />' .
+ '<td><input type="text" name="title" id="title" size="25" maxlength="40" />' .
' <span class="unimportant">(eg. "Random")</span></td>' .
'</tr>' .
'<tr>' .
'<th><label for="subtitle">Subtitle</label></th>' .
- '<td><input type="text" name="subtitle" id="subtitle" size="20" maxlength="40" />' .
+ '<td><input type="text" name="subtitle" id="subtitle" size="25" maxlength="120" />' .
' <span class="unimportant">(optional)</span></td>' .
'</tr>' .
'<tr>' .
diff --git a/install.php b/install.php
index 12f55bfc..86aef14b 100644
--- a/install.php
+++ b/install.php
@@ -1,6 +1,6 @@
<?php
// Installation/upgrade file
- define('VERSION', 'v0.9.5-dev-2');
+ define('VERSION', 'v0.9.5-dev-3');
require 'inc/functions.php';
require 'inc/display.php';
@@ -164,6 +164,11 @@
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 'v0.9.5-dev-2':
+ query("ALTER TABLE `boards`
+ CHANGE `uri` `uri` VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ CHANGE `title` `title` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ CHANGE `subtitle` `subtitle` VARCHAR( 120 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL");
case false:
// Update version number
file_write($config['has_installed'], VERSION);
diff --git a/install.sql b/install.sql
index 8837e78d..a2650dde 100644
--- a/install.sql
+++ b/install.sql
@@ -46,9 +46,9 @@ CREATE TABLE IF NOT EXISTS `bans` (
CREATE TABLE IF NOT EXISTS `boards` (
`id` smallint(6) NOT NULL AUTO_INCREMENT,
- `uri` varchar(8) NOT NULL,
- `title` varchar(20) NOT NULL,
- `subtitle` varchar(40) DEFAULT NULL,
+ `uri` varchar(15) NOT NULL,
+ `title` varchar(40) NOT NULL,
+ `subtitle` varchar(120) DEFAULT NULL,
PRIMARY KEY (`uri`),
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
diff --git a/mod.php b/mod.php
index f8d624e8..357d5f51 100644
--- a/mod.php
+++ b/mod.php
@@ -2024,11 +2024,11 @@
error(sprintf($config['error']['required'], 'title'));
// Check string lengths
- if(mb_strlen($b['uri']) > 8)
+ if(mb_strlen($b['uri']) > 15)
error(sprintf($config['error']['toolong'], 'URI'));
- if(mb_strlen($b['title']) > 20)
+ if(strlen($b['title']) > 40)
error(sprintf($config['error']['toolong'], 'title'));
- if(mb_strlen($b['subtitle']) > 40)
+ if(strlen($b['subtitle']) > 120)
error(sprintf($config['error']['toolong'], 'subtitle'));
if(!preg_match('/^\w+$/', $b['uri']))