Browse Source

One loop less - suggested by Spuds in commit 88dfbfb5a4d48edf5ddafe3ee699146c85f49325

Signed-off-by: emanuele <[email protected]>
emanuele 11 years ago
parent
commit
208bd50d6c
1 changed files with 1 additions and 3 deletions
  1. 1 3
      Sources/Subs-Boards.php

+ 1 - 3
Sources/Subs-Boards.php

@@ -175,9 +175,7 @@ function MarkRead()
 	elseif (isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'unreadreplies')
 	{
 		// Make sure all the boards are integers!
-		$topics = explode('-', $_REQUEST['topics']);
-		foreach ($topics as &$id_topic)
-			$id_topic = (int) $id_topic;
+		$topics = array_map('intval', explode('-', $_REQUEST['topics']));
 
 		$smcFunc['db_query']('', '
 			SELECT id_topic, disregarded