From 37093b6aa522dd15d05659eaf6c541e25e163289 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 19 Feb 2013 13:04:06 +0100 Subject: [PATCH] [ticket/11342] Fix "unexpected token" syntax error PHPBB-11342 --- phpBB/styles/prosilver/template/ajax.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index b2a27089f7..0b587ac561 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -54,7 +54,7 @@ phpbb.addAjaxCallback('mark_forums_read', function(res) { * @param update_topic_links bool Wether "Mark topics read" links should be * updated. Defaults to true. */ -phpbb.addAjaxCallback('mark_topics_read', function(res, update_topic_links = true) { +phpbb.addAjaxCallback('mark_topics_read', function(res, update_topic_links) { var readTitle = res.NO_UNREAD_POSTS; var unreadTitle = res.UNREAD_POSTS; var iconsArray = { @@ -68,6 +68,10 @@ phpbb.addAjaxCallback('mark_topics_read', function(res, update_topic_links = tru var classMap = {}; var classNames = []; + if (typeof update_topic_links === 'undefined') { + update_topic_links = true; + } + $.each(iconsArray, function(unreadClass, readClass) { $.each(iconsState, function(key, value) { // Only topics can be hot