From f776e221e51f08a75cdb2eabe0269dcab6ff3807 Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Tue, 2 Nov 2010 03:26:10 +0000 Subject: [PATCH] MDL-24888, fixed tags itemtype in lib/db/upgrade.php --- lib/db/upgrade.php | 14 ++++++++++++++ version.php | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index bf2d1bd4528..ce523ae2672 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -5379,6 +5379,20 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint(true, 2010102700); } + if ($oldversion < 2010110200) { + + // fix tags itemtype for wiki + $sql = "UPDATE {tag_instance} + SET itemtype = 'wiki_pages' + WHERE itemtype = 'wiki_page'"; + $DB->execute($sql); + + echo $OUTPUT->notification('Updating tags itemtype', 'notifysuccess'); + + // Main savepoint reached + upgrade_main_savepoint(true, 2010110200); + } + return true; } diff --git a/version.php b/version.php index 801d2c3cd16..80845cc8f19 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2010102700; // YYYYMMDD = date of the last version bump +$version = 2010110200; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 RC1 (Build: 20101102)'; // Human-friendly version name