Skip to content

Commit

Permalink
Fix language variables
Browse files Browse the repository at this point in the history
  • Loading branch information
qexyorg committed Feb 28, 2016
1 parent d8b2500 commit aff7d2c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 9 deletions.
3 changes: 3 additions & 0 deletions upload/language/ru_RU/ajax.php
Expand Up @@ -53,6 +53,9 @@
'com_vote_perm' => 'У вас нет доступа для голосования',
'com_vote_disabled' => 'Голосование для данной новости отключено',
'com_vote_success' => 'Голос успешно учтен',
'com_edit' => 'Редактировать',
'com_delete' => 'Удалить',
'com_quote' => 'Цитировать',

'att_attach' => 'Закрепление',
'att_unattach' => 'Открепление',
Expand Down
11 changes: 8 additions & 3 deletions upload/modules/ajax/news.php
Expand Up @@ -86,16 +86,21 @@ private function add_comment(){

$act_del = $act_edt = $act_get = '';

$data = array(
"ID" => $id,
"LNG" => $this->lng
);

if($this->core->is_access('sys_comment_del') || $this->core->is_access('sys_comment_del_all')){
$act_del = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-del.html", array("ID" => $id));
$act_del = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-del.html", $data);
}

if($this->core->is_access('sys_comment_edt') || $this->core->is_access('sys_comment_edt_all')){
$act_edt = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-edt.html", array("ID" => $id));
$act_edt = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-edt.html", $data);
}

if($this->user->is_auth){
$act_get = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-get.html", array("ID" => $id));
$act_get = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-get.html", $data);
}

$com_data = array(
Expand Down
11 changes: 8 additions & 3 deletions upload/modules/news.php
Expand Up @@ -177,16 +177,21 @@ private function comments_array($nid=1){

$id = intval($ar['id']);

$data = array(
"ID" => $id,
"LNG" => $this->lng
);

if($this->core->is_access('sys_comment_del') || $this->core->is_access('sys_comment_del_all')){
$act_del = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-del.html", array("ID" => $id));
$act_del = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-del.html", $data);
}

if($this->core->is_access('sys_comment_edt') || $this->core->is_access('sys_comment_edt_all')){
$act_edt = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-edt.html", array("ID" => $id));
$act_edt = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-edt.html", $data);
}

if($this->user->is_auth){
$act_get = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-get.html", array("ID" => $id));
$act_get = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-get.html", $data);
}

$com_data = array(
Expand Down
@@ -1 +1 @@
<div class="del-btn"><a href="#" rel="tooltip" title="<?php echo $this->lng_m['delete']; ?>" class="del_comment" data-id="<?php echo $data['ID']; ?>"><i class="icon-remove"></i></a></div>
<div class="del-btn"><a href="#" rel="tooltip" title="<?php echo $data['LNG']['com_delete']; ?>" class="del_comment" data-id="<?php echo $data['ID']; ?>"><i class="icon-remove"></i></a></div>
@@ -1 +1 @@
<div class="edt-btn"><a href="#" data-toggle="modal" class="edt_comment" rel="tooltip" title="<?php echo $this->lng_m['edit']; ?>" data-id="<?php echo $data['ID']; ?>"><i class="icon-pencil"></i></a></div>
<div class="edt-btn"><a href="#" data-toggle="modal" class="edt_comment" rel="tooltip" title="<?php echo $data['LNG']['com_edit']; ?>" data-id="<?php echo $data['ID']; ?>"><i class="icon-pencil"></i></a></div>
@@ -1 +1 @@
<div class="get-btn"><a href="#" rel="tooltip" title="<?php echo $this->lng_m['quote']; ?>" class="get_comment" data-id="<?php echo $data['ID']; ?>"><i class="icon-comment"></i></a></div>
<div class="get-btn"><a href="#" rel="tooltip" title="<?php echo $data['LNG']['com_quote']; ?>" class="get_comment" data-id="<?php echo $data['ID']; ?>"><i class="icon-comment"></i></a></div>

0 comments on commit aff7d2c

Please sign in to comment.