aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-03-08 15:49:13 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-03-08 15:49:13 +0000
commitfcec5b61daecb4a0174418d3851ee1e0e8a0d93c (patch)
tree9c91c227d7110f962b5a469d2632c7898e0e8848 /phpBB/includes/functions_posting.php
parent738d26f92c56198a22b3088bf1b0c3b641a990db (diff)
downloadforums-fcec5b61daecb4a0174418d3851ee1e0e8a0d93c.tar
forums-fcec5b61daecb4a0174418d3851ee1e0e8a0d93c.tar.gz
forums-fcec5b61daecb4a0174418d3851ee1e0e8a0d93c.tar.bz2
forums-fcec5b61daecb4a0174418d3851ee1e0e8a0d93c.tar.xz
forums-fcec5b61daecb4a0174418d3851ee1e0e8a0d93c.zip
again... some more fixes.
git-svn-id: file:///svn/phpbb/trunk@7150 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php24
1 files changed, 22 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 74403f779e..7519c93d15 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -552,9 +552,16 @@ function create_thumbnail($source, $destination, $mimetype)
return false;
}
- list($width, $height, $type, ) = getimagesize($source);
+ $dimension = getimagesize($source);
- if (!$width || !$height)
+ if ($dimension === false)
+ {
+ return false;
+ }
+
+ list($width, $height, $type, ) = $dimension;
+
+ if ($width < 2 || $height < 2)
{
return false;
}
@@ -1578,6 +1585,19 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
);
+
+ // no break;
+
+ case 'edit':
+ case 'edit_last_post':
+
+ // Correctly set back the topic replies and forum posts...
+ if (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']))
+ {
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies = topic_replies - 1';
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - 1';
+ }
+
break;
}