From 7f0fedc0b5f3c6304634b51df38e9d9f616ddd06 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 14 Jul 2009 08:25:51 +0000 Subject: [PATCH] MDL-14589 fixed incorrect condition testing if files allowed when postprocessing editor element data, thanks Nicolas for reporting this --- lib/filelib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/filelib.php b/lib/filelib.php index 1a87d626d5..036dabe67a 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -247,10 +247,10 @@ function file_postupdate_standard_editor($data, $field, array $options, $context $editor = $data->{$field.'_editor'}; - if ($options['maxfiles'] != 0 or is_null($filearea) or is_null($itemid)) { - $data->{$field} = file_save_draft_area_files($editor['itemid'], $context->id, $filearea, $itemid, $options, $editor['text'], $options['forcehttps']); - } else { + if ($options['maxfiles'] == 0 or is_null($filearea) or is_null($itemid)) { $data->{$field} = $editor['text']; + } else { + $data->{$field} = file_save_draft_area_files($editor['itemid'], $context->id, $filearea, $itemid, $options, $editor['text'], $options['forcehttps']); } $data->{$field.'format'} = $editor['format']; -- 2.39.5