diff --git a/inc/display.php b/inc/display.php
index 8be431aa..ef6d1efc 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -122,7 +122,7 @@
$body = html_entity_decode($body, ENT_COMPAT, 'UTF-8');
// calculate strlen() so we can add "..." after if needed
- $strlen = strlen($body);
+ $strlen = mb_strlen($body);
$body = substr($body, 0, $len);
diff --git a/inc/mod.php b/inc/mod.php
index f2e52b21..43ed760d 100644
--- a/inc/mod.php
+++ b/inc/mod.php
@@ -213,17 +213,17 @@
'
' .
@@ -2140,14 +2140,6 @@
if(empty($b['title']))
error(sprintf($config['error']['required'], 'title'));
- // Check string lengths
- if(mb_strlen($b['uri']) > 15)
- error(sprintf($config['error']['toolong'], 'URI'));
- if(strlen($b['title']) > 40)
- error(sprintf($config['error']['toolong'], 'title'));
- if(strlen($b['subtitle']) > 120)
- error(sprintf($config['error']['toolong'], 'subtitle'));
-
if(!preg_match('/^\w+$/', $b['uri']))
error(sprintf($config['error']['invalidfield'], 'URI'));
diff --git a/post.php b/post.php
index 140ae62e..267d006f 100644
--- a/post.php
+++ b/post.php
@@ -18,9 +18,7 @@
if(isset($_POST['delete'])) {
// Delete
- if( !isset($_POST['board']) ||
- !isset($_POST['password'])
- )
+ if(!isset($_POST['board'], $_POST['password']))
error($config['error']['bot']);
$password = &$_POST['password'];
@@ -82,10 +80,7 @@
header('Location: ' . $root . $board['dir'] . $config['file_index'], true, $config['redirect_http']);
} elseif(isset($_POST['report'])) {
- if( !isset($_POST['board']) ||
- !isset($_POST['password']) ||
- !isset($_POST['reason'])
- )
+ if(!isset($_POST['board'], $_POST['password'], $_POST['reason']))
error($config['error']['bot']);
$report = Array();
@@ -142,10 +137,8 @@
header('Location: ' . $root . $board['dir'] . $config['file_index'], true, $config['redirect_http']);
} elseif(isset($_POST['post'])) {
- if( !isset($_POST['subject']) ||
- !isset($_POST['body']) ||
- !isset($_POST['board'])
- ) error($config['error']['bot']);
+ if(!isset($_POST['subject'], $_POST['body'], $_POST['board']))
+ error($config['error']['bot']);
if(!isset($_POST['name']))
$_POST['name'] = $config['anonymous'];