From 7c9a7590f30873df16941057c59abdb4b8672836 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Wed, 9 Jul 2014 14:57:58 +0700 Subject: Change message privacy --- src/java/com/juick/http/www/PageTemplates.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/java/com') diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index cefd3cdd..dabbea99 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -53,7 +53,7 @@ public class PageTemplates { out.print(""); out.print(""); out.print(""); - out.print(""); + out.print(""); if (headers != null) { out.print(headers); } @@ -219,12 +219,19 @@ public class PageTemplates { out.print("Facebook"); out.println(""); out.print("
juick.com © 2008-2014"); - if (sapeon && sape != null && (visitor == null || visitor.UID == 1) && request.getQueryString() == null) { - String links = sape.getPageLinks(request.getRequestURI(), request.getCookies()).render(); + + String queryString = request.getQueryString(); + String requestURI = request.getRequestURI(); + if (sapeon && sape != null && (visitor == null || visitor.UID == 1) && queryString == null) { + String links = sape.getPageLinks(requestURI, request.getCookies()).render(); if (links != null && !links.isEmpty()) { out.print("
Спонсоры: " + links); } } + if ((visitor == null || visitor.UID == 1) && queryString != null && requestURI != null && requestURI.equals("/")) { + out.print("
сиам"); + } + out.println("
"); out.println(""); @@ -529,6 +536,9 @@ public class PageTemplates { out.print("Комментировать "); } out.print("Мне нравится"); + if (visitor != null && msg.Privacy < 0 && msg.User.UID == visitor.UID) { + out.print(" Открыть доступ"); + } if (visitor != null && visitor.UID == 1) { out.print(" +"); out.print(" -"); -- cgit v1.2.3