diff --git a/application/classes/Controller/Post.php b/application/classes/Controller/Post.php index 0f89ef3..35e8242 100644 --- a/application/classes/Controller/Post.php +++ b/application/classes/Controller/Post.php @@ -176,7 +176,6 @@ class Controller_Post extends Controller_Layout { $page_size = Kohana::$config->load('common.page_size'); $first_item = $page_size * $current_page; $this->template->items = ORM::factory('Post') - ->with_count('comments', 'comment_count') ->where('is_draft', '=', '0') ->and_where(DB::expr('DATEDIFF(SYSDATE(), `post`.`posted_at`)'), '>=', '0') ->order_by('posted_at', 'DESC') diff --git a/application/classes/View/Post/Read.php b/application/classes/View/Post/Read.php index 79647dc..59a5528 100644 --- a/application/classes/View/Post/Read.php +++ b/application/classes/View/Post/Read.php @@ -36,7 +36,6 @@ class View_Post_Read extends View_Read { 'date' => '', 'heading' => '', 'content' => '', - 'comment_count' => '', 'edit_link' => '', 'view_link' => '', 'comments_link' => '', @@ -53,7 +52,6 @@ class View_Post_Read extends View_Read { $output['speed'] = ' ≈'.Text::time_to_read($item->content).' '.__('min'); $output['view_link'] = Route::url('default', array('controller' => Request::current()->controller(), 'action' => 'view','id' => $item->id)); $output['heading'] = $item->name; - $output['comment_count'] = $item->comment_count; $output['comments_link'] = Route::url('default', array('controller' => Request::current()->controller(), 'action' => 'view','id' => $item->id)).'#comments'; if (!empty($item->password)) { diff --git a/application/classes/View/Read.php b/application/classes/View/Read.php index b4bcb5c..18e09d0 100644 --- a/application/classes/View/Read.php +++ b/application/classes/View/Read.php @@ -39,7 +39,6 @@ class View_Read extends View_Index { 'date' => '', 'heading' => '', 'content' => '', - 'comment_count' => '', 'edit_link' => '', 'view_link' => '', 'comments_link' => '', @@ -56,7 +55,6 @@ class View_Read extends View_Index { $output['speed'] = ' ≈'.Text::time_to_read($item->content).' '.__('min'); $output['view_link'] = Route::url('default', array('controller' => Request::current()->controller(), 'action' => 'view','id' => $item->id)); $output['heading'] = $item->name; - $output['comment_count'] = $item->comment_count; $output['comments_link'] = Route::url('default', array('controller' => Request::current()->controller(), 'action' => 'view','id' => $item->id)).'#comments'; // now limit words in content $output['content'] = Text::limit_words(Markdown::instance()->transform($item->content), Kohana::$config->load('common.brief_limit')); diff --git a/application/templates/read.mustache b/application/templates/read.mustache index b9fec6b..1113e18 100644 --- a/application/templates/read.mustache +++ b/application/templates/read.mustache @@ -16,11 +16,9 @@ {{/edit_link}}
{{{content}}}
- {{#comment_count}} - Комментарии ({{comment_count}}) + Комментарии - {{/comment_count}} diff --git a/modules/orm b/modules/orm index cb4be3a..9edc57c 160000 --- a/modules/orm +++ b/modules/orm @@ -1 +1 @@ -Subproject commit cb4be3a6d9442ef9ab978c7306c5e0841e3d75d9 +Subproject commit 9edc57cc7d760388751474aeb3a15867c08326a2