Merge branch 'MDL-46811-master' of git://github.com/danpoltawski/moodle

This commit is contained in:
Sam Hemelryk 2014-09-23 16:36:05 +12:00
commit 4356012960
7 changed files with 18 additions and 28 deletions

View File

@ -45,7 +45,7 @@ admin_externalpage_setup('environment', '', $extraurlparams);
// 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('https://download.moodle.org',
'environment',
'environment.zip')) {
$status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
@ -53,7 +53,7 @@ if ($action == 'updatecomponent' && confirm_sesskey()) {
case COMPONENT_ERROR:
if ($cd->get_error() == 'remotedownloaderror') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/environment/environment.zip';
$a->url = 'https://download.moodle.org/environment/environment.zip';
$a->dest = $CFG->dataroot . '/';
print_error($cd->get_error(), 'error', $PAGE->url, $a);
die();

View File

@ -17,7 +17,7 @@
/**
* Fetches language packages from download.moodle.org server
*
* Language packages are available at http://download.moodle.org/langpack/
* Language packages are available at https://download.moodle.org/langpack/
* in ZIP format together with a file languages.md5 containing their hashes
* and meta info.
* Locally, language packs are saved into $CFG->dataroot/lang/

View File

@ -37,7 +37,7 @@ $string['missinglangparent'] = 'Missing parent language <em>{$a->parent}</em> of
$string['nolangupdateneeded'] = 'All your language packs are up to date, no update is needed';
$string['pluginname'] = 'Language packs';
$string['purgestringcaches'] = 'Purge string caches';
$string['remotelangnotavailable'] = 'Because Moodle cannot connect to download.moodle.org, it is not possible for language packs to be installed automatically. Please download the appropriate ZIP file(s) from <a href="http://download.moodle.org/langpack/">download.moodle.org/langpack</a>, copy them to your {$a} directory and unzip them manually.';
$string['remotelangnotavailable'] = 'Because Moodle cannot connect to download.moodle.org, it is not possible for language packs to be installed automatically. Please download the appropriate ZIP file(s) from <a href="https://download.moodle.org/langpack/">download.moodle.org/langpack</a>, copy them to your {$a} directory and unzip them manually.';
$string['uninstall'] = 'Uninstall selected language pack';
$string['uninstallconfirm'] = 'You are about to completely uninstall language pack {$a}, are you sure?';
$string['updatelangs'] = 'Update all installed language packs';

View File

@ -45,7 +45,7 @@
$message = '<br /><br />';
$message .= $CFG->tempdir.'/olson.txt<br />';
$message .= $CFG->tempdir.'/timezone.txt<br />';
$message .= '<a href="http://download.moodle.org/timezone/">http://download.moodle.org/timezone/</a><br />';
$message .= '<a href="https://download.moodle.org/timezone/">https://download.moodle.org/timezone/</a><br />';
$message .= '<a href="'.$CFG->wwwroot.'/lib/timezone.txt">'.$CFG->dirroot.'/lib/timezone.txt</a><br />';
$message .= '<br />';
@ -83,7 +83,7 @@
}
/// Otherwise, let's try moodle.org's copy
$source = 'http://download.moodle.org/timezone/';
$source = 'https://download.moodle.org/timezone/';
if (!$importdone && ($content=download_file_content($source))) {
if ($file = fopen($CFG->tempdir.'/timezone.txt', 'w')) { // Make local copy
fwrite($file, $content);

View File

@ -67,14 +67,14 @@
* To install one component:
* <code>
* require_once($CFG->libdir.'/componentlib.class.php');
* if ($cd = new component_installer('http://download.moodle.org', 'langpack/2.0',
* if ($cd = new component_installer('https://download.moodle.org', 'langpack/2.0',
* 'es.zip', 'languages.md5', 'lang')) {
* $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/langpack/2.0/es.zip';
* $a->url = 'https://download.moodle.org/langpack/2.0/es.zip';
* $a->dest= $CFG->dataroot.'/lang';
* print_error($cd->get_error(), 'error', '', $a);
* } else {
@ -225,7 +225,7 @@ class component_installer {
return false;
}
/// Check for correct sourcebase (this will be out in the future)
if (!PHPUNIT_TEST and $this->sourcebase != 'http://download.moodle.org') {
if (!PHPUNIT_TEST and $this->sourcebase != 'https://download.moodle.org') {
$this->errorstring='wrongsourcebase';
return false;
}
@ -674,9 +674,9 @@ class lang_installer {
public function lang_pack_url($langcode = '') {
if (empty($langcode)) {
return 'http://download.moodle.org/langpack/'.$this->version.'/';
return 'https://download.moodle.org/langpack/'.$this->version.'/';
} else {
return 'http://download.moodle.org/download.php/langpack/'.$this->version.'/'.$langcode.'.zip';
return 'https://download.moodle.org/download.php/langpack/'.$this->version.'/'.$langcode.'.zip';
}
}
@ -686,7 +686,7 @@ class lang_installer {
* @return array|bool false if can not download
*/
public function get_remote_list_of_languages() {
$source = 'http://download.moodle.org/langpack/' . $this->version . '/languages.md5';
$source = 'https://download.moodle.org/langpack/' . $this->version . '/languages.md5';
$availablelangs = array();
if ($content = download_file_content($source)) {
@ -778,7 +778,7 @@ class lang_installer {
protected function install_language_pack($langcode) {
// initialise new component installer to process this language
$installer = new component_installer('http://download.moodle.org', 'download.php/direct/langpack/' . $this->version,
$installer = new component_installer('https://download.moodle.org', 'download.php/direct/langpack/' . $this->version,
$langcode . '.zip', 'languages.md5', 'lang');
if (!$installer->requisitesok) {

View File

@ -121,7 +121,7 @@ class testable_available_update_checker extends \core\update\checker {
private function get_fake_response() {
$fakeresponse = array(
'status' => 'OK',
'provider' => 'http://download.moodle.org/api/1.0/updates.php',
'provider' => 'https://download.moodle.org/api/1.0/updates.php',
'apiver' => '1.0',
'timegenerated' => time(),
'forversion' => '2012010100.00',
@ -133,15 +133,15 @@ class testable_available_update_checker extends \core\update\checker {
'version' => 2012060103.00,
'release' => '2.3.3 (Build: 20121201)',
'maturity' => 200,
'url' => 'http://download.moodle.org/',
'download' => 'http://download.moodle.org/download.php/MOODLE_23_STABLE/moodle-2.3.3-latest.zip',
'url' => 'https://download.moodle.org/',
'download' => 'https://download.moodle.org/download.php/MOODLE_23_STABLE/moodle-2.3.3-latest.zip',
),
array(
'version' => 2012120100.00,
'release' => '2.4dev (Build: 20121201)',
'maturity' => 50,
'url' => 'http://download.moodle.org/',
'download' => 'http://download.moodle.org/download.php/MOODLE_24_STABLE/moodle-2.4.0-latest.zip',
'url' => 'https://download.moodle.org/',
'download' => 'https://download.moodle.org/download.php/MOODLE_24_STABLE/moodle-2.4.0-latest.zip',
),
),
'mod_foo' => array(

View File

@ -16,13 +16,3 @@ BSD ctags (Default on Mac OS X):
-------------------------------
(TODO)
Downloading the tags file
=========================
If for some reason you can't generate one, you can download a recent one from here:
http://download.moodle.org/tags (for head)
http://download.moodle.org/stable19/tags (Moodle 1.9.x)
http://download.moodle.org/stable18/tags (Moodle 1.8.x)