increased subject max length to 100 characters
This commit is contained in:
parent
881ea10162
commit
aa02cffb93
@ -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);
|
||||
|
@ -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,
|
||||
|
2
post.php
2
post.php
@ -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'));
|
||||
|
@ -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>
|
||||
|
@ -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,
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user