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

Loading…
Cancel
Save