From 8cf0f100b8146e201c5e48fc6f6c0735140ff660 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 21 Sep 2007 17:10:39 +0000 Subject: [PATCH] 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. --- question/upgrade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 .'"!'); } -- 2.39.5