Minor - Add license refs + change dirname(__FILE__) to __DIR__ (about 4 times faster). See http://stackoverflow.com/questions/2749416/is-there-any-difference-between-dir-and-dirname-file-in-php

pull/2487/head
Yannick Warnier 9 years ago
parent ad0f69061f
commit d1b37f34fe
  1. 4
      main/auth/cas/lib/CAS.php
  2. 4
      main/auth/cas/lib/CAS/PGTStorage/pgt-main.php
  3. 8
      main/auth/cas/lib/CAS/client.php
  4. 2
      main/auth/conditional_login/complete_phone_number.php
  5. 7
      main/auth/external_login/facebook.inc.php
  6. 2
      main/auth/external_login/facebook.init.php
  7. 2
      main/auth/external_login/ldap.inc.php
  8. 6
      main/auth/external_login/ldap_import_all_users.php
  9. 4
      main/auth/external_login/login.ldap.php
  10. 2
      main/auth/external_login/login.ws.php
  11. 4
      main/auth/external_login/newUser.ldap.php
  12. 2
      main/auth/external_login/newUser.php
  13. 2
      main/auth/external_login/updateUser.php
  14. 2
      main/auth/shibboleth/app/model/admin.class.php
  15. 2
      main/auth/shibboleth/app/model/user.class.php
  16. 2
      main/auth/shibboleth/app/shibboleth.class.php
  17. 4
      main/auth/shibboleth/app/view/admin_login.php
  18. 4
      main/auth/shibboleth/app/view/request.php
  19. 2
      main/auth/shibboleth/config-dist.php
  20. 2
      main/auth/shibboleth/init.php
  21. 2
      main/auth/shibboleth/lib/scaffolder/scaffolder.class.php
  22. 2
      main/auth/shibboleth/login.php
  23. 6
      main/auth/shibboleth/script/scaffold.php
  24. 2
      main/auth/shibboleth/test/test.php
  25. 4
      main/auth/shibboleth/test/test_no_email.php
  26. 2
      main/cron/user_import/client.php
  27. 2
      main/exercise/export/qti2/qti2_export.php
  28. 2
      main/inc/lib/formvalidator/Rule/HTML.php
  29. 4
      main/inc/lib/internationalization.lib.php
  30. 2
      main/inc/lib/phpseclib/Crypt/RSA.php
  31. 2
      main/inc/lib/search/ChamiloIndexer.class.php
  32. 2
      main/inc/lib/search/get_terms.php
  33. 2
      main/inc/lib/search/search_widget.php
  34. 4
      main/inc/lib/search/tool_processors/document_processor.class.php
  35. 6
      main/inc/lib/search/tool_processors/learnpath_processor.class.php
  36. 4
      main/inc/lib/search/tool_processors/link_processor.class.php
  37. 4
      main/inc/lib/search/tool_processors/quiz_processor.class.php
  38. 2
      main/inc/lib/search/xapian/XapianIndexer.class.php
  39. 6
      main/inc/lib/search/xapian/XapianQuery.php
  40. 4
      main/inc/lib/xajax/xajax.inc.php
  41. 2
      main/install/install.lib.php
  42. 2
      main/search/search_suggestions.php
  43. 17
      main/webservices/cm_soap.php
  44. 8
      main/webservices/cm_soap_announcements.php
  45. 8
      main/webservices/cm_soap_course.php
  46. 8
      main/webservices/cm_soap_courses.php
  47. 8
      main/webservices/cm_soap_forum.php
  48. 8
      main/webservices/cm_soap_inbox.php
  49. 9
      main/webservices/cm_soap_user.php
  50. 6
      main/webservices/cm_webservice.php
  51. 7
      main/webservices/cm_webservice_announcements.php
  52. 7
      main/webservices/cm_webservice_course.php
  53. 7
      main/webservices/cm_webservice_courses.php
  54. 12
      main/webservices/cm_webservice_forum.php
  55. 9
      main/webservices/cm_webservice_inbox.php
  56. 9
      main/webservices/cm_webservice_user.php
  57. 10
      main/webservices/soap.php
  58. 4
      main/webservices/soap_course.php
  59. 4
      main/webservices/soap_report.php
  60. 5
      main/webservices/soap_session.php
  61. 4
      main/webservices/soap_user.php
  62. 2
      main/webservices/webservice.php
  63. 4
      main/webservices/webservice_course.php
  64. 4
      main/webservices/webservice_report.php
  65. 5
      main/webservices/webservice_session.php
  66. 4
      main/webservices/webservice_user.php
  67. 2
      plugin/advanced_subscription/install.php
  68. 2
      plugin/advanced_subscription/uninstall.php
  69. 6
      plugin/azure_active_directory/src/callback.php
  70. 17
      plugin/bbb/cron.php
  71. 2
      plugin/buycourses/install.php
  72. 2
      plugin/buycourses/plugin.php
  73. 6
      plugin/buycourses/src/Requests.php
  74. 22
      plugin/buycourses/src/culqi.php
  75. 2
      plugin/buycourses/uninstall.php
  76. 2
      plugin/clockworksms/install.php
  77. 2
      plugin/clockworksms/plugin.php
  78. 2
      plugin/clockworksms/uninstall.php
  79. 2
      plugin/courseblock/install.php
  80. 2
      plugin/courselegal/install.php
  81. 2
      plugin/courselegal/start.php
  82. 2
      plugin/courselegal/user_list.php
  83. 2
      plugin/jcapture/applet.php
  84. 2
      plugin/kannelsms/install.php
  85. 2
      plugin/kannelsms/plugin.php
  86. 2
      plugin/kannelsms/uninstall.php
  87. 2
      plugin/olpc_peru_filter/install.php
  88. 2
      plugin/olpc_peru_filter/lib/olpc_peru_filter_plugin.class.php
  89. 2
      plugin/olpc_peru_filter/plugin.php
  90. 2
      plugin/olpc_peru_filter/uninstall.php
  91. 2
      plugin/openmeetings/install.php
  92. 2
      plugin/openmeetings/listing.php
  93. 2
      plugin/openmeetings/start.php
  94. 2
      plugin/openmeetings/uninstall.php
  95. 4
      plugin/pens/lib/pens/pens_client.php
  96. 2
      plugin/pens/lib/pens/pens_controller.php
  97. 2
      plugin/pens/lib/pens/pens_package_handler.php
  98. 8
      plugin/pens/lib/pens/pens_request.php
  99. 4
      plugin/pens/lib/tests/test_pens_package_handler.php
  100. 4
      plugin/pens/lib/tests/test_pens_request.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -40,7 +40,7 @@ if (!$_SERVER['REQUEST_URI']) {
// another one by Vangelis Haniotakis also to make phpCAS work with PHP5 // another one by Vangelis Haniotakis also to make phpCAS work with PHP5
// //
if (version_compare(PHP_VERSION, '5', '>=')) { if (version_compare(PHP_VERSION, '5', '>=')) {
require_once(dirname(__FILE__) . '/CAS/domxml-php4-to-php5.php'); require_once __DIR__.'/CAS/domxml-php4-to-php5.php';
} }
/** /**
@ -322,7 +322,7 @@ $GLOBALS['PHPCAS_DEBUG'] = array(
// ######################################################################## // ########################################################################
// include client class // include client class
include_once(dirname(__FILE__) . '/CAS/client.php'); include_once __DIR__.'/CAS/client.php';
// ######################################################################## // ########################################################################
// INTERFACE CLASS // INTERFACE CLASS

@ -209,7 +209,7 @@ class PGTStorage
} }
// include specific PGT storage classes // include specific PGT storage classes
include_once(dirname(__FILE__).'/pgt-file.php'); include_once __DIR__.'/pgt-file.php';
include_once(dirname(__FILE__).'/pgt-db.php'); include_once __DIR__.'/pgt-db.php';
?> ?>

@ -35,10 +35,10 @@
*/ */
// include internationalization stuff // include internationalization stuff
include_once(dirname(__FILE__) . '/languages/languages.php'); include_once __DIR__.'/languages/languages.php';
// include PGT storage classes // include PGT storage classes
include_once(dirname(__FILE__) . '/PGTStorage/pgt-main.php'); include_once __DIR__.'/PGTStorage/pgt-main.php';
/** /**
* @class CASClient * @class CASClient
@ -240,10 +240,10 @@ class CASClient
function setLang($lang) function setLang($lang)
{ {
// include the corresponding language file // include the corresponding language file
include_once(dirname(__FILE__) . '/languages/' . $lang . '.php'); include_once __DIR__.'/languages/'.$lang.'.php';
if (!is_array($this->_strings)) { if (!is_array($this->_strings)) {
trigger_error('language `' . $lang . '\' is not implemented', E_USER_ERROR); trigger_error('language `'.$lang.'\' is not implemented', E_USER_ERROR);
} }
$this->_lang = $lang; $this->_lang = $lang;
} }

@ -1,7 +1,7 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
require_once dirname(__FILE__).'/../../inc/global.inc.php'; require_once __DIR__.'/../../inc/global.inc.php';
$url = api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php'; $url = api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php';
if (! isset($_SESSION['conditional_login']['uid'])) if (! isset($_SESSION['conditional_login']['uid']))

@ -11,10 +11,9 @@
* Please edit the facebook.conf.php file to adapt it to your fb application parameter * Please edit the facebook.conf.php file to adapt it to your fb application parameter
*/ */
require_once dirname(__FILE__) . '/../../inc/global.inc.php'; require_once __DIR__.'/../../inc/global.inc.php';
require_once dirname(__FILE__) . '/facebook.init.php'; require_once __DIR__.'/facebook.init.php';
require_once __DIR__.'/functions.inc.php';
require_once dirname(__FILE__) . '/functions.inc.php';
/** /**
* This function connect to facebook and retrieves the user info * This function connect to facebook and retrieves the user info

@ -22,5 +22,5 @@
* See facebook section of the auth.conf.php file * See facebook section of the auth.conf.php file
*/ */
require dirname(__FILE__) . '/../../../app/config/auth.conf.php'; require __DIR__.'/../../../app/config/auth.conf.php';

@ -5,7 +5,7 @@
* This files is included by newUser.ldap.php and login.ldap.php * This files is included by newUser.ldap.php and login.ldap.php
* It implements the functions nedded by both files * It implements the functions nedded by both files
* */ * */
require_once dirname(__FILE__).'/../../inc/global.inc.php'; require_once __DIR__.'/../../inc/global.inc.php';
$debug = false; $debug = false;

@ -13,9 +13,9 @@ if (PHP_SAPI != 'cli') {
} }
use \ChamiloSession as Session; use \ChamiloSession as Session;
require dirname(__FILE__) . '/../../inc/global.inc.php'; require __DIR__.'/../../inc/global.inc.php';
require dirname(__FILE__) . '/ldap.inc.php'; require __DIR__.'/ldap.inc.php';
require dirname(__FILE__) . '/../../inc/conf/auth.conf.php'; require __DIR__.'/../../inc/conf/auth.conf.php';
/** /**
* Code execution * Code execution
*/ */

@ -40,8 +40,8 @@ use ChamiloSession as Session;
* *
* */ * */
require_once dirname(__FILE__).'/ldap.inc.php'; require_once __DIR__.'/ldap.inc.php';
require_once dirname(__FILE__).'/functions.inc.php'; require_once __DIR__.'/functions.inc.php';
$debug = false; $debug = false;
if ($debug) { if ($debug) {

@ -14,7 +14,7 @@ use ChamiloSession as Session;
$wsUrl = ''; $wsUrl = '';
// include common authentication functions // include common authentication functions
require_once dirname(__FILE__) . '/functions.inc.php'; require_once __DIR__.'/functions.inc.php';
// call the login checker (defined below) // call the login checker (defined below)
$isValid = loginWSAuthenticate($login, $password, $wsUrl); $isValid = loginWSAuthenticate($login, $password, $wsUrl);

@ -39,8 +39,8 @@
use ChamiloSession as Session; use ChamiloSession as Session;
require_once dirname(__FILE__) . '/ldap.inc.php'; require_once __DIR__.'/ldap.inc.php';
require_once dirname(__FILE__) . '/functions.inc.php'; require_once __DIR__.'/functions.inc.php';
$ldap_user = extldap_authenticate($login, $password); $ldap_user = extldap_authenticate($login, $password);
if ($ldap_user !== false) { if ($ldap_user !== false) {

@ -10,7 +10,7 @@
use ChamiloSession as Session; use ChamiloSession as Session;
require_once(dirname(__FILE__) . '/functions.inc.php'); require_once __DIR__.'/functions.inc.php';
//MAIN CODE //MAIN CODE
//$login and $password variables are setted in main/inc/local.inc.php //$login and $password variables are setted in main/inc/local.inc.php

@ -7,7 +7,7 @@ This script must not exit.
use ChamiloSession as Session; use ChamiloSession as Session;
require_once(dirname(__FILE__) . '/functions.inc.php'); require_once __DIR__.'/functions.inc.php';
//MAIN CODE //MAIN CODE
//$uData variable is set in local.inc.php //$uData variable is set in local.inc.php

@ -2,7 +2,7 @@
namespace Shibboleth; namespace Shibboleth;
require_once dirname(__FILE__) . '/scaffold/admin.class.php'; require_once __DIR__.'/scaffold/admin.class.php';
/** /**
* A Chamilo admin. Model for the Admin table. * A Chamilo admin. Model for the Admin table.

@ -2,7 +2,7 @@
namespace Shibboleth; namespace Shibboleth;
require_once dirname(__FILE__) . '/scaffold/user.class.php'; require_once __DIR__.'/scaffold/user.class.php';
/** /**
* A Chamilo user. Model for the User table. * A Chamilo user. Model for the User table.

@ -78,7 +78,7 @@ class Shibboleth
public static function sys_path() public static function sys_path()
{ {
$path = dirname(__FILE__) . '/../'; $path = __DIR__.'/../';
return $path; return $path;
} }

@ -12,7 +12,7 @@ namespace Shibboleth;
* @license see /license.txt * @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva * @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva
*/ */
$dir = dirname(__FILE__); $dir = __DIR__;
include_once("$dir/../../init.php"); include_once "$dir/../../init.php";
ShibbolethController::instance()->admin_login(); ShibbolethController::instance()->admin_login();

@ -14,7 +14,7 @@ namespace Shibboleth;
* @license see /license.txt * @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva * @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva
*/ */
$dir = dirname(__FILE__); $dir = __DIR__;
include_once("$dir/../../init.php"); include_once "$dir/../../init.php";
ShibbolethController::instance()->request_status(); ShibbolethController::instance()->request_status();

@ -11,6 +11,6 @@ namespace Shibboleth;
* @license see /license.txt * @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva * @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva
*/ */
require_once dirname(__FILE__) . '/config/aai.class.php'; require_once __DIR__.'/config/aai.class.php';
Shibboleth::set_config(aai::config()); Shibboleth::set_config(aai::config());

@ -10,7 +10,7 @@ namespace Shibboleth;
* @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva * @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva
*/ */
$__dir = dirname(__FILE__) . '/'; $__dir = __DIR__.'/';
$no_redirection = true; //no redirection in global. $no_redirection = true; //no redirection in global.
include_once($__dir . '/../../inc/global.inc.php'); include_once($__dir . '/../../inc/global.inc.php');

@ -56,7 +56,7 @@ class Scaffolder
ob_start(); ob_start();
include dirname(__FILE__) . '/template/model.php'; include __DIR__.'/template/model.php';
$result = ob_get_clean(); $result = ob_get_clean();
return $result; return $result;
} }

@ -15,7 +15,7 @@ namespace Shibboleth;
* @license see /license.txt * @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva * @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva
*/ */
include_once(dirname(__FILE__) . '/init.php'); include_once __DIR__.'/init.php';
/* /*
============================================================================== ==============================================================================

@ -11,9 +11,9 @@ namespace Shibboleth;
* @license see /license.txt * @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva * @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva
*/ */
$dir = dirname(__FILE__); $dir = __DIR__;
include_once($dir . '/../init.php'); include_once $dir.'/../init.php';
include_once($dir . '/../app/lib/scaffolder/scaffolder.class.php'); include_once $dir.'/../app/lib/scaffolder/scaffolder.class.php';
if (!ShibbolethTest::is_enabled()) if (!ShibbolethTest::is_enabled())
{ {

@ -8,7 +8,7 @@ namespace Shibboleth;
* @license see /license.txt * @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva * @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva
*/ */
include_once(dirname(__FILE__) . '/../init.php'); include_once __DIR__.'/../init.php';
if (!ShibbolethTest::is_enabled()) if (!ShibbolethTest::is_enabled())
{ {

@ -6,7 +6,7 @@ namespace Shibboleth;
* @license see /license.txt * @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva * @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva
*/ */
include_once(dirname(__FILE__) . '/../init.php'); include_once __DIR__.'/../init.php';
if (!ShibbolethTest::is_enabled()) if (!ShibbolethTest::is_enabled())
{ {
@ -17,4 +17,4 @@ if (!ShibbolethTest::is_enabled())
Shibboleth::session()->logout(); Shibboleth::session()->logout();
ShibbolethTest::helper()->setup_new_student_no_email(); ShibbolethTest::helper()->setup_new_student_no_email();
require_once dirname(__FILE__) . '/../login.php'; require_once __DIR__.'/../login.php';

@ -12,7 +12,7 @@
/** /**
* Global cycle: init, execute, output * Global cycle: init, execute, output
*/ */
require_once dirname(__FILE__).'/../../inc/global.inc.php'; require_once __DIR__.'/../../inc/global.inc.php';
// check if this client has been called by php_cli (command line or cron) // check if this client has been called by php_cli (command line or cron)
if (php_sapi_name()!='cli') { if (php_sapi_name()!='cli') {
echo 'You can\'t call this service through a browser'; echo 'You can\'t call this service through a browser';

@ -7,7 +7,7 @@
* @package chamilo.exercise * @package chamilo.exercise
*/ */
require dirname(__FILE__) . '/qti2_classes.php'; require __DIR__.'/qti2_classes.php';
/** /**
* An IMS/QTI item. It corresponds to a single question. * An IMS/QTI item. It corresponds to a single question.

@ -31,7 +31,7 @@ class HTML_QuickForm_Rule_HTML extends HTML_QuickForm_Rule
static function get_allowed_tags($mode) static function get_allowed_tags($mode)
{ {
// Include the allowed tags. // Include the allowed tags.
//include(dirname(__FILE__).'/allowed_tags.inc.php'); //include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page; global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
switch($mode) switch($mode)
{ {

@ -1825,7 +1825,7 @@ function _api_get_person_name_convention($language, $type)
static $conventions; static $conventions;
$language = api_purify_language_id($language); $language = api_purify_language_id($language);
if (!isset($conventions)) { if (!isset($conventions)) {
$file = dirname(__FILE__).'/internationalization_database/name_order_conventions.php'; $file = __DIR__.'/internationalization_database/name_order_conventions.php';
if (file_exists($file)) { if (file_exists($file)) {
$conventions = include ($file); $conventions = include ($file);
} else { } else {
@ -1913,7 +1913,7 @@ function _api_get_character_map_name($encoding)
{ {
static $character_map_selector; static $character_map_selector;
if (!isset($character_map_selector)) { if (!isset($character_map_selector)) {
$file = dirname(__FILE__).'/internationalization_database/conversion/character_map_selector.php'; $file = __DIR__.'/internationalization_database/conversion/character_map_selector.php';
if (file_exists($file)) { if (file_exists($file)) {
$character_map_selector = include ($file); $character_map_selector = include ($file);
} else { } else {

@ -171,7 +171,7 @@ define('CRYPT_RSA_MODE_OPENSSL', 2);
/** /**
* Default openSSL configuration file. * Default openSSL configuration file.
*/ */
define('CRYPT_RSA_OPENSSL_CONFIG', dirname(__FILE__) . '/../openssl.cnf'); define('CRYPT_RSA_OPENSSL_CONFIG', __DIR__.'/../openssl.cnf');
/**#@+ /**#@+

@ -7,7 +7,7 @@
/** /**
* code * code
*/ */
require_once dirname(__FILE__) . '/../../global.inc.php'; require_once __DIR__.'/../../global.inc.php';
include_once 'xapian/XapianIndexer.class.php'; include_once 'xapian/XapianIndexer.class.php';
/** /**

@ -17,7 +17,7 @@ if (empty($_GET['term']) || empty($_GET['prefix']) || !in_array($_GET['operator'
return; return;
} }
require_once dirname(__FILE__).'../../../global.inc.php'; require_once __DIR__.'../../../global.inc.php';
require_once api_get_path(LIBRARY_PATH).'search/ChamiloQuery.php'; require_once api_get_path(LIBRARY_PATH).'search/ChamiloQuery.php';
/** /**

@ -7,7 +7,7 @@
/** /**
* Code * Code
*/ */
require_once dirname(__FILE__) . '/IndexableChunk.class.php'; require_once __DIR__.'/IndexableChunk.class.php';
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
/** /**

@ -5,8 +5,8 @@
* *
* @package chamilo.include.search * @package chamilo.include.search
*/ */
include_once dirname(__FILE__).'/../../../global.inc.php'; include_once __DIR__.'/../../../global.inc.php';
require_once dirname(__FILE__).'/search_processor.class.php'; require_once __DIR__.'/search_processor.class.php';
/** /**
* Process documents before pass it to search listing scripts * Process documents before pass it to search listing scripts

@ -5,9 +5,9 @@
* *
* @package chamilo.include.search * @package chamilo.include.search
*/ */
include_once dirname(__FILE__).'/../../../global.inc.php'; include_once __DIR__.'/../../../global.inc.php';
require_once dirname(__FILE__).'/search_processor.class.php'; require_once __DIR__.'/search_processor.class.php';
require_once dirname(__FILE__).'/../IndexableChunk.class.php'; require_once __DIR__.'/../IndexableChunk.class.php';
/** /**
* Process learning paths before pass it to search listing scripts * Process learning paths before pass it to search listing scripts

@ -5,8 +5,8 @@
* *
* @package chamilo.include.search * @package chamilo.include.search
*/ */
include_once dirname(__FILE__).'/../../../global.inc.php'; include_once __DIR__.'/../../../global.inc.php';
require_once dirname(__FILE__).'/search_processor.class.php'; require_once __DIR__.'/search_processor.class.php';
/** /**
* Process links before pass it to search listing scripts * Process links before pass it to search listing scripts

@ -5,8 +5,8 @@
* *
* @package chamilo.include.search * @package chamilo.include.search
*/ */
include_once dirname(__FILE__).'/../../../global.inc.php'; include_once __DIR__.'/../../../global.inc.php';
require_once dirname(__FILE__).'/search_processor.class.php'; require_once __DIR__.'/search_processor.class.php';
/** /**
* Process exercises before pass it to search listing scripts * Process exercises before pass it to search listing scripts

@ -6,7 +6,7 @@
*/ */
require_once 'xapian.php'; require_once 'xapian.php';
require_once dirname(__FILE__) . '/../IndexableChunk.class.php'; require_once __DIR__.'/../IndexableChunk.class.php';
/** /**
* Abstract helper class * Abstract helper class

@ -8,11 +8,11 @@
* Code * Code
*/ */
require_once 'xapian.php'; require_once 'xapian.php';
require_once dirname(__FILE__) . '/../IndexableChunk.class.php'; require_once __DIR__.'/../IndexableChunk.class.php';
//TODO: think another way without including specific fields here //TODO: think another way without including specific fields here
require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'; require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
define('XAPIAN_DB', api_get_path(SYS_UPLOAD_PATH) . 'plugins/xapian/searchdb/'); define('XAPIAN_DB', api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/searchdb/');
/** /**
* Queries the database. * Queries the database.

@ -832,7 +832,7 @@ class xajax
$realJsFile = $sJsFullFilename; $realJsFile = $sJsFullFilename;
} }
else { else {
$realPath = realpath(dirname(__FILE__)); $realPath = realpath(__DIR__);
$realJsFile = $realPath . "/". $sJsFile; $realJsFile = $realPath . "/". $sJsFile;
} }
@ -842,7 +842,7 @@ class xajax
if (!file_exists($srcFile)) { if (!file_exists($srcFile)) {
trigger_error("The xajax uncompressed Javascript file could not be found in the <b>" . dirname($realJsFile) . "</b> folder. Error ", E_USER_ERROR); trigger_error("The xajax uncompressed Javascript file could not be found in the <b>" . dirname($realJsFile) . "</b> folder. Error ", E_USER_ERROR);
} }
require(dirname(__FILE__)."/xajaxCompress.php"); require __DIR__."/xajaxCompress.php";
$javaScript = implode('', file($srcFile)); $javaScript = implode('', file($srcFile));
$compressedScript = xajaxCompressJavascript($javaScript); $compressedScript = xajaxCompressJavascript($javaScript);
$fH = @fopen($realJsFile, "w"); $fH = @fopen($realJsFile, "w");

@ -357,7 +357,7 @@ function write_system_config_file($path)
global $new_version_stable; global $new_version_stable;
$root_sys = api_add_trailing_slash(str_replace('\\', '/', realpath($pathForm))); $root_sys = api_add_trailing_slash(str_replace('\\', '/', realpath($pathForm)));
$content = file_get_contents(dirname(__FILE__).'/'.SYSTEM_CONFIG_FILENAME); $content = file_get_contents(__DIR__.'/'.SYSTEM_CONFIG_FILENAME);
$config['{DATE_GENERATED}'] = date('r'); $config['{DATE_GENERATED}'] = date('r');
$config['{DATABASE_HOST}'] = $dbHostForm; $config['{DATABASE_HOST}'] = $dbHostForm;

@ -6,7 +6,7 @@
* @package chamilo.search * @package chamilo.search
*/ */
require_once dirname(__FILE__) . '/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
function get_suggestions_from_search_engine($q) function get_suggestions_from_search_engine($q)
{ {

@ -1,7 +1,10 @@
<?php <?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.webservices
*/
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
require_once(dirname(__FILE__).'/cm_webservice.php'); require_once __DIR__.'/cm_webservice.php';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);
/** /**
@ -104,11 +107,11 @@ $s->register(
'' ''
); );
require_once(dirname(__FILE__).'/cm_soap_inbox.php'); require_once __DIR__.'/cm_soap_inbox.php';
require_once(dirname(__FILE__).'/cm_soap_user.php'); require_once __DIR__.'/cm_soap_user.php';
require_once(dirname(__FILE__).'/cm_soap_courses.php'); require_once __DIR__.'/cm_soap_courses.php';
require_once(dirname(__FILE__).'/cm_soap_announcements.php'); require_once __DIR__.'/cm_soap_announcements.php';
require_once(dirname(__FILE__).'/cm_soap_forum.php'); require_once __DIR__.'/cm_soap_forum.php';
// Use the request to (try to) invoke the service // Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';

@ -1,7 +1,11 @@
<?php <?php
/* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/cm_webservice_announcements.php'); /**
require_once(dirname(__FILE__).'/cm_soap.php'); * @package chamilo.webservices
*/
require_once __DIR__.'/cm_webservice_announcements.php';
require_once __DIR__.'/cm_soap.php';
/** /**
* Configures the WSCourse SOAP service * Configures the WSCourse SOAP service

@ -1,7 +1,11 @@
<?php <?php
/* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/cm_webservice_course.php'); /**
require_once(dirname(__FILE__).'/cm_soap.php'); * @package chamilo.webservices
*/
require_once __DIR__.'/cm_webservice_course.php';
require_once __DIR__.'/cm_soap.php';
/** /**
* Configures the WSCourse SOAP service * Configures the WSCourse SOAP service

@ -1,7 +1,11 @@
<?php <?php
/* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/cm_webservice_courses.php'); /**
require_once(dirname(__FILE__).'/cm_soap.php'); * @package chamilo.webservices
*/
require_once __DIR__.'/cm_webservice_courses.php';
require_once __DIR__.'/cm_soap.php';
/** /**
* Configures the WSCourse SOAP service * Configures the WSCourse SOAP service

@ -1,7 +1,11 @@
<?php <?php
/* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/cm_webservice_forum.php'); /**
require_once(dirname(__FILE__).'/cm_soap.php'); * @package chamilo.webservices
*/
require_once __DIR__.'/cm_webservice_forum.php';
require_once __DIR__.'/cm_soap.php';
/** /**
* Configures the WSCourse SOAP service * Configures the WSCourse SOAP service

@ -1,7 +1,11 @@
<?php <?php
/* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/cm_webservice_inbox.php'); /**
require_once(dirname(__FILE__).'/cm_soap.php'); * @package chamilo.webservices
*/
require_once __DIR__.'/cm_webservice_inbox.php';
require_once __DIR__.'/cm_soap.php';
/** /**
* Configures the WSCourse SOAP service * Configures the WSCourse SOAP service

@ -1,6 +1,11 @@
<?php <?php
require_once(dirname(__FILE__).'/cm_webservice_user.php'); /* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/cm_soap.php');
/**
* @package chamilo.webservices
*/
require_once __DIR__.'/cm_webservice_user.php';
require_once __DIR__.'/cm_soap.php';
/** /**
* Configures the WSCourse SOAP service * Configures the WSCourse SOAP service

@ -1,8 +1,12 @@
<?php <?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.webservices
*/
use Chamilo\UserBundle\Entity\User; use Chamilo\UserBundle\Entity\User;
require_once(dirname(__FILE__).'/../inc/global.inc.php'); require_once __DIR__.'/../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);

@ -1,9 +1,12 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/../inc/global.inc.php'); /**
* @package chamilo.webservices
*/
require_once __DIR__.'/../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);
require_once(dirname(__FILE__).'/cm_webservice.php'); require_once __DIR__.'/cm_webservice.php';
/** /**
* Description of cm_soap_inbox * Description of cm_soap_inbox

@ -1,9 +1,12 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/../inc/global.inc.php'); /**
* @package chamilo.webservices
*/
require_once __DIR__.'/../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);
require_once(dirname(__FILE__).'/cm_webservice.php'); require_once __DIR__.'/cm_webservice.php';
/** /**
* Web services available for the Course module. This class extends the WS class * Web services available for the Course module. This class extends the WS class

@ -1,10 +1,13 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/../inc/global.inc.php'); /**
* @package chamilo.webservices
*/
require_once __DIR__.'/../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);
require_once(dirname(__FILE__).'/cm_webservice.php'); require_once __DIR__.'/cm_webservice.php';
/** /**
* Description of cm_soap_inbox * Description of cm_soap_inbox

@ -1,13 +1,15 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
/**
require_once(dirname(__FILE__).'/../inc/global.inc.php'); * @package chamilo.webservices
require_once(dirname(__FILE__).'/../forum/forumconfig.inc.php'); */
require_once(dirname(__FILE__).'/../forum/forumfunction.inc.php'); require_once __DIR__.'/../inc/global.inc.php';
require_once __DIR__.'/../forum/forumconfig.inc.php';
require_once __DIR__.'/../forum/forumfunction.inc.php';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);
require_once(dirname(__FILE__).'/cm_webservice.php'); require_once __DIR__.'/cm_webservice.php';
/** /**
* Description of cm_soap_inbox * Description of cm_soap_inbox

@ -1,7 +1,10 @@
<?php <?php
/* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/../inc/global.inc.php'); /**
require_once(dirname(__FILE__).'/cm_webservice.php'); * @package chamilo.webservices
*/
require_once __DIR__.'/../inc/global.inc.php';
require_once __DIR__.'/cm_webservice.php';
/** /**
* Description of cm_soap_inbox * Description of cm_soap_inbox

@ -1,7 +1,10 @@
<?php <?php
/* For licensing terms, see /license.txt */
require_once(dirname(__FILE__).'/../inc/global.inc.php'); /**
require_once(dirname(__FILE__).'/cm_webservice.php'); * @package chamilo.webservices
*/
require_once __DIR__.'/../inc/global.inc.php';
require_once __DIR__.'/cm_webservice.php';
/** /**
* Description of cm_soap_user * Description of cm_soap_user

@ -4,7 +4,7 @@
* @package chamilo.webservices * @package chamilo.webservices
*/ */
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
require_once(dirname(__FILE__).'/webservice.php'); require_once __DIR__.'/webservice.php';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);
/** /**
@ -111,10 +111,10 @@ $s->register(
array('return' => 'xsd:string') array('return' => 'xsd:string')
); );
require_once(dirname(__FILE__).'/soap_user.php'); require_once __DIR__.'/soap_user.php';
require_once(dirname(__FILE__).'/soap_course.php'); require_once __DIR__.'/soap_course.php';
require_once(dirname(__FILE__).'/soap_session.php'); require_once __DIR__.'/soap_session.php';
require_once(dirname(__FILE__).'/soap_report.php'); require_once __DIR__.'/soap_report.php';
// Use the request to (try to) invoke the service // Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';

@ -4,8 +4,8 @@
* Configures the WSCourse SOAP service * Configures the WSCourse SOAP service
* @package chamilo.webservices * @package chamilo.webservices
*/ */
require_once dirname(__FILE__).'/webservice_course.php'; require_once __DIR__.'/webservice_course.php';
require_once dirname(__FILE__).'/soap.php'; require_once __DIR__.'/soap.php';
/** /**
* Configures the WSCourse SOAP service * Configures the WSCourse SOAP service

@ -4,8 +4,8 @@
* Configures the WSReport SOAP service * Configures the WSReport SOAP service
* @package chamilo.webservices * @package chamilo.webservices
*/ */
require_once(dirname(__FILE__).'/webservice_report.php'); require_once __DIR__.'/webservice_report.php';
require_once(dirname(__FILE__).'/soap.php'); require_once __DIR__.'/soap.php';
$s = WSSoapServer::singleton(); $s = WSSoapServer::singleton();
$s->wsdl->addComplexType( $s->wsdl->addComplexType(

@ -4,9 +4,8 @@
* Configures the WSSession SOAP service * Configures the WSSession SOAP service
* @package chamilo.webservices * @package chamilo.webservices
*/ */
require_once __DIR__.'/webservice_session.php';
require_once(dirname(__FILE__).'/webservice_session.php'); require_once __DIR__.'/soap.php';
require_once(dirname(__FILE__).'/soap.php');
$s = WSSoapServer::singleton(); $s = WSSoapServer::singleton();

@ -4,8 +4,8 @@
* Configures the WSUser SOAP service * Configures the WSUser SOAP service
* @package chamilo.webservices * @package chamilo.webservices
*/ */
require_once(dirname(__FILE__).'/webservice_user.php'); require_once __DIR__.'/webservice_user.php';
require_once(dirname(__FILE__).'/soap.php'); require_once __DIR__.'/soap.php';
/** /**
* Configures the WSUser SOAP service * Configures the WSUser SOAP service

@ -3,7 +3,7 @@
/** /**
* @package chamilo.webservices * @package chamilo.webservices
*/ */
require_once(dirname(__FILE__).'/../inc/global.inc.php'); require_once __DIR__.'/../inc/global.inc.php';
/** /**
* Error returned by one of the methods of the web service. * Error returned by one of the methods of the web service.

@ -3,9 +3,9 @@
/** /**
* @package chamilo.webservices * @package chamilo.webservices
*/ */
require_once(dirname(__FILE__).'/../inc/global.inc.php'); require_once __DIR__.'/../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);
require_once(dirname(__FILE__).'/webservice.php'); require_once __DIR__.'/webservice.php';
/** /**
* Web services available for the Course module. This class extends the WS class * Web services available for the Course module. This class extends the WS class

@ -3,8 +3,8 @@
/** /**
* @package chamilo.webservices * @package chamilo.webservices
*/ */
require_once(dirname(__FILE__).'/../inc/global.inc.php'); require_once __DIR__.'/../inc/global.inc.php';
require_once(dirname(__FILE__).'/webservice.php'); require_once __DIR__.'/webservice.php';
/** /**
* Web services available for the User module. This class extends the WS class * Web services available for the User module. This class extends the WS class

@ -1,12 +1,11 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
/** /**
* @package chamilo.webservices * @package chamilo.webservices
*/ */
require_once(dirname(__FILE__).'/../inc/global.inc.php'); require_once __DIR__.'/../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);
require_once(dirname(__FILE__).'/webservice.php'); require_once __DIR__.'/webservice.php';
/** /**
* Web services available for the Session module. This class extends the WS class * Web services available for the Session module. This class extends the WS class

@ -3,8 +3,8 @@
/** /**
* @package chamilo.webservices * @package chamilo.webservices
*/ */
require_once(dirname(__FILE__).'/../inc/global.inc.php'); require_once __DIR__.'/../inc/global.inc.php';
require_once(dirname(__FILE__).'/webservice.php'); require_once __DIR__.'/webservice.php';
/** /**
* Web services available for the User module. This class extends the WS class * Web services available for the User module. This class extends the WS class

@ -10,7 +10,7 @@
* Initialization * Initialization
*/ */
require_once dirname(__FILE__) . '/config.php'; require_once __DIR__.'/config.php';
if (!api_is_platform_admin()) { if (!api_is_platform_admin()) {
die ('You must have admin permissions to install plugins'); die ('You must have admin permissions to install plugins');
} }

@ -10,7 +10,7 @@
/** /**
* Queries * Queries
*/ */
require_once dirname(__FILE__) . '/config.php'; require_once __DIR__.'/config.php';
if (!api_is_platform_admin()) { if (!api_is_platform_admin()) {
die ('You must have admin permissions to uninstall plugins'); die ('You must have admin permissions to uninstall plugins');
} }

@ -1,6 +1,8 @@
<?php <?php
require dirname(__FILE__) . '/../../../main/inc/global.inc.php'; /* For license terms, see /license.txt */
require_once dirname(__FILE__) . '/../../../main/auth/external_login/functions.inc.php';
require __DIR__.'/../../../main/inc/global.inc.php';
require_once __DIR__.'/../../../main/auth/external_login/functions.inc.php';
if (isset($_POST['error']) || empty($_REQUEST)) { if (isset($_POST['error']) || empty($_REQUEST)) {
header('Location: ' . api_get_path(WEB_PATH) . 'index.php?logout=logout'); header('Location: ' . api_get_path(WEB_PATH) . 'index.php?logout=logout');

@ -1,16 +1,17 @@
<?php <?php
/* For license terms, see /license.txt */
require __DIR__ . '/../../vendor/autoload.php'; require __DIR__.'/../../vendor/autoload.php';
if (file_exists(__DIR__ . '/config.vm.php')) { if (file_exists(__DIR__.'/config.vm.php')) {
require_once dirname(__FILE__) . '/config.php'; require_once __DIR__.'/config.php';
require __DIR__ . '/lib/vm/AbstractVM.php'; require __DIR__.'/lib/vm/AbstractVM.php';
require __DIR__ . '/lib/vm/VMInterface.php'; require __DIR__.'/lib/vm/VMInterface.php';
require __DIR__ . '/lib/vm/DigitalOceanVM.php'; require __DIR__.'/lib/vm/DigitalOceanVM.php';
require __DIR__ . '/lib/VM.php'; require __DIR__.'/lib/VM.php';
$config = require __DIR__ . '/config.vm.php'; $config = require __DIR__.'/config.vm.php';
$vm = new VM($config); $vm = new VM($config);

@ -8,7 +8,7 @@
/** /**
* Initialization * Initialization
*/ */
require_once dirname(__FILE__) . '/config.php'; require_once __DIR__.'/config.php';
if (!api_is_platform_admin()) { if (!api_is_platform_admin()) {
die ('You must have admin permissions to install plugins'); die ('You must have admin permissions to install plugins');
} }

@ -8,5 +8,5 @@
/** /**
* Plugin details (must be present) * Plugin details (must be present)
*/ */
require_once dirname(__FILE__) . '/config.php'; require_once __DIR__.'/config.php';
$plugin_info = BuyCoursesPlugin::create()->get_info(); $plugin_info = BuyCoursesPlugin::create()->get_info();

@ -142,8 +142,8 @@ class Requests {
} }
$file = str_replace('_', '/', $class); $file = str_replace('_', '/', $class);
if (file_exists(dirname(__FILE__) . '/' . $file . '.php')) { if (file_exists(__DIR__.'/'.$file.'.php')) {
require_once(dirname(__FILE__) . '/' . $file . '.php'); require_once __DIR__.'/'.$file.'.php';
} }
} }
@ -537,7 +537,7 @@ class Requests {
return self::$certificate_path; return self::$certificate_path;
} }
return dirname(__FILE__) . '/Requests/Transport/cacert.pem'; return __DIR__.'/Requests/Transport/cacert.pem';
} }
/** /**

@ -1,5 +1,5 @@
<?php <?php
/* For license terms, see /license.txt */
/** /**
* CULQI PHP SDK * CULQI PHP SDK
* *
@ -14,15 +14,15 @@
*/ */
// Errors // Errors
include_once(dirname(__FILE__). '/Culqi/Error/Errors.php'); include_once __DIR__.'/Culqi/Error/Errors.php';
include_once(dirname(__FILE__). '/Culqi/AuthBearer.php'); include_once __DIR__.'/Culqi/AuthBearer.php';
include_once dirname(__FILE__).'/Culqi/Client.php'; include_once __DIR__.'/Culqi/Client.php';
include_once dirname(__FILE__).'/Culqi/Resource.php'; include_once __DIR__.'/Culqi/Resource.php';
// Culqi API // Culqi API
include_once dirname(__FILE__).'/Culqi/Tokens.php'; include_once __DIR__.'/Culqi/Tokens.php';
include_once dirname(__FILE__).'/Culqi/Cargos.php'; include_once __DIR__.'/Culqi/Cargos.php';
include_once dirname(__FILE__).'/Culqi/Devoluciones.php'; include_once __DIR__.'/Culqi/Devoluciones.php';
include_once dirname(__FILE__).'/Culqi/Suscripciones.php'; include_once __DIR__.'/Culqi/Suscripciones.php';
include_once dirname(__FILE__).'/Culqi/Planes.php'; include_once __DIR__.'/Culqi/Planes.php';
include_once dirname(__FILE__).'/Culqi/Culqi.php'; include_once __DIR__.'/Culqi/Culqi.php';

@ -10,5 +10,5 @@
/** /**
* Queries * Queries
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
BuyCoursesPlugin::create()->uninstall(); BuyCoursesPlugin::create()->uninstall();

@ -11,5 +11,5 @@
/** /**
* Initialization * Initialization
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
ClockworksmsPlugin::create()->install(); ClockworksmsPlugin::create()->install();

@ -5,6 +5,6 @@
* @package chamilo.plugin.clockworksms * @package chamilo.plugin.clockworksms
* @author Imanol Losada <imanol.losada@beeznest.com> * @author Imanol Losada <imanol.losada@beeznest.com>
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
$plugin_info = ClockworksmsPlugin::create()->get_info(); $plugin_info = ClockworksmsPlugin::create()->get_info();

@ -12,5 +12,5 @@
/** /**
* Queries * Queries
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
ClockworksmsPlugin::create()->uninstall(); ClockworksmsPlugin::create()->uninstall();

@ -1,7 +1,7 @@
<?php <?php
/* For license terms, see /license.txt */ /* For license terms, see /license.txt */
require_once dirname(__FILE__) . '/config.php'; require_once __DIR__.'/config.php';
if (!api_is_platform_admin()) { if (!api_is_platform_admin()) {
die ('You must have admin permissions to install plugins'); die ('You must have admin permissions to install plugins');

@ -1,7 +1,7 @@
<?php <?php
/* For license terms, see /license.txt */ /* For license terms, see /license.txt */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
if (!api_is_platform_admin()) { if (!api_is_platform_admin()) {
die ('You must have admin permissions to install plugins'); die ('You must have admin permissions to install plugins');

@ -1,7 +1,7 @@
<?php <?php
/* For license terms, see /license.txt */ /* For license terms, see /license.txt */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
// Course legal // Course legal
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); $enabled = api_get_plugin_setting('courselegal', 'tool_enable');

@ -1,6 +1,6 @@
<?php <?php
/* For license terms, see /license.txt */ /* For license terms, see /license.txt */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
// Course legal // Course legal
$enabled = api_get_plugin_setting('courselegal', 'tool_enable'); $enabled = api_get_plugin_setting('courselegal', 'tool_enable');

@ -5,7 +5,7 @@
parse_str($HTTP_RAW_POST_DATA, $_POST); parse_str($HTTP_RAW_POST_DATA, $_POST);
} }
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../../'); if(!defined('DOKU_INC')) define('DOKU_INC',__DIR__.'/../../../');
require_once(DOKU_INC.'inc/init.php'); require_once(DOKU_INC.'inc/init.php');
require_once(DOKU_INC.'inc/common.php'); require_once(DOKU_INC.'inc/common.php');
require_once(DOKU_INC.'inc/pageutils.php'); require_once(DOKU_INC.'inc/pageutils.php');

@ -11,5 +11,5 @@
/** /**
* Initialization * Initialization
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
KannelsmsPlugin::create()->install(); KannelsmsPlugin::create()->install();

@ -5,6 +5,6 @@
* @package chamilo.plugin.kannelsms * @package chamilo.plugin.kannelsms
* @author Imanol Losada <imanol.losada@beeznest.com> * @author Imanol Losada <imanol.losada@beeznest.com>
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
$plugin_info = KannelsmsPlugin::create()->get_info(); $plugin_info = KannelsmsPlugin::create()->get_info();

@ -12,5 +12,5 @@
/** /**
* Queries * Queries
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
KannelsmsPlugin::create()->uninstall(); KannelsmsPlugin::create()->uninstall();

@ -9,5 +9,5 @@
* Initialization * Initialization
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
OLPC_Peru_FilterPlugin::create()->install(); OLPC_Peru_FilterPlugin::create()->install();

@ -33,7 +33,7 @@ class OLPC_Peru_FilterPlugin extends Plugin
$this->course_settings[] = $this->course_settings[] =
array('group'=> 'olpc_peru_filter_filter', 'name' => $k, 'type' => 'checkbox', 'init_value' => $v); array('group'=> 'olpc_peru_filter_filter', 'name' => $k, 'type' => 'checkbox', 'init_value' => $v);
} }
require_once dirname(__FILE__).'/../config.php'; require_once __DIR__.'/../config.php';
if (!empty($blacklist_enabled_file)) { if (!empty($blacklist_enabled_file)) {
$this->blacklist_enabled_file = $blacklist_enabled_file; $this->blacklist_enabled_file = $blacklist_enabled_file;
} }

@ -1,4 +1,4 @@
<?php <?php
$course_plugin = 'olpc_peru_filter'; //needed in order to load the plugin lang variables $course_plugin = 'olpc_peru_filter'; //needed in order to load the plugin lang variables
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
$plugin_info = OLPC_Peru_FilterPlugin::create()->get_info(); $plugin_info = OLPC_Peru_FilterPlugin::create()->get_info();

@ -9,5 +9,5 @@
/** /**
* Queries * Queries
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
OLPC_Peru_FilterPlugin::create()->uninstall(); OLPC_Peru_FilterPlugin::create()->uninstall();

@ -8,5 +8,5 @@
* Initialization * Initialization
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
openmeetingsPlugin::create()->install(); openmeetingsPlugin::create()->install();

@ -8,7 +8,7 @@
*/ */
$course_plugin = 'openmeetings'; //needed in order to load the plugin lang variables $course_plugin = 'openmeetings'; //needed in order to load the plugin lang variables
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
$plugin = \OpenMeetingsPlugin::create(); $plugin = \OpenMeetingsPlugin::create();
$tool_name = $plugin->get_lang('Videoconference'); $tool_name = $plugin->get_lang('Videoconference');
$tpl = new Template($tool_name); $tpl = new Template($tool_name);

@ -6,7 +6,7 @@
* Initialization * Initialization
*/ */
$course_plugin = 'openmeetings'; //needed in order to load the plugin lang variables $course_plugin = 'openmeetings'; //needed in order to load the plugin lang variables
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
$tool_name = get_lang('Videoconference'); $tool_name = get_lang('Videoconference');
$tpl = new Template($tool_name); $tpl = new Template($tool_name);
$om = new \Chamilo\Plugin\OpenMeetings\OpenMeetings(); $om = new \Chamilo\Plugin\OpenMeetings\OpenMeetings();

@ -9,5 +9,5 @@
/** /**
* Queries * Queries
*/ */
require_once dirname(__FILE__).'/config.php'; require_once __DIR__.'/config.php';
openmeetingsPlugin::create()->uninstall(); openmeetingsPlugin::create()->uninstall();

@ -26,8 +26,8 @@
* @licence http://www.gnu.org/licenses/gpl.txt * @licence http://www.gnu.org/licenses/gpl.txt
*/ */
require_once(dirname(__FILE__)."/pens_controller.php"); require_once __DIR__.'/pens_controller.php';
require_once(dirname(__FILE__)."/pens_request_handler.php"); require_once __DIR__.'/pens_request_handler.php';
/** /**
* PENSClient * PENSClient

@ -26,7 +26,7 @@
* @licence http://www.gnu.org/licenses/gpl.txt * @licence http://www.gnu.org/licenses/gpl.txt
*/ */
require_once(dirname(__FILE__)."/pens_request_factory.php"); require_once __DIR__.'/pens_request_factory.php';
/** /**
* PENSController * PENSController

@ -26,7 +26,7 @@
* @licence http://www.gnu.org/licenses/gpl.txt * @licence http://www.gnu.org/licenses/gpl.txt
*/ */
require_once(dirname(__FILE__)."/pens_config.php"); require_once __DIR__.'/pens_config.php';
/** /**
* PENSPackageHandler * PENSPackageHandler

@ -26,10 +26,10 @@
* @licence http://www.gnu.org/licenses/gpl.txt * @licence http://www.gnu.org/licenses/gpl.txt
*/ */
require_once(dirname(__FILE__)."/pens_config.php"); require_once __DIR__.'/pens_config.php';
require_once(dirname(__FILE__)."/pens_message.php"); require_once __DIR__.'/pens_message.php';
require_once(dirname(__FILE__)."/pens_exception.php"); require_once __DIR__.'/pens_exception.php';
require_once(dirname(__FILE__)."/lib/rfc2396regexes.php"); require_once __DIR__.'/lib/rfc2396regexes.php';
/** /**
* PENSRequest * PENSRequest

@ -29,8 +29,8 @@
* @licence http://www.gnu.org/licenses/gpl.txt * @licence http://www.gnu.org/licenses/gpl.txt
*/ */
require_once("simpletest/autorun.php"); require_once 'simpletest/autorun.php';
require_once(dirname(__FILE__)."/../pens.php"); require_once __DIR__.'/../pens.php';
class MyPackageHandler extends PENSPackageHandler { class MyPackageHandler extends PENSPackageHandler {
public function processPackage($request, $path_to_package) { public function processPackage($request, $path_to_package) {

@ -29,8 +29,8 @@
* @licence http://www.gnu.org/licenses/gpl.txt * @licence http://www.gnu.org/licenses/gpl.txt
*/ */
require_once("simpletest/autorun.php"); require_once 'simpletest/autorun.php';
require_once(dirname(__FILE__)."/../pens.php"); require_once __DIR__.'/../pens.php';
/** /**
* Unit tests for the PENSRequest class * Unit tests for the PENSRequest class

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save