]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18066 import_backup_file_silently() - delete dangerous code ; merged from 19_STABLE
authorstronk7 <stronk7>
Fri, 6 Feb 2009 01:56:14 +0000 (01:56 +0000)
committerstronk7 <stronk7>
Fri, 6 Feb 2009 01:56:14 +0000 (01:56 +0000)
backup/lib.php

index 297257080366380a9bb8810c238db38323d0fc39..49ef5fe537e7787c4a98c3f1adfa3ac4cf1490b5 100644 (file)
     function import_backup_file_silently($pathtofile,$destinationcourse,$emptyfirst=false,$userdata=false, $preferences=array()) {
         global $CFG,$SESSION,$USER, $DB; // is there such a thing on cron? I guess so..
         global $restore; // ick
-        if (empty($USER)) {
-            session_set_user(get_admin());
-            $USER->admin = 1; // not sure why, but this doesn't get set
-        }
 
         define('RESTORE_SILENTLY',true); // don't output all the stuff to us.