@@ 149-161 (lines=13) @@ | ||
146 | $msg = DirectoryChecker::createDirectory($path) ? constant('CO_' . $moduleDirNameUpper . '_' . 'DC_DIRCREATED') : constant('CO_' . $moduleDirNameUpper . '_' . 'DC_DIRNOTCREATED'); |
|
147 | redirect_header($redirect, Constants::REDIRECT_DELAY_MEDIUM, $msg . ': ' . $path); |
|
148 | break; |
|
149 | case 'setdirperm': |
|
150 | if (\Xmf\Request::hasVar('path', 'POST')) { |
|
151 | $path = $_POST['path']; |
|
152 | } |
|
153 | if (\Xmf\Request::hasVar('redirect', 'POST')) { |
|
154 | $redirect = $_POST['redirect']; |
|
155 | } |
|
156 | if (\Xmf\Request::hasVar('mode', 'POST')) { |
|
157 | $mode = $_POST['mode']; |
|
158 | } |
|
159 | $msg = DirectoryChecker::setDirectoryPermissions($path, $mode) ? constant('CO_' . $moduleDirNameUpper . '_' . 'DC_PERMSET') : constant('CO_' . $moduleDirNameUpper . '_' . 'DC_PERMNOTSET'); |
|
160 | redirect_header($redirect, Constants::REDIRECT_DELAY_MEDIUM, $msg . ': ' . $path); |
|
161 | break; |
|
162 | } |
|
163 |
@@ 149-161 (lines=13) @@ | ||
146 | ||
147 | $op = Request::getString('op', '', 'POST'); |
|
148 | switch ($op) { |
|
149 | case 'copyfile': |
|
150 | if (\Xmf\Request::hasVar('original_file_path', 'POST')) { |
|
151 | $original_file_path = $_POST['original_file_path']; |
|
152 | } |
|
153 | if (\Xmf\Request::hasVar('file_path', 'POST')) { |
|
154 | $file_path = $_POST['file_path']; |
|
155 | } |
|
156 | if (\Xmf\Request::hasVar('redirect', 'POST')) { |
|
157 | $redirect = $_POST['redirect']; |
|
158 | } |
|
159 | $msg = FileChecker::copyFile($original_file_path, $file_path) ? constant('CO_' . $moduleDirNameUpper . '_' . 'FC_FILECOPIED') : constant('CO_' . $moduleDirNameUpper . '_' . 'FC_FILENOTCOPIED'); |
|
160 | redirect_header($redirect, Constants::REDIRECT_DELAY_MEDIUM, $msg . ': ' . $file_path); |
|
161 | break; |
|
162 | } |
|
163 |