From: skodak Date: Wed, 29 Nov 2006 20:17:13 +0000 (+0000) Subject: accessibility cleanup in langimport.php - original patch by Nick Freear MDL-7438... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d6d049718cddf3093b4f6655cd67304959937791;p=moodle.git accessibility cleanup in langimport.php - original patch by Nick Freear MDL-7438 + whitespace and old code cleanup --- diff --git a/admin/langimport.php b/admin/langimport.php index 7eeb673d23..5c4b7fa8d2 100755 --- a/admin/langimport.php +++ b/admin/langimport.php @@ -20,24 +20,24 @@ define('CHANGE_SITE_LANG', 3); define('DELETION_OF_SELECTED_LANG', 4); define('UPDATE_ALL_LANG', 5); - + $strlang = get_string('langimport','admin'); - + $strlanguage = get_string("language"); $strthislanguage = get_string("thislanguage"); $title = $strlang; - + admin_externalpage_print_header($adminroot); - + switch ($mode){ - + case INSTALLATION_OF_SELECTED_LANG: ///installation of selected language pack - + if (confirm_sesskey()) { @mkdir ($CFG->dataroot.'/temp/'); //make it in case it's a fresh install, it might not be there @mkdir ($CFG->dataroot.'/lang/'); - + require_once($CFG->libdir.'/componentlib.class.php'); if ($cd = new component_installer('http://download.moodle.org', 'lang16', $pack.'.zip', 'languages.md5', 'lang')) { @@ -86,7 +86,7 @@ case DELETION_OF_SELECTED_LANG: //delete a directory(ies) containing a lang pack completely if (!$confirm && confirm_sesskey()) { - notice_yesno(get_string('uninstallconfirm', 'admin', $uninstalllang), + notice_yesno(get_string('uninstallconfirm', 'admin', $uninstalllang), 'langimport.php?mode=4&uninstalllang='.$uninstalllang.'&confirm=1&sesskey='.sesskey(), 'langimport.php'); } else if (confirm_sesskey()) { @@ -112,7 +112,7 @@ } @unlink($CFG->dataroot.'/cache/languages'); break; - + case UPDATE_ALL_LANG: //1 click update for all updatable language packs //0th pull a list from download.moodle.org, @@ -214,7 +214,7 @@ } break; - + default: //display choice mode $source = 'http://download.moodle.org/lang16/languages.md5'; @@ -242,21 +242,18 @@ echo ''; print_simple_box_end(); } - + print_simple_box_start('center','60%'); - echo ''; + echo '
'; - echo ''; - echo ''; - echo ''; - echo '
'; echo '
'; - echo '
'; + echo ''; echo ''; unset($CFG->langlist); // ignore admin's langlist $installedlangs = get_list_of_languages(); /// display installed langs here + echo '
\n"; echo ''; echo '
'; echo '
'; - echo '
'; + echo ''; echo '
'; echo '
'; - echo '

'; - + /// Display option to change site language - - /// Erm... this doesn't seem to work. Plus it's redundant. -vinkmar - -// print_string('changesitelang','admin'); -// $sitelanguage = get_record('config','name','lang'); -// echo '

'; -// echo ''; -// echo ''; -// echo ''; -// echo '
'; /// display to be installed langs here echo '
'; - echo ''; } - echo '
'; //availabe langs table + //availabe langs table $empty = 1; //something to pring /// if this language pack is not already installed, then we allow installation - echo '
'; + echo ''; echo ''; + echo '
\n"; if ($remote) { echo ''; - echo '
'; + echo '
'; } echo '
'; if ($empty) { - echo '
'; + echo '
'; print_string('nolanguagetodownload','admin'); - echo '
'; //close available langs table - echo '
'; + //close available langs table echo '
'; print_simple_box_end(); @@ -343,7 +319,7 @@ } //close of main switch admin_externalpage_print_footer($adminroot); - + /* returns a list of available language packs from a * local copy shipped with standard moodle distro * this is for site that can't perform fopen @@ -360,8 +336,8 @@ } return $availablelangs; } - - /* checks the md5 of the zip file, grabbed from download.moodle.org, + + /* checks the md5 of the zip file, grabbed from download.moodle.org, * against the md5 of the local language file from last update * @param string $lang * @param string $md5check @@ -375,7 +351,7 @@ } return false; } - + //returns an array of languages, or false if can not read from source //uses a socket if proxy is set as a config variable function proxy_url($url) {