From cbe7aea4d94b6b57f4948343fa43f0ca8ab93f80 Mon Sep 17 00:00:00 2001 From: echicken <echicken@bbs.electronicchicken.com> Date: Wed, 7 Dec 2016 17:39:34 -0500 Subject: [PATCH] Moved stuff around to log a warning instead of an error if client browses a non-existent thread. --- web/root/pages/001-forum.ssjs | 49 ++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/web/root/pages/001-forum.ssjs b/web/root/pages/001-forum.ssjs index a8b1018f26..c1d4427a46 100644 --- a/web/root/pages/001-forum.ssjs +++ b/web/root/pages/001-forum.ssjs @@ -387,36 +387,37 @@ if (typeof http_request.query.sub !== 'undefined' && msg_area.sub[http_request.query.sub[0]].scan_ptr = thread.messages[thread.__last].number; } - } catch (err) { - log(LOG_WARNING, err); - } - writeln(strings.script.open); - if (settings.keyboard_navigation) writeln(strings.script.thread_navigation); - if (settings.vote_functions) { - if (user.alias != settings.guest || user.security.restrictions&UFLAG_V) { + writeln(strings.script.open); + if (settings.keyboard_navigation) writeln(strings.script.thread_navigation); + if (settings.vote_functions) { + if (user.alias != settings.guest || user.security.restrictions&UFLAG_V) { + writeln( + format(strings.script.vote_functions, http_request.query.sub[0]) + ); + } writeln( - format(strings.script.vote_functions, http_request.query.sub[0]) - ); - } - writeln( - format( - strings.script.vote_refresh_thread, - http_request.query.sub[0], thread.__first - ) - ); - writeln( - format( - strings.script.interval, format( strings.script.vote_refresh_thread, http_request.query.sub[0], thread.__first - ), - settings.refresh_interval || 60000 - ) - ); + ) + ); + writeln( + format( + strings.script.interval, + format( + strings.script.vote_refresh_thread, + http_request.query.sub[0], thread.__first + ), + settings.refresh_interval || 60000 + ) + ); + } + writeln(strings.script.close); + + } catch (err) { + log(LOG_WARNING, err); } - writeln(strings.script.close); } else if ( typeof http_request.query.sub !== 'undefined' && -- GitLab