diff options
Diffstat (limited to 'cgi/manage.py')
-rw-r--r-- | cgi/manage.py | 11 |
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) + "\')") |