issue 1019 add exception that user write a post with empty category

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10478 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
dragan-dan 2012-03-26 13:27:38 +00:00
parent 9fc963f779
commit 1bc9b8af10

View file

@ -170,7 +170,7 @@ class documentController extends document {
{
return new Object(-1, 'msg_not_permitted');
}
if(!$category_list[$obj->category_srl]) $obj->category_srl = 0;
if(count($category_list) > 0 && !$category_list[$obj->category_srl]) $obj->category_srl = 0;
}
// Set the read counts and update order.
if(!$obj->readed_count) $obj->readed_count = 0;