mirror of
https://github.com/Oreolek/oreolek.ru.git
synced 2024-04-29 15:49:24 +03:00
Urgent fix on comments
This commit is contained in:
parent
18b6c7cd87
commit
28ff52ae54
|
@ -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')
|
||||
|
|
|
@ -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'] = '<span class="fa fa-clock-o"></span> ≈'.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))
|
||||
{
|
||||
|
|
|
@ -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'] = '<span class="fa fa-clock-o"></span> ≈'.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'));
|
||||
|
|
|
@ -16,11 +16,9 @@
|
|||
{{/edit_link}}
|
||||
</div>
|
||||
<div class="hyphenate" property="description">{{{content}}}</div>
|
||||
{{#comment_count}}
|
||||
<a class="link_comments" href="{{{comments_link}}}">
|
||||
Комментарии (<span property="commentCount">{{comment_count}}</span>)
|
||||
Комментарии
|
||||
</a>
|
||||
{{/comment_count}}
|
||||
<meta property="discussionUrl" content="{{{comments_link}}}" />
|
||||
<meta property="url" content="{{{view_link}}}" />
|
||||
</div>
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit cb4be3a6d9442ef9ab978c7306c5e0841e3d75d9
|
||||
Subproject commit 9edc57cc7d760388751474aeb3a15867c08326a2
|
Loading…
Reference in a new issue