Minor - fixing PHP warnings.

1.9.x
Julio Montoya 11 years ago
parent 4c7ae2ff19
commit ae8845c51c
  1. 11
      main/inc/ajax/work.ajax.php

@ -5,16 +5,17 @@
*/
require_once '../global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'work/work.lib.php';
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null;
$is_allowed_to_edit = api_is_allowed_to_edit();
$isAllowedToEdit = api_is_allowed_to_edit();
switch ($action) {
case 'delete_work':
if ($is_allowed_to_edit) {
if ($isAllowedToEdit) {
if (empty($_REQUEST['id'])) {
return false;
}
$workList = explode(',', $_REQUEST['id']);
foreach ($workList as $workId) {
deleteDirWork($workId);
@ -25,4 +26,4 @@ switch ($action) {
echo '';
break;
}
exit;
exit;

Loading…
Cancel
Save