From 5fbac089b9dd130ec1feecce8318b7a1bb6beef6 Mon Sep 17 00:00:00 2001 From: nanosimbiot Date: Tue, 9 Aug 2011 19:32:47 +0000 Subject: [PATCH] r203 git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@203 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293 --- upload/ajax/posts.php | 4 ++-- upload/templates/default/viewtopic.tpl | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/upload/ajax/posts.php b/upload/ajax/posts.php index 89cffd733..86321b9de 100644 --- a/upload/ajax/posts.php +++ b/upload/ajax/posts.php @@ -97,7 +97,7 @@ switch($this->request['type']) case 'editor': if(!$post) $this->ajax_die($lang['NOT_POST']); - if(mb_strlen($post['post_text'], 'UTF-8') > 1000) + if((mb_strlen($post['post_text'], 'UTF-8') > 1000) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id)) { $this->response['redirect'] = make_url('posting.php?mode=editpost&p='. $post_id); } @@ -189,7 +189,7 @@ switch($this->request['type'])     - + diff --git a/upload/templates/default/viewtopic.tpl b/upload/templates/default/viewtopic.tpl index abe3c8bd1..a4996f6bb 100644 --- a/upload/templates/default/viewtopic.tpl +++ b/upload/templates/default/viewtopic.tpl @@ -48,7 +48,9 @@ ajax.callback.posts = function(data) { if(data.html){ $('#pe_'+ data.post_id).html(data.text); } if(data.redirect) document.location.href = data.redirect; - if(data.hide) $('tbody#post_'+ data.post_id).hide(); + if(data.hide) { if(ajax.open_edit == data.post_id) ajax.open_edit = false; + $('tbody#post_'+ data.post_id).hide(); + } if(data.quote) $('textarea#message').attr('value', $('textarea#message').val() + data.message +' ').focus(); if(data.message_html){ $('#view_message').show();