Adding api_protect_course_script in ajax calls

skala
Julio Montoya 14 years ago
parent e6adf46b2c
commit 9000169e70
  1. 6
      main/inc/ajax/document.ajax.php
  2. 5
      main/inc/ajax/exercise.ajax.php
  3. 2
      main/inc/ajax/thematic.ajax.php

@ -4,9 +4,9 @@
* Responses to AJAX calls for the document upload
*/
require_once '../global.inc.php';
if (api_is_anonymous()) {
exit;
}
api_protect_course_script(true);
if(!empty($_FILES)) {
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php';

@ -4,9 +4,8 @@
* Responses to AJAX calls
*/
require_once '../global.inc.php';
if (api_is_anonymous()) {
exit;
}
api_protect_course_script(true);
$action = $_REQUEST['a'];

@ -8,6 +8,8 @@ require_once '../global.inc.php';
require_once api_get_path(LIBRARY_PATH).'attendance.lib.php';
require_once api_get_path(LIBRARY_PATH).'thematic.lib.php';
api_protect_course_script(true);
$action = $_GET['a'];
switch ($action) {

Loading…
Cancel
Save