From: moodler Date: Mon, 10 Apr 2006 16:46:52 +0000 (+0000) Subject: Added some feedback to the picture thumbnail regneneration bug 5011 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=de251840b4ee9ca78568f6d254b7e1b9c8f9d02c;p=moodle.git Added some feedback to the picture thumbnail regneneration bug 5011 --- diff --git a/lang/en_utf8/data.php b/lang/en_utf8/data.php index 7c6a35ca36..42f82a9fd9 100644 --- a/lang/en_utf8/data.php +++ b/lang/en_utf8/data.php @@ -28,6 +28,7 @@ $string['confirmdeleterecord'] = 'Are you sure you want to delete this record?'; $string['csstemplate'] = 'CSS template'; $string['csvfile'] = 'CSV file'; $string['csvimport'] = 'CSV file import'; +$string['date'] = 'Date'; $string['dateentered'] = 'Date entered'; $string['defaultfielddelimiter'] = '(default is the comma character)'; $string['defaultfieldenclosure'] = '(default is none)'; @@ -115,7 +116,6 @@ $string['optionalfilename'] = 'Filename (optional)'; $string['pagesize'] = 'Entries per page'; $string['participants'] = 'Participants'; $string['picture'] = 'Picture'; -$string['date'] = 'Date'; $string['radiobutton'] = 'Radio buttons'; $string['rate'] = 'Rate'; $string['rating'] = 'Rating'; @@ -135,6 +135,7 @@ $string['requireapproval'] = 'Require approval?'; $string['requiredentries'] = 'Required entries'; $string['requiredentriestoview'] = 'Entries required before viewing'; $string['resettemplate'] = 'Reset template'; +$string['resizingimages'] = 'Resizing image thumbnails...'; $string['rssglobaldisabled'] = 'Disabled. See site configuration variables.'; $string['rsshowmany'] = '(number of latest entries to show, 0 to disable RSS)'; $string['rsstemplate'] = 'RSS template'; diff --git a/mod/data/field/picture/field.class.php b/mod/data/field/picture/field.class.php index d20f76e843..f79efff528 100755 --- a/mod/data/field/picture/field.class.php +++ b/mod/data/field/picture/field.class.php @@ -128,7 +128,13 @@ class data_field_picture extends data_field_file { // Check through all existing records and update the thumbnail if ($contents = get_records('data_content', 'fieldid', $this->field->id)) { + if (count($contents) > 20) { + notify(get_string('resizingimages', 'data'), 'notifysuccess'); + echo "\n\n"; // To make sure that ob_flush() has the desired effect + ob_flush(); + } foreach ($contents as $content) { + @set_time_limit(300); // Might be slow! $this->update_thumbnail($content); } }