Browse Source

increased subject max length to 100 characters

tags/v0.9.3
Savetheinternet 12 years ago
parent
commit
aa02cffb93
6 changed files with 12 additions and 6 deletions
  1. +7
    -1
      install.php
  2. +1
    -1
      install.sql
  3. +1
    -1
      post.php
  4. +1
    -1
      templates/index.html
  5. +1
    -1
      templates/posts.sql
  6. +1
    -1
      templates/thread.html

+ 7
- 1
install.php View File

@@ -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);


+ 1
- 1
install.sql View File

@@ -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,


+ 1
- 1
post.php View File

@@ -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'));


+ 1
- 1
templates/index.html View File

@@ -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
- 1
templates/posts.sql View File

@@ -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,


+ 1
- 1
templates/thread.html View File

@@ -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…
Cancel
Save