Whoops! Forgot prefix on the DB where clauses

This commit is contained in:
thepurpleblob 2005-04-12 19:57:51 +00:00
parent 8e4d01032a
commit c5c36dac9f
2 changed files with 4 additions and 4 deletions

View File

@ -220,8 +220,8 @@ function forum_upgrade($oldversion) {
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 = ";
$sql .= "where {$CFG->prefix}forum_posts.discussions = {$CFG->prefix}forum_discussions.id ";
$sql .= "and {$CFG->prefix}forum_posts.id = ";
$wtm->update( 'forum_posts','message','format',$sql );
}

View File

@ -163,8 +163,8 @@ function forum_upgrade($oldversion) {
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 = ";
$sql .= "where {$CFG->prefix}forum_posts.discussions = {$CFG->prefix}forum_discussions.id ";
$sql .= "and {$CFG->prefix}forum_posts.id = ";
$wtm->update( 'forum_posts','message','format',$sql );
}