Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ff3b8f6
)
MDL-55921 profiling: Adding missing vars
author
David Monllao
<davidm@moodle.com>
Thu, 8 Sep 2016 07:28:34 +0000
(15:28 +0800)
committer
Russell Smith
<mr-russ@smith2001.net>
Wed, 14 Sep 2016 03:48:38 +0000
(13:48 +1000)
lib/xhprof/xhprof_moodle.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/xhprof/xhprof_moodle.php
b/lib/xhprof/xhprof_moodle.php
index
293ffac
..
c930d4f
100644
(file)
--- a/
lib/xhprof/xhprof_moodle.php
+++ b/
lib/xhprof/xhprof_moodle.php
@@
-613,6
+613,13
@@
function profiling_import_runs($file, $commentprefix = '') {
function profiling_export_generate(array $runids, $tmpdir) {
global $CFG, $DB;
+ if (empty($CFG->release) || empty($CFG->version)) {
+ // Some scripts may not have included version.php.
+ include($CFG->dirroot.'/version.php');
+ $CFG->release = $release;
+ $CFG->version = $version;
+ }
+
// Calculate the header information to be sent to moodle_profiling_runs.xml.
$release = $CFG->release;
$version = $CFG->version;