aboutsummaryrefslogtreecommitdiff
path: root/cgi/manage.py
diff options
context:
space:
mode:
authorLibravatar z411 2019-03-30 22:08:28 -0300
committerLibravatar z411 2019-03-30 22:08:28 -0300
commitb0217fa450e43286e1f0820195ad833bf97c2d98 (patch)
tree47f8de090b25292f5d7c1fed546aed979d923daf /cgi/manage.py
parent4ae394f5dfd8d8024df7c8637ffb33891fc346e7 (diff)
downloadweabot-b0217fa450e43286e1f0820195ad833bf97c2d98.tar.gz
weabot-b0217fa450e43286e1f0820195ad833bf97c2d98.tar.xz
weabot-b0217fa450e43286e1f0820195ad833bf97c2d98.zip
Ahora los textboards tambiƩn usan `res` como res dir.
Nunca hubo necesidad de cambiarlo a `read` ya que se hace un Rewrite de todas maneras.
Diffstat (limited to 'cgi/manage.py')
-rw-r--r--cgi/manage.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/cgi/manage.py b/cgi/manage.py
index 9ac2006..3df0f77 100644
--- a/cgi/manage.py
+++ b/cgi/manage.py
@@ -1836,28 +1836,21 @@ def switchBoard(new_type):
return
kako_dir = os.path.join(Settings.ROOT_DIR, board['dir'], 'kako')
+ res_dir = os.path.join(Settings.ROOT_DIR, board['dir'], 'res')
if new_type == '0':
# Switching to Imageboard
- old_res_dir = os.path.join(Settings.ROOT_DIR, board['dir'], 'read')
- new_res_dir = os.path.join(Settings.ROOT_DIR, board['dir'], 'res')
-
# Delete kako if empty
if os.path.exists(kako_dir) and not os.listdir(kako_dir):
os.rmdir(kako_dir)
elif new_type == '1':
# Switching to Textboard
- old_res_dir = os.path.join(Settings.ROOT_DIR, board['dir'], 'res')
- new_res_dir = os.path.join(Settings.ROOT_DIR, board['dir'], 'read')
-
# Make kako dir
if not os.path.exists(kako_dir):
os.mkdir(kako_dir)
-
- os.rename(old_res_dir, new_res_dir)
# Clean res dir
- cleanDir(new_res_dir, ext="html")
+ cleanDir(res_dir, ext="html")
def logAction(staff, action):
InsertDb("INSERT INTO `logs` (`timestamp`, `staff`, `action`) VALUES (" + str(timestamp()) + ", '" + _mysql.escape_string(staff) + "\', \'" + _mysql.escape_string(action) + "\')")