aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Home.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-07-25 17:56:18 +0700
committerGravatar Ugnich Anton2014-07-25 17:56:18 +0700
commita0a9e4151991111886d88b565fda7db9fba1dfd8 (patch)
tree7f8ff1a97b2830f584d7c9d616997b1906422966 /src/java/com/juick/http/www/Home.java
parent2b9c93ac6d216b67e95ccc0cfb30bc5f58c9744a (diff)
SEO, advertising
Diffstat (limited to 'src/java/com/juick/http/www/Home.java')
-rw-r--r--src/java/com/juick/http/www/Home.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java
index f54128f4..8b4ec6a6 100644
--- a/src/java/com/juick/http/www/Home.java
+++ b/src/java/com/juick/http/www/Home.java
@@ -94,7 +94,7 @@ public class Home {
PrintWriter out = response.getWriter();
try {
String head = "";
- if (paramBefore > 0) {
+ if (paramBefore > 0 || paramShow != null) {
head = "<meta name=\"robots\" content=\"noindex\"/>";
}
PageTemplates.pageHead(out, title, head);
@@ -122,12 +122,12 @@ public class Home {
if (mids.size() > 0) {
int ad_mid = 0;
- if (visitor != null && (paramShow == null || paramShow.equals("top") || paramShow.equals("all"))) {
- ad_mid = AdsQueries.getAdMID(sql, visitor.UID);
-
+ if (paramShow == null || paramShow.equals("top") || paramShow.equals("all")) {
+ int vuid = visitor != null ? visitor.UID : 0;
+ ad_mid = AdsQueries.getAdMID(sql, vuid);
if (ad_mid > 0 && mids.indexOf(ad_mid) == -1) {
mids.add(0, ad_mid);
- AdsQueries.logAdMID(sql, visitor.UID, ad_mid);
+ AdsQueries.logAdMID(sql, vuid, ad_mid);
} else {
ad_mid = 0;
}