From: tjhunt Date: Fri, 21 Sep 2007 17:10:39 +0000 (+0000) Subject: MDL-11392 - Stupid bloody requirement to call addslashes between loading data from... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8cf0f100b8146e201c5e48fc6f6c0735140ff660;p=moodle.git MDL-11392 - Stupid bloody requirement to call addslashes between loading data from the database and saving it back, because we don't use placeholder. Was breaking question bank upgrade. --- diff --git a/question/upgrade.php b/question/upgrade.php index 5095db43e6..8988e979c5 100644 --- a/question/upgrade.php +++ b/question/upgrade.php @@ -272,7 +272,9 @@ function question_upgrade_context_etc(){ /// update table contents with previously calculated new contents. if ($question_categories){ - foreach ($question_categories as $question_category){ + foreach ($question_categories as $question_category) { + $question_category->name = addslashes($question_category->name); + $question_category->info = addslashes($question_category->info); if (!$result = update_record('question_categories', $question_category)){ notify('Couldn\'t update question_categories "'. $question_category->name .'"!'); }