MDL-28526 glossary: extra time and memory for export/import

This commit is contained in:
Marina Glancy 2015-03-20 15:02:32 +08:00
parent 27d01f7c8c
commit 985af410a7
2 changed files with 8 additions and 0 deletions

View File

@ -77,6 +77,10 @@ if (empty($result)) {
die();
}
// Large exports are likely to take their time and memory.
core_php_time_limit::raise();
raise_memory_limit(MEMORY_EXTRA);
if ($xml = glossary_read_imported_file($result)) {
$importedentries = 0;
$importedcats = 0;

View File

@ -2262,6 +2262,10 @@ function glossary_generate_export_csv($entries, $aliases, $categories) {
function glossary_generate_export_file($glossary, $ignored = "", $hook = 0) {
global $CFG, $DB;
// Large exports are likely to take their time and memory.
core_php_time_limit::raise();
raise_memory_limit(MEMORY_EXTRA);
$cm = get_coursemodule_from_instance('glossary', $glossary->id, $glossary->course);
$context = context_module::instance($cm->id);