Skip to content

Commit

Permalink
Added update to convert wiki-like format to Markdown format
Browse files Browse the repository at this point in the history
  • Loading branch information
thepurpleblob committed Apr 11, 2005
1 parent 2fbc787 commit c0de5d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mod/resource/db/mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ function resource_upgrade($oldversion) {
modify_database('','ALTER TABLE prefix_resource ADD INDEX course (course);');
}

if ($oldversion < 2005041100) { // replace wiki-like with markdown
include_once( "$CFG->dirroot/lib/wiki_to_markdown.php" );
$wtm = new WikiToMarkdown();
$wtm->update( 'resource','alltext','options' );
}

return true;
}

Expand Down
6 changes: 6 additions & 0 deletions mod/resource/db/postgres7.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ function resource_upgrade($oldversion) {
modify_database('','CREATE INDEX prefix_resource_course_idx ON prefix_resource (course);');
}

if ($oldversion < 2005041100) { // replace wiki-like with markdown
include_once( "$CFG->dirroot/lib/wiki_to_markdown.php" );
$wtm = new WikiToMarkdown();
$wtm->update( 'resource','alltext','options' );
}

return true;
}

Expand Down

0 comments on commit c0de5d5

Please sign in to comment.