]> git.mjollnir.org Git - moodle.git/commitdiff
Now ORIGINAL_WWWROOT is saved in backup and restored too!!
authorstronk7 <stronk7>
Thu, 6 May 2004 23:20:25 +0000 (23:20 +0000)
committerstronk7 <stronk7>
Thu, 6 May 2004 23:20:25 +0000 (23:20 +0000)
backup/backuplib.php
backup/restore_execute.html
backup/restorelib.php

index 98a565e0f6d1e9720d3373a80813af7fae987352..50b3ae93059ca70338ff194e8c5a784759e58c3c 100644 (file)
         fwrite ($bf,full_tag("BACKUP_RELEASE",2,false,$preferences->backup_release));
         //The date
         fwrite ($bf,full_tag("DATE",2,false,$preferences->backup_unique_code));
+        //The original site wwwroot
+        fwrite ($bf,full_tag("ORIGINAL_WWWROOT",2,false,$CFG->wwwroot));
         //Te includes tag
         fwrite ($bf,start_tag("DETAILS",2,true));
         //Now, go to mod element of preferences to print its status
index eb25617aaf5f18a5d8f142ed5750ec1fc1ae4424..866eed46655259350fa0ce51d71377738ee86d8b 100644 (file)
         $restore = $SESSION->restore;
     }
 
+    //Add info->original_wwwroot to $restore to be able to use it in all the restore process
+    //(mainly when decoding internal links)
+    $restore->original_wwwroot = $info->original_wwwroot;
+
     //Check login
     require_login();
 
index e6ba723c0e818bfeaed5b4c0c94c440e9499456f..199ce2d1a7839c7edf39b2a31dc84f22cbf1aa05 100644 (file)
                         case "DATE":
                             $this->info->backup_date = $this->getContents();
                             break;
+                        case "ORIGINAL_WWWROOT":
+                            $this->info->original_wwwroot = $this->getContents();
+                            break;
                     }
                 }
                 if ($this->tree[3] == "DETAILS") {