MDL-18797 The selected language pack fetched during install

This commit is contained in:
David Mudrak
2010-05-27 06:57:21 +00:00
parent 250c0533ef
commit c4f8fd0c3d
3 changed files with 13 additions and 8 deletions
+2 -2
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', 'lang20',
* if ($cd = new component_installer('http://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/lang20/es.zip';
* $a->url = 'http://download.moodle.org/langpack/2.0/es.zip';
* $a->dest= $CFG->dataroot.'/lang';
* print_error($cd->get_error(), 'error', '', $a);
* } else {