[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/lib/ -> customcheckslib.php (source)

   1  <?php  //$Id: customcheckslib.php,v 1.1.2.3 2008/01/12 18:49:38 stronk7 Exp $
   2  
   3  ///////////////////////////////////////////////////////////////////////////
   4  //                                                                       //
   5  // NOTICE OF COPYRIGHT                                                   //
   6  //                                                                       //
   7  // Moodle - Modular Object-Oriented Dynamic Learning Environment         //
   8  //          http://moodle.com                                            //
   9  //                                                                       //
  10  // Copyright (C) 1999 onwards Martin Dougiamas     http://dougiamas.com  //
  11  //           (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com  //
  12  //                                                                       //
  13  // This program is free software; you can redistribute it and/or modify  //
  14  // it under the terms of the GNU General Public License as published by  //
  15  // the Free Software Foundation; either version 2 of the License, or     //
  16  // (at your option) any later version.                                   //
  17  //                                                                       //
  18  // This program is distributed in the hope that it will be useful,       //
  19  // but WITHOUT ANY WARRANTY; without even the implied warranty of        //
  20  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
  21  // GNU General Public License for more details:                          //
  22  //                                                                       //
  23  //          http://www.gnu.org/copyleft/gpl.html                         //
  24  //                                                                       //
  25  ///////////////////////////////////////////////////////////////////////////
  26  
  27  /// This library contains a collection of functions able to perform
  28  /// some custom checks executed by environmental tests (automatically
  29  /// executed on install & upgrade and under petition in the admin block).
  30  ///
  31  /// Any function in this library must return:
  32  /// - null: if the test isn't relevant and must not be showed (ignored)
  33  /// - environment_results object with the status set to:
  34  ///     - true: if passed
  35  ///     - false: if failed
  36  
  37  /**
  38   * This function will look for the risky PHP setting register_globals
  39   * in order to inform about. MDL-12914
  40   *
  41   * @param $result the environment_results object to be modified
  42   * @return mixed null if the test is irrelevant or environment_results object with
  43   *               status set to true (test passed) or false (test failed)
  44   */
  45  function php_check_register_globals($result) {
  46  
  47  /// Check for register_globals. If enabled, security warning
  48      if (ini_get_bool('register_globals')) {
  49          $result->status = false;
  50      } else {
  51          $result = null;
  52      }
  53  
  54      return $result;
  55  }
  56  
  57  ?>


Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7