### Eclipse Workspace Patch 1.0
#P 19stable
Index: admin/environment.php
===================================================================
RCS file: /cvsroot/moodle/moodle/admin/environment.php,v
retrieving revision 1.19.2.2
diff -u -r1.19.2.2 environment.php
--- admin/environment.php	31 Dec 2007 01:09:31 -0000	1.19.2.2
+++ admin/environment.php	17 Apr 2009 04:38:42 -0000
@@ -62,7 +62,7 @@
 /// Handle the 'updatecomponent' action
     if ($action == 'updatecomponent' && confirm_sesskey()) {
     /// Create component installer and execute it
-        if ($cd = new component_installer('http://download.moodle.org', 
+        if ($cd = new component_installer('http://download.moodle.org/download.php/direct', 
                                           'environment', 
                                           'environment.zip')) {
             $status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
@@ -70,7 +70,7 @@
                 case COMPONENT_ERROR:
                     if ($cd->get_error() == 'remotedownloaderror') {
                         $a = new stdClass();
-                        $a->url = 'http://download.moodle.org/environment/environment.zip';
+                        $a->url = 'http://download.moodle.org/download.php/direct/environment/environment.zip';
                         $a->dest= $CFG->dataroot.'/';
                         print_simple_box(get_string($cd->get_error(), 'error', $a), 'center', '', '', 5, 'errorbox');
                     } else {
Index: admin/timezoneimport.php
===================================================================
RCS file: /cvsroot/moodle/moodle/admin/timezoneimport.php,v
retrieving revision 1.10.4.4
diff -u -r1.10.4.4 timezoneimport.php
--- admin/timezoneimport.php	31 Dec 2007 15:24:22 -0000	1.10.4.4
+++ admin/timezoneimport.php	17 Apr 2009 04:38:42 -0000
@@ -24,7 +24,7 @@
         $message = '<br /><br />';
         $message .= $CFG->dataroot.'/temp/olson.txt<br />';
         $message .= $CFG->dataroot.'/temp/timezone.txt<br />';
-        $message .= '<a href="http://download.moodle.org/timezone/">http://download.moodle.org/timezone/</a><br />';
+        $message .= '<a href="http://download.moodle.org/download.php/direct/timezone/">http://download.moodle.org/download.php/direct/timezone/</a><br />';
         $message .= '<a href="'.$CFG->wwwroot.'/lib/timezone.txt">'.$CFG->dirroot.'/lib/timezone.txt</a><br />';
         $message .= '<br />';
 
@@ -62,7 +62,7 @@
     }
 
 /// Otherwise, let's try moodle.org's copy
-    $source = 'http://download.moodle.org/timezone/';
+    $source = 'http://download.moodle.org/download.php/direct/timezone/';
     if (!$importdone && ($content=download_file_content($source))) {
         if ($file = fopen($CFG->dataroot.'/temp/timezone.txt', 'w')) {            // Make local copy
             fwrite($file, $content);
Index: admin/langimport.php
===================================================================
RCS file: /cvsroot/moodle/moodle/admin/langimport.php,v
retrieving revision 1.36.2.9
diff -u -r1.36.2.9 langimport.php
--- admin/langimport.php	1 Nov 2008 19:30:56 -0000	1.36.2.9
+++ admin/langimport.php	17 Apr 2009 04:38:42 -0000
@@ -60,7 +60,7 @@
                 }
 
                 foreach ($packs as $pack) {
-                    if ($cd = new component_installer('http://download.moodle.org', 'lang16',
+                    if ($cd = new component_installer('http://download.moodle.org/download.php/direct', 'lang16',
                                                         $pack.'.zip', 'languages.md5', 'lang')) {
                         $status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
                         switch ($status) {
@@ -68,7 +68,7 @@
                             case COMPONENT_ERROR:
                                 if ($cd->get_error() == 'remotedownloaderror') {
                                     $a = new object();
-                                    $a->url = 'http://download.moodle.org/lang16/'.$pack.'.zip';
+                                    $a->url = 'http://download.moodle.org/download.php/direct/lang16/'.$pack.'.zip';
                                     $a->dest= $CFG->dataroot.'/lang';
                                     print_error($cd->get_error(), 'error', 'langimport.php', $a);
                                 } else {
@@ -195,7 +195,7 @@
 
                 //2. copy & unzip into new
 
-                if ($cd = new component_installer('http://download.moodle.org', 'lang16',
+                if ($cd = new component_installer('http://download.moodle.org/download.php/direct', 'lang16',
                                        $pack.'.zip', 'languages.md5', 'lang')) {
                 $status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
                 switch ($status) {
@@ -203,7 +203,7 @@
                     case COMPONENT_ERROR:
                         if ($cd->get_error() == 'remotedownloaderror') {
                             $a = new stdClass();
-                            $a->url = 'http://download.moodle.org/lang16/'.$pack.'.zip';
+                            $a->url = 'http://download.moodle.org/download.php/direct/lang16/'.$pack.'.zip';
                             $a->dest= $CFG->dataroot.'/lang';
                             print_error($cd->get_error(), 'error', "", $a); // not probable
                         } else {
@@ -364,7 +364,7 @@
                     echo '<option value="'.$alang[0].'">'.$alang[2].' ('.$shortlang.')</option>';
                 }
             } else {    //print list in local format, and instruction to install
-                echo '<tr><td>'.$alang[2].'</td><td><a href="http://download.moodle.org/lang16/'.$alang[0].'.zip">'.get_string('download','admin').'</a></td></tr>';
+                echo '<tr><td>'.$alang[2].'</td><td><a href="http://download.moodle.org/download.php/direct/lang16/'.$alang[0].'.zip">'.get_string('download','admin').'</a></td></tr>';
             }
             $empty = 0;
         }
@@ -427,7 +427,7 @@
      * @return array or false if can not download
      */
     function get_remote_list_of_languages() {
-        $source = 'http://download.moodle.org/lang16/languages.md5';
+        $source = 'http://download.moodle.org/download.php/direct/lang16/languages.md5';
         $availablelangs = array();
 
         if ($content = download_file_content($source)) {
Index: install.php
===================================================================
RCS file: /cvsroot/moodle/moodle/install.php,v
retrieving revision 1.80.2.19
diff -u -r1.80.2.19 install.php
--- install.php	26 Mar 2009 01:36:17 -0000	1.80.2.19
+++ install.php	17 Apr 2009 04:38:42 -0000
@@ -479,14 +479,14 @@
     }
 
 /// Download and install component
-    if (($cd = new component_installer('http://download.moodle.org', 'lang16',
+    if (($cd = new component_installer('http://download.moodle.org/download.php/direct', 'lang16',
         $INSTALL['language'].'.zip', 'languages.md5', 'lang')) && empty($errormsg)) {
         $status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
         switch ($status) {
             case COMPONENT_ERROR:
                 if ($cd->get_error() == 'remotedownloaderror') {
                     $a = new stdClass();
-                    $a->url = 'http://download.moodle.org/lang16/'.$INSTALL['language'].'.zip';
+                    $a->url = 'http://download.moodle.org/download.php/direct/lang16/'.$INSTALL['language'].'.zip';
                     $a->dest= $CFG->dataroot.'/lang';
                     $downloaderror = get_string($cd->get_error(), 'error', $a);
                 } else {
Index: lib/adminlib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/adminlib.php,v
retrieving revision 1.153.2.72
diff -u -r1.153.2.72 adminlib.php
--- lib/adminlib.php	26 Mar 2009 13:17:56 -0000	1.153.2.72
+++ lib/adminlib.php	17 Apr 2009 04:38:43 -0000
@@ -4732,7 +4732,7 @@
 
     require_once($CFG->libdir.'/componentlib.class.php');
 
-    if ($cd = new component_installer('http://download.moodle.org', 'lang16', $lang.'.zip', 'languages.md5', 'lang')) {
+    if ($cd = new component_installer('http://download.moodle.org/download.php/direct', 'lang16', $lang.'.zip', 'languages.md5', 'lang')) {
         $status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
 
         if ($status == COMPONENT_INSTALLED) {
Index: lib/componentlib.class.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/componentlib.class.php,v
retrieving revision 1.7.2.6
diff -u -r1.7.2.6 componentlib.class.php
--- lib/componentlib.class.php	2 Apr 2008 06:10:01 -0000	1.7.2.6
+++ lib/componentlib.class.php	17 Apr 2009 04:38:43 -0000
@@ -207,7 +207,7 @@
             return false;
         }
     /// Check for correct sourcebase (this will be out in the future)
-        if ($this->sourcebase != 'http://download.moodle.org') {
+        if ($this->sourcebase != 'http://download.moodle.org/download.php/direct') {
             $this->errorstring='wrongsourcebase';
             return false;
         }
Index: lib/db/mysql.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/db/Attic/mysql.php,v
retrieving revision 1.256.2.2
diff -u -r1.256.2.2 mysql.php
--- lib/db/mysql.php	1 May 2008 06:03:32 -0000	1.256.2.2
+++ lib/db/mysql.php	17 Apr 2009 04:38:43 -0000
@@ -1426,9 +1426,9 @@
 
                 set_field('modules', 'visible', 0, 'name', 'attendance');
                 notify('The Attendance module has been discontinued.  If you really want to 
-                        continue using it, you should download it individually from 
-                        http://download.moodle.org/modules and install it, then 
-                        reactivate it from Admin >> Configuration >> Modules.  
+                        continue using it, you should download it individually from the Modules 
+                        and Plugins database (http://moodle.org/mod/data/view.php?id=6009) 
+                        and install it, then reactivate it from Admin >> Configuration >> Modules.  
                         None of your existing data has been deleted, so all existing 
                         Attendance activities should re-appear.');
 
@@ -1449,8 +1449,8 @@
                 set_field('modules', 'visible', 0, 'name', 'dialogue');
                 notify('The Dialogue module has been discontinued.  If you really want to 
                         continue using it, you should download it individually from 
-                        http://download.moodle.org/modules and install it, then 
-                        reactivate it from Admin >> Configuration >> Modules.  
+                        the Modules and Plugins database (http://moodle.org/mod/data/view.php?id=6009) 
+                        and install it, then reactivate it from Admin >> Configuration >> Modules.  
                         None of your existing data has been deleted, so all existing 
                         Dialogue activities should re-appear.');
 
Index: lib/db/postgres7.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/db/Attic/postgres7.php,v
retrieving revision 1.237.2.2
diff -u -r1.237.2.2 postgres7.php
--- lib/db/postgres7.php	1 May 2008 06:03:32 -0000	1.237.2.2
+++ lib/db/postgres7.php	17 Apr 2009 04:38:44 -0000
@@ -1146,8 +1146,8 @@
                 set_field('modules', 'visible', 0, 'name', 'attendance');
                 notify('The Attendance module has been discontinued.  If you really want to 
                         continue using it, you should download it individually from 
-                        http://download.moodle.org/modules and install it, then 
-                        reactivate it from Admin >> Configuration >> Modules.  
+                        the Modules and Plugins database (http://moodle.org/mod/data/view.php?id=6009) 
+                        and install it, then reactivate it from Admin >> Configuration >> Modules.  
                         None of your existing data has been deleted, so all existing 
                         Attendance activities should re-appear.');
 
@@ -1192,8 +1192,8 @@
                 set_field('modules', 'visible', 0, 'name', 'dialogue');
                 notify('The Dialogue module has been discontinued.  If you really want to 
                         continue using it, you should download it individually from 
-                        http://download.moodle.org/modules and install it, then 
-                        reactivate it from Admin >> Configuration >> Modules.  
+                        the Modules and Plugins database (http://moodle.org/mod/data/view.php?id=6009) 
+                        and install it, then reactivate it from Admin >> Configuration >> Modules.  
                         None of your existing data has been deleted, so all existing 
                         Dialogue activities should re-appear.');
 
