]> git.mjollnir.org Git - moodle.git/commitdiff
merged changing of feedback for the function that handles user table
authortoyomoyo <toyomoyo>
Tue, 11 Jul 2006 03:36:13 +0000 (03:36 +0000)
committertoyomoyo <toyomoyo>
Tue, 11 Jul 2006 03:36:13 +0000 (03:36 +0000)
admin/utfdbmigrate.php
lib/db/migrate2utf8.php

index 541f9cbc293509d5009c6dcdfaabe4ac05baa902..88bd4017281d76e7974a8805245500b0cebb7b31 100755 (executable)
@@ -386,7 +386,7 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
                 $tablefunction = 'migrate2utf8_'.$dbtablename;
             }
             if ($CFG->dbtype=='mysql' && function_exists($tablefunction)) {
-                $tablefunction($dbtable['#']['FIELDS'][0]['#']['FIELD'], $crash, $debug, $maxrecords); // execute it.
+                $tablefunction($dbtable['#']['FIELDS'][0]['#']['FIELD'], $crash, $debug, $maxrecords, $done, $tablestoconvert); // execute it.
             } else {
 
             /******************************************************
index 8e32183660754c5ca3c984c3a2b98f274205ba9b..f910981e80afcc0e9e8606fcc57c49737450370e 100755 (executable)
@@ -1,7 +1,7 @@
 <?php // $Id$
 // This is a one-shot function that converts an entire table on row basis.
 
-function migrate2utf8_user($fields, $crash, $debug, $maxrecords) {
+function migrate2utf8_user($fields, $crash, $debug, $maxrecords, $done, $tablestoconvert) {
 
     global $CFG, $db, $processedrecords, $globallang;
 
@@ -124,9 +124,10 @@ function migrate2utf8_user($fields, $crash, $debug, $maxrecords) {
 
                 $processedrecords++;
                 //print some output once in a while
-                if (($processedrecords) % 5000 == 0) {
-                    echo 'Processing...'.$dbtablename.'...'.$fieldname.'...'.$record->id;
-                }
+                
+                if (($processedrecords) % 1000 == 0) {
+                       print_progress($done, $tablestoconvert, 5, 1, 'Processing: user');
+               }
             }
         }
     }