Skip to content
Permalink
Browse files

making sure our redirects post-error go somewhere useful

  • Loading branch information...
caseysoftware committed Mar 13, 2014
1 parent 450da52 commit 6a2506567b8d8229562b487037becb1a9f0c6da5
Showing with 3 additions and 3 deletions.
  1. +3 −3 modules/files/do_file_aed.php
@@ -17,7 +17,7 @@
$isNotNew = (int) w2PgetParam($_POST, 'file_id', '0');
$cancel = (int) w2PgetParam($_POST, 'cancel', 0);
$duplicate = (int) w2PgetParam($_POST, 'duplicate', 0);
$redirect = w2PgetParam($_POST, 'redirect', '');
$redirect = w2PgetParam($_POST, 'redirect', 'm=files');
$notify = w2PgetParam($_POST, 'notify', '0');
$notify = ($notify != '0') ? '1' : '0';
@@ -70,7 +70,7 @@
$new_file->file_folder = 0;
if (!($dup_realname = $obj->duplicateFile($obj->file_project, $obj->file_real_filename))) {
$AppUI->setMsg('Could not duplicate file, check file permissions', UI_MSG_ERROR);
$AppUI->redirect();
$AppUI->redirect($redirect);
} else {
$new_file->file_real_filename = $dup_realname;
$result = $new_file->store();
@@ -90,7 +90,7 @@
if (count($obj->getError())) {
$AppUI->setMsg($obj->getError(), UI_MSG_ERROR);
$AppUI->redirect();
$AppUI->redirect($redirect);
}
if ($result) {

0 comments on commit 6a25065

Please sign in to comment.
You can’t perform that action at this time.