mirror of
https://github.com/moodle/moodle.git
synced 2025-01-20 06:39:04 +01:00
Wiki-Like format in forum posts is converted to Markdown format.
This commit is contained in:
parent
7ae84175d9
commit
62caf19111
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user