$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 {
/******************************************************
<?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;
$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');
+ }
}
}
}