]> git.mjollnir.org Git - moodle.git/commitdiff
Added some feedback to the picture thumbnail regneneration bug 5011
authormoodler <moodler>
Mon, 10 Apr 2006 16:46:52 +0000 (16:46 +0000)
committermoodler <moodler>
Mon, 10 Apr 2006 16:46:52 +0000 (16:46 +0000)
lang/en_utf8/data.php
mod/data/field/picture/field.class.php

index 7c6a35ca36df5a783ee07b28dfc6e5897ac9ea02..42f82a9fd9202d9f99784abc233003d9ef9270b2 100644 (file)
@@ -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';
index d20f76e84337220331f057671cfe89b18efb0969..f79efff528e5254aba2a8b289032bb40e11f6f51 100755 (executable)
@@ -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);
                 }
             }