MDL-35628 performance: Remove dirname() where possible.

dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
This commit is contained in:
Russell Smith
2016-06-10 08:06:49 +10:00
parent 4ee8ef5d41
commit 1fcf0ca8a5
352 changed files with 499 additions and 499 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
define('CLI_SCRIPT', 1);
require(dirname(dirname(dirname(__FILE__))).'/config.php');
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');