Skip to content

Commit

Permalink
wiki MDL-24862 fixed the upgrade code breaking in mssql.
Browse files Browse the repository at this point in the history
  • Loading branch information
nebgor committed Nov 19, 2010
1 parent dbfcdb8 commit bb7603e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions mod/wiki/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,18 @@ function xmldb_wiki_upgrade($oldversion) {
// Step 8, migrating files
if ($oldversion < 2010040108) {
$fs = get_file_storage();
$sql = "SELECT files.*, po.meta AS filemeta FROM {wiki_pages_old} po JOIN (
SELECT DISTINCT po.id, po.pagename, w.id AS wikiid, po.userid,
eo.id AS entryid, eo.groupid, s.id AS subwiki,
w.course AS courseid, cm.id AS cmid
FROM {wiki_pages_old} po
LEFT OUTER JOIN {wiki_entries_old} eo
ON eo.id=po.wiki
LEFT OUTER JOIN {wiki} w
ON w.id = eo.wikiid
LEFT OUTER JOIN {wiki_subwikis} s
ON s.groupid = eo.groupid AND s.wikiid = eo.wikiid AND eo.userid = s.userid
JOIN {modules} m ON m.name = 'wiki'
$sql = "SELECT DISTINCT po.pagename, w.id AS wikiid, po.userid,".
$DB->sql_compare_text('po.meta')." AS filemeta,
eo.id AS entryid, eo.groupid, s.id AS subwiki,
w.course AS courseid, cm.id AS cmid
FROM {wiki_pages_old} po
LEFT OUTER JOIN {wiki_entries_old} eo
ON eo.id=po.wiki
LEFT OUTER JOIN {wiki} w
ON w.id = eo.wikiid
LEFT OUTER JOIN {wiki_subwikis} s
ON s.groupid = eo.groupid AND s.wikiid = eo.wikiid AND eo.userid = s.userid
JOIN {modules} m ON m.name = 'wiki'
JOIN {course_modules} cm ON (cm.module = m.id AND cm.instance = w.id)
) files ON files.id = po.id";

Expand Down

0 comments on commit bb7603e

Please sign in to comment.