aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Home.java
diff options
context:
space:
mode:
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;
}