MDL-24491, removed print_object in wiki upgrade code

This commit is contained in:
Dongsheng Cai 2010-11-10 08:22:16 +00:00
parent 725c9404e4
commit b9ec7dd288
2 changed files with 2 additions and 6 deletions

View file

@ -271,8 +271,6 @@ function xmldb_wiki_upgrade($oldversion) {
} }
} else { } else {
echo $OUTPUT->notification("Bad data found: $r->pagename <br/> Expected file path: $thefile Please fix the bad file path manually."); echo $OUTPUT->notification("Bad data found: $r->pagename <br/> Expected file path: $thefile Please fix the bad file path manually.");
// print file meta info, which can help admin find missing file
print_object($filemeta);
} }
} }
} }

View file

@ -293,15 +293,13 @@ function wiki_upgrade_migrate_versions() {
$version->content = $content; $version->content = $content;
$DB->insert_record('wiki_versions', $version); $DB->insert_record('wiki_versions', $version);
} catch (Exception $e) { } catch (Exception $e) {
echo $OUTPUT->notification('Cannot insert this record'); echo $OUTPUT->notification('Cannot insert this record, page id: ' . $page->id);
print_object($version);
} }
} else { } else {
try { try {
$DB->insert_record('wiki_versions', $version); $DB->insert_record('wiki_versions', $version);
} catch (Exception $e) { } catch (Exception $e) {
echo $OUTPUT->notification('Cannot insert this record'); echo $OUTPUT->notification('Cannot insert this record, page id: ' . $page->id);
print_object($version);
} }
} }
} }