aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cgi/oekaki.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cgi/oekaki.py b/cgi/oekaki.py
index f0bada7..14446d7 100644
--- a/cgi/oekaki.py
+++ b/cgi/oekaki.py
@@ -113,7 +113,7 @@ def oekaki(self, path_split):
# path splits:
# 3: Board
# 4: Parentid
- if path_split > 7:
+ if len(path_split) >= 5:
# Al terminar de dibujar, llegamos aqui. Damos la opcion de postearlo.
board = setBoard(path_split[3])
try:
@@ -121,6 +121,9 @@ def oekaki(self, path_split):
except:
parentid = None
+ if board['allow_oekaki'] != '1':
+ raise UserError, 'Esta sección no soporta oekaki.'
+
ts = int(time.time())
ip = inet_aton(self.environ["REMOTE_ADDR"])
fname = "%s/oek_temp/%d.png" % (Settings.HOME_DIR, ip)
@@ -144,7 +147,6 @@ def oekaki(self, path_split):
timetaken = 0
page += renderTemplate("board.html", {"threads": None, "oek_finish": oek, "replythread": parentid, "ts": ts})
-
elif path_split[2] == 'animation':
try:
board = setBoard(path_split[3])