Wiki-Like format in forum posts is converted to Markdown format.

This commit is contained in:
thepurpleblob 2005-04-11 13:04:48 +00:00
parent 7ae84175d9
commit 62caf19111
2 changed files with 19 additions and 1 deletions

View File

@ -216,10 +216,19 @@ function forum_upgrade($oldversion) {
modify_database('','ALTER TABLE prefix_forum_posts ADD INDEX prefix_form_posts_mailed_idx (mailed);');
}
if ($oldversion < 2005041100) { // replace wiki-like with markdown
include_once( "$CFG->dirroot/lib/wiki_to_markdown.php" );
$wtm = new WikiToMarkdown();
$sql = "select course from {$CFG->prefix}forum_discussions, {$CFG->prefix}forum_posts ";
$sql .= "where forum_posts.discussions = forum_discussions.id ";
$sql .= "and forum_posts.id = ";
$wtm->update( 'forum_posts','message','format',$sql );
}
return true;
}
?>
?>

View File

@ -159,6 +159,15 @@ function forum_upgrade($oldversion) {
}
if ($oldversion < 2005041100) { // replace wiki-like with markdown
include_once( "$CFG->dirroot/lib/wiki_to_markdown.php" );
$wtm = new WikiToMarkdown();
$sql = "select course from {$CFG->prefix}forum_discussions, {$CFG->prefix}forum_posts ";
$sql .= "where forum_posts.discussions = forum_discussions.id ";
$sql .= "and forum_posts.id = ";
$wtm->update( 'forum_posts','message','format',$sql );
}
return true;
}