diff options
| -rw-r--r-- | install.php | 8 | ||||
| -rw-r--r-- | install.sql | 2 | ||||
| -rw-r--r-- | post.php | 2 | ||||
| -rw-r--r-- | templates/index.html | 2 | ||||
| -rw-r--r-- | templates/posts.sql | 2 | ||||
| -rw-r--r-- | templates/thread.html | 2 |
6 files changed, 12 insertions, 6 deletions
diff --git a/install.php b/install.php index 2877d498..baac2cc4 100644 --- a/install.php +++ b/install.php @@ -1,6 +1,6 @@ <?php // Installation/upgrade file - define('VERSION', 'v0.9.3-dev-5'); + define('VERSION', 'v0.9.3-dev-6'); require 'inc/functions.php'; require 'inc/display.php'; @@ -85,6 +85,12 @@ case 'v0.9.3-dev-4': // add ban ID query("ALTER TABLE `bans` ADD `id` INT NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY ( `id` ), ADD UNIQUE (`id`)"); + case 'v0.9.3-dev-5': + $boards = listBoards(); + foreach($boards as &$_board) { + // Increase subject field size + query(sprintf("ALTER TABLE `posts_%s` CHANGE `subject` `subject` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL", $_board['uri'])) or error(db_error()); + } case false: // Update version number file_write($config['has_installed'], VERSION); diff --git a/install.sql b/install.sql index 508de215..dcaf0b8d 100644 --- a/install.sql +++ b/install.sql @@ -187,7 +187,7 @@ CREATE TABLE IF NOT EXISTS `pms` ( CREATE TABLE IF NOT EXISTS `posts_b` ( `id` int(11) NOT NULL AUTO_INCREMENT, `thread` int(11) DEFAULT NULL, - `subject` varchar(50) NOT NULL, + `subject` varchar(100) NOT NULL, `email` varchar(30) NOT NULL, `name` varchar(35) NOT NULL, `trip` varchar(15) DEFAULT NULL, @@ -313,7 +313,7 @@ // Check string lengths if(strlen($post['name']) > 50) error(sprintf($config['error']['toolong'], 'name')); if(strlen($post['email']) > 40) error(sprintf($config['error']['toolong'], 'email')); - if(strlen($post['subject']) > 40) error(sprintf($config['error']['toolong'], 'subject')); + if(strlen($post['subject']) > 100) error(sprintf($config['error']['toolong'], 'subject')); if(!$mod && strlen($post['body']) > $config['max_body']) error($config['error']['toolong_body']); if(!(!$OP && $post['has_file']) && strlen($post['body']) < 1) error($config['error']['tooshort_body']); if(strlen($post['password']) > 20) error(sprintf($config['error']['toolong'], 'password')); diff --git a/templates/index.html b/templates/index.html index 30ca3303..1f917945 100644 --- a/templates/index.html +++ b/templates/index.html @@ -60,7 +60,7 @@ Subject
</th>
<td>
- <input style="float:left;" type="text" name="subject" size="25" maxlength="40" autocomplete="off" />
+ <input style="float:left;" type="text" name="subject" size="25" maxlength="100" autocomplete="off" />
<input accesskey="s" style="margin-left:2px" type="submit" name="post" value="{config[button_newtopic]=New Topic}" />
</td>
</tr>
diff --git a/templates/posts.sql b/templates/posts.sql index cf8718d2..c3250e51 100644 --- a/templates/posts.sql +++ b/templates/posts.sql @@ -1,7 +1,7 @@ CREATE TABLE IF NOT EXISTS `posts_{board}` ( `id` int(11) NOT NULL AUTO_INCREMENT, `thread` int(11) DEFAULT NULL, - `subject` varchar(50) NOT NULL, + `subject` varchar(100) NOT NULL, `email` varchar(30) NOT NULL, `name` varchar(35) NOT NULL, `trip` varchar(15) DEFAULT NULL, diff --git a/templates/thread.html b/templates/thread.html index adf8579c..4dbe7de3 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -59,7 +59,7 @@ Subject
</th>
<td>
- <input style="float:left;" type="text" name="subject" size="25" maxlength="40" autocomplete="off" />
+ <input style="float:left;" type="text" name="subject" size="25" maxlength="100" autocomplete="off" />
<input accesskey="s" style="margin-left:2px" type="submit" name="post" value="{config[button_reply]=New Reply}" />
</td>
</tr>
|
