]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8590 auth cleanup - part 5
authorskodak <skodak>
Tue, 20 Feb 2007 17:29:45 +0000 (17:29 +0000)
committerskodak <skodak>
Tue, 20 Feb 2007 17:29:45 +0000 (17:29 +0000)
mod/lams/constants.php
mod/lams/lib.php
mod/lams/list.php
mod/lams/userinfo.php

index 7f18c506d4446120761e14ced5a362a4f4eff92b..dae5323f48afc2244bdaf2ef082353f446faa571 100644 (file)
@@ -1,6 +1,6 @@
 <?php  /// LAMS constants
 
-unset($LAMSCONSTANTS);
+$LAMSCONSTANTS = new object();
 
 $LAMSCONSTANTS->login_request   = '/LoginRequest';
 $LAMSCONSTANTS->param_uid       = 'uid';
index 8a9722f0d2915dff3f9c530c5779e0628ba8eec0..f96f32877a977897c219b2af8736c1162bdf710e 100644 (file)
@@ -1,9 +1,11 @@
 <?PHP  // $Id$
 
 /// Library of functions and constants for module lams
-include_once('../../config.php');
-require_once($CFG->dirroot.'/lib/datalib.php');
-require_once($CFG->dirroot.'/lib/moodlelib.php');
+
+if (!defined('MOODLE_INTERNAL')) {
+    die('Direct access to this script is forbidden.');    ///  It must be included from a Moodle page
+}
+
 require_once($CFG->dirroot.'/lib/soaplib.php');
 
 
index fde3fdd0bdd584c9127a7326df4f080548b91a38..09cfd6702b6111c44276a221bab13dd07588efd2 100644 (file)
@@ -2,7 +2,8 @@
 
 /// send LAMS learning deisgn list as a string seperated by ":" to client
 
-include_once("lib.php");
+require_once("../../config.php");
+require_once("lib.php");
 
 $result = lams_get_sequences($USER->username,$courseid);
 if(is_string($result)){//some exception happened!
index 0db32cfd4bf8a2bfedb2802b9fcaafe02ad73d6f..2a34ed85664a82a05cbcd03a3d6c9d221a10aa4e 100644 (file)
@@ -13,7 +13,6 @@
  * serverId and serverKey
  */
   include_once("../../config.php");
-    include_once($CFG->dirroot.'/lib/datalib.php');
 
     if(!isset($CFG->lams_serverid)||!isset($CFG->lams_serverkey))
     {