From 5e1bccd2272a3615da2cf5af2bc7978b44a5309b Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Thu, 15 Apr 2010 19:56:41 +0000 Subject: [PATCH] MDL-21657 Fixing incorrect usage of relative path in require_once() and tab indentation --- mod/data/db/upgrade.php | 4 ++-- mod/forum/db/upgrade.php | 2 +- mod/glossary/db/upgrade.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/data/db/upgrade.php b/mod/data/db/upgrade.php index ba86c1a0815..270942d40df 100644 --- a/mod/data/db/upgrade.php +++ b/mod/data/db/upgrade.php @@ -256,8 +256,8 @@ function xmldb_data_upgrade($oldversion) { if($result && $oldversion < 2010041300) { //migrate data_ratings to the central rating table - require_once('../lib/db/upgradelib.php'); - + require_once($CFG->dirroot . '/lib/db/upgradelib.php'); + //data ratings didnt store time created and modified so Im using the times from the record the rating was attached to $ratingssql = 'SELECT r.id AS rid, r.recordid AS itemid, r.rating, r.userid, re.timecreated, re.timemodified, d.scale, d.id AS mid FROM {data_ratings} r diff --git a/mod/forum/db/upgrade.php b/mod/forum/db/upgrade.php index f1b075ae38a..4fb3401151b 100644 --- a/mod/forum/db/upgrade.php +++ b/mod/forum/db/upgrade.php @@ -287,7 +287,7 @@ function xmldb_forum_upgrade($oldversion) { if($result && $oldversion < 2010041300) { //migrate forumratings to the central rating table - require_once('../lib/db/upgradelib.php'); + require_once($CFG->dirroot . '/lib/db/upgradelib.php'); //forum ratings only have a single time column so use it for both time created and modified $ratingssql = 'SELECT r.id AS rid, r.post AS itemid, r.rating, r.userid, r.time AS timecreated, r.time AS timemodified, f.scale, f.id AS mid diff --git a/mod/glossary/db/upgrade.php b/mod/glossary/db/upgrade.php index 7fbb5162059..e8db43b758b 100644 --- a/mod/glossary/db/upgrade.php +++ b/mod/glossary/db/upgrade.php @@ -262,7 +262,7 @@ function xmldb_glossary_upgrade($oldversion) { if($result && $oldversion < 2010041300) { //migrate glossary_ratings to the central rating table - require_once('../lib/db/upgradelib.php'); + require_once($CFG->dirroot . '/lib/db/upgradelib.php'); //glossary ratings only have a single time column so use it for both time created and modified $ratingssql = 'SELECT r.id AS rid, r.entryid AS itemid, r.rating, r.userid, r.time AS timecreated, r.time AS timemodified, g.scale, g.id AS mid