From 48b7aa72126b1a75e470077de48408d24fb1b546 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sat, 15 Feb 2014 13:13:04 +0700 Subject: New message layout (article); Google Analytics; small bugfixes --- src/java/com/juick/http/www/User.java | 42 +++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'src/java/com/juick/http/www/User.java') diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java index 71b9ae16..1e469a1d 100644 --- a/src/java/com/juick/http/www/User.java +++ b/src/java/com/juick/http/www/User.java @@ -49,8 +49,14 @@ public class User { com.juick.Tag paramTag = null; String paramTagStr = request.getParameter("tag"); - if (paramTagStr != null && paramTagStr.length() < 64) { - paramTag = TagQueries.getTag(sql, paramTagStr, false); + if (paramTagStr != null) { + if (paramTagStr.length() < 64) { + paramTag = TagQueries.getTag(sql, paramTagStr, false); + } + if (paramTag == null) { + response.sendError(404); + return; + } } int paramBefore = 0; @@ -107,28 +113,26 @@ public class User { pageUserColumn(out, sql, user, visitor); - out.println("
"); - out.println(""); - if (mids.size() >= 20) { - String nextpage = "?before=" + mids.get(mids.size() - 1); - if (paramShow != null) { - nextpage += "&show=" + paramShow; - } - if (paramTag != null) { - nextpage += "&tag=" + URLEncoder.encode(paramTag.Name, "UTF-8"); - } - if (paramSearch != null) { - nextpage += "&search=" + URLEncoder.encode(paramSearch, "UTF-8"); + if (mids.size() >= 20) { + String nextpage = "?before=" + mids.get(mids.size() - 1); + if (paramShow != null) { + nextpage += "&show=" + paramShow; + } + if (paramTag != null) { + nextpage += "&tag=" + URLEncoder.encode(paramTag.Name, "UTF-8"); + } + if (paramSearch != null) { + nextpage += "&search=" + URLEncoder.encode(paramSearch, "UTF-8"); + } + out.println("

Older →

"); } - out.println("

Older →

"); - } - out.println("
"); + out.println(""); + } PageTemplates.pageFooter(request, out, visitor, true); PageTemplates.pageDialogTemplate(out); -- cgit v1.2.3