MDL-21657 Fixing incorrect usage of relative path in require_once() and tab indentation
authorDavid Mudrak <david.mudrak@gmail.com>
Thu, 15 Apr 2010 19:56:41 +0000 (19:56 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Thu, 15 Apr 2010 19:56:41 +0000 (19:56 +0000)
mod/data/db/upgrade.php
mod/forum/db/upgrade.php
mod/glossary/db/upgrade.php

index ba86c1a..270942d 100644 (file)
@@ -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
index f1b075a..4fb3401 100644 (file)
@@ -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
index 7fbb516..e8db43b 100644 (file)
@@ -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