Browse Source

"new posts in {category}" moved to a txt string and used strip_tags to make sure the name does not contain html

Signed-off-by: emanuele <[email protected]>
emanuele 12 years ago
parent
commit
c51469d58d
2 changed files with 2 additions and 1 deletions
  1. 1 1
      Sources/Subs-BoardIndex.php
  2. 1 0
      Themes/default/languages/index.english.php

+ 1 - 1
Sources/Subs-BoardIndex.php

@@ -104,7 +104,7 @@ function getBoardIndex($boardIndexOptions)
 					'boards' => array(),
 					'new' => false
 				);
-				$categories[$row_board['id_cat']]['link'] = '<a id="c' . $row_board['id_cat'] . '"></a>' . (!$context['user']['is_guest'] ? '<a href="' . $scripturl . '?action=unread;c='. $row_board['id_cat'] . '" title="New posts in ' . $row_board['cat_name'] . '">' . $row_board['cat_name'] . '</a>' : $row_board['cat_name']);
+				$categories[$row_board['id_cat']]['link'] = '<a id="c' . $row_board['id_cat'] . '"></a>' . (!$context['user']['is_guest'] ? '<a href="' . $scripturl . '?action=unread;c='. $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], strip_tags($row_board['cat_name'])) . '">' . $row_board['cat_name'] . '</a>' : $row_board['cat_name']);
 			}
 
 			// If this board has new posts in it (and isn't the recycle bin!) then the category is new.

+ 1 - 0
Themes/default/languages/index.english.php

@@ -728,6 +728,7 @@ $txt['ajax_in_progress'] = 'Loading...';
 $txt['mod_reports_waiting'] = 'There are currently %1$d moderator reports open.';
 
 $txt['view_unread_category'] = 'Unread Posts';
+$txt['new_posts_in_category'] = 'Click to see the new posts in %1$s';
 $txt['verification'] = 'Verification';
 $txt['visual_verification_description'] = 'Type the letters shown in the picture';
 $txt['visual_verification_sound'] = 'Listen to the letters';