Просмотр исходного кода

Fixed an undefined index error - thank Illori for the report

Signed-off-by: emanuele <[email protected]>
emanuele 12 лет назад
Родитель
Сommit
61e0716b7e
2 измененных файлов с 4 добавлено и 1 удалено
  1. 3 0
      Sources/PostModeration.php
  2. 1 1
      Themes/default/ModerationCenter.template.php

+ 3 - 0
Sources/PostModeration.php

@@ -274,6 +274,7 @@ function UnapprovedPosts()
 			'alternate' => $i % 2,
 			'counter' => $context['start'] + $i,
 			'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#msg' . $row['id_msg'],
+			'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#msg' . $row['id_msg'] . '">' . $row['subject'] . '</a>',
 			'subject' => $row['subject'],
 			'body' => parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']),
 			'time' => timeformat($row['poster_time']),
@@ -289,10 +290,12 @@ function UnapprovedPosts()
 			'board' => array(
 				'id' => $row['id_board'],
 				'name' => $row['board_name'],
+				'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['board_name'] . '</a>',
 			),
 			'category' => array(
 				'id' => $row['id_cat'],
 				'name' => $row['cat_name'],
+				'link' => '<a href="', $scripturl, '#c', $row['id_cat'], '">', $row['cat_name'], '</a>',
 			),
 			'can_delete' => $can_delete,
 		);

+ 1 - 1
Themes/default/ModerationCenter.template.php

@@ -370,7 +370,7 @@ function template_unapproved_posts()
 				<div class="content">
 					<div class="counter">', $item['counter'], '</div>
 					<div class="topic_details">
-						<h5><strong><a href="', $scripturl, '#c', $item['category']['id'], '">', $item['category']['name'], '</a> / <a href="', $scripturl, '?board=', $item['board']['id'], '.0">', $item['board']['name'], '</a> / <a href="', $scripturl, '?topic=', $item['topic'], '.', $item['start'], '#msg', $item['id'], '">', $item['subject'], '</a></strong></h5>
+						<h5><strong>', $item['category']['link'], ' / ', $item['board']['link'], ' / ', $item['link'], '</strong></h5>
 						<span class="smalltext"><strong>', $txt['mc_unapproved_by'], ' ', $item['poster']['link'], ' ', $txt['on'], ':</strong> ', $item['time'], '</span>
 					</div>
 					<div class="list_posts">