mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-12894 Fixing language string mess (language packs containing \n) & moved them to the controllers,
also fixed a few typos and a || instead of && bug. This all relates to the CLI installer.
This commit is contained in:
parent
b9f49659b6
commit
e3cd54731c
5 changed files with 84 additions and 42 deletions
|
@ -177,6 +177,7 @@ if ( realpath($_SERVER['argv'][0]) == __FILE__ && count($args)>1) {
|
||||||
//detect erros in the options
|
//detect erros in the options
|
||||||
if (PEAR::isError($console_opt)) {
|
if (PEAR::isError($console_opt)) {
|
||||||
console_write(STDOUT,'invalidargumenthelp');
|
console_write(STDOUT,'invalidargumenthelp');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,6 +188,7 @@ $options=get_options($console_opt);
|
||||||
if (is_array($options)) {
|
if (is_array($options)) {
|
||||||
if(array_key_exists('help',$options)){
|
if(array_key_exists('help',$options)){
|
||||||
console_write(STDOUT,'usagehelp');
|
console_write(STDOUT,'usagehelp');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
die ;
|
die ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -231,7 +233,11 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
|
|
||||||
//welcome message
|
//welcome message
|
||||||
if ($verbose > CLI_NO) {
|
if ($verbose > CLI_NO) {
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
console_write(STDOUT,'welcometext','install');
|
console_write(STDOUT,'welcometext','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
//============================================================================//
|
//============================================================================//
|
||||||
//Language selection for the installation
|
//Language selection for the installation
|
||||||
|
@ -239,14 +245,19 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
if ( ( $interactive == CLI_FULL ) || ($interactive == CLI_SEMI && ( !isset($INSTALL['lang'])) ) ) {
|
if ( ( $interactive == CLI_FULL ) || ($interactive == CLI_SEMI && ( !isset($INSTALL['lang'])) ) ) {
|
||||||
$langs=get_installer_list_of_languages();
|
$langs=get_installer_list_of_languages();
|
||||||
|
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
console_write(STDOUT,'selectlanguage','install');
|
console_write(STDOUT,'selectlanguage','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
console_write(STDOUT,'availablelangs','install');
|
console_write(STDOUT,'availablelangs','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
//output available languages
|
//output available languages
|
||||||
foreach ( $langs as $language ) {
|
foreach ( $langs as $language ) {
|
||||||
console_write(STDOUT,"\t",'',false);
|
console_write(STDOUT,"\t",'',false);
|
||||||
console_write(STDOUT,$language,'',false);
|
console_write(STDOUT,$language,'',false);
|
||||||
console_write(STDOUT,"\n",'',false);
|
console_write(STDOUT,"\n",'',false);
|
||||||
}
|
}
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
console_write(STDOUT,'yourchoice','install');
|
console_write(STDOUT,'yourchoice','install');
|
||||||
$short_code_langs = get_short_codes($langs);
|
$short_code_langs = get_short_codes($langs);
|
||||||
|
|
||||||
|
@ -261,7 +272,9 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
if ($verbose == CLI_NO) {
|
if ($verbose == CLI_NO) {
|
||||||
$silent=true;
|
$silent=true;
|
||||||
}else{
|
}else{
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
console_write(STDOUT,'checkingphpsettings','install');
|
console_write(STDOUT,'checkingphpsettings','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
/// Check that PHP is of a sufficient version
|
/// Check that PHP is of a sufficient version
|
||||||
check_compatibility(inst_check_php_version(), get_string('phpversion', 'install'), get_string('phpversionerror', 'install'),false,$silent);
|
check_compatibility(inst_check_php_version(), get_string('phpversion', 'install'), get_string('phpversionerror', 'install'),false,$silent);
|
||||||
|
@ -288,7 +301,11 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
|
|
||||||
|
|
||||||
if ( ( $interactive == CLI_FULL ) || ($interactive == CLI_SEMI && ( !isset($INSTALL['dirroot']) || !isset($INSTALL['wwwroot']) || !isset($INSTALL['dataroot']) ) ) ) {
|
if ( ( $interactive == CLI_FULL ) || ($interactive == CLI_SEMI && ( !isset($INSTALL['dirroot']) || !isset($INSTALL['wwwroot']) || !isset($INSTALL['dataroot']) ) ) ) {
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
console_write(STDOUT,'locationanddirectories','install');
|
console_write(STDOUT,'locationanddirectories','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//input the web directory
|
//input the web directory
|
||||||
|
@ -338,7 +355,11 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
|
|
||||||
// Database section heading
|
// Database section heading
|
||||||
if ( ( $interactive == CLI_FULL ) || ($interactive == CLI_SEMI && ( !isset($INSTALL['dbhost']) || !isset($INSTALL['dbname']) || !isset($INSTALL['dbtype']) || !isset($INSTALL['dbuser']) || !isset($INSTALL['dbpass']) || !isset($INSTALL['prefix']) ) ) ) {
|
if ( ( $interactive == CLI_FULL ) || ($interactive == CLI_SEMI && ( !isset($INSTALL['dbhost']) || !isset($INSTALL['dbname']) || !isset($INSTALL['dbtype']) || !isset($INSTALL['dbuser']) || !isset($INSTALL['dbpass']) || !isset($INSTALL['prefix']) ) ) ) {
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
console_write(STDOUT,'databasesettingsformoodle','install');
|
console_write(STDOUT,'databasesettingsformoodle','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Input dialogs
|
//Input dialogs
|
||||||
|
@ -352,7 +373,9 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
}
|
}
|
||||||
if ( ( $interactive == CLI_FULL ) || ($interactive == CLI_SEMI && ( !isset($INSTALL['dbtype']) ))) {
|
if ( ( $interactive == CLI_FULL ) || ($interactive == CLI_SEMI && ( !isset($INSTALL['dbtype']) ))) {
|
||||||
$dbtypes=array('mysql','oci8po','postgres7','mssql','mssql_n','odbc_mssql');
|
$dbtypes=array('mysql','oci8po','postgres7','mssql','mssql_n','odbc_mssql');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
console_write(STDOUT,'availabledbtypes','install');
|
console_write(STDOUT,'availabledbtypes','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
foreach ($dbtypes as $dbtype) {
|
foreach ($dbtypes as $dbtype) {
|
||||||
console_write(STDOUT,"\t",'',false);
|
console_write(STDOUT,"\t",'',false);
|
||||||
console_write(STDOUT,$dbtype,'install');
|
console_write(STDOUT,$dbtype,'install');
|
||||||
|
@ -458,7 +481,7 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
$db->SetFetchMode(ADODB_FETCH_ASSOC);
|
$db->SetFetchMode(ADODB_FETCH_ASSOC);
|
||||||
|
|
||||||
if (! $dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'])) {
|
if (! $dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'])) {
|
||||||
$errormsg= get_string('cannotconnecttodb','install');
|
$errormsg= get_string('cannotconnecttodb','install') . "\n";
|
||||||
} else {
|
} else {
|
||||||
/// We have been able to connect properly, just test the database encoding now.
|
/// We have been able to connect properly, just test the database encoding now.
|
||||||
/// It must be Unicode for 1.8 installations.
|
/// It must be Unicode for 1.8 installations.
|
||||||
|
@ -507,7 +530,7 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
if ($dbconnected) {
|
if ($dbconnected) {
|
||||||
/// Execute environment check, printing results
|
/// Execute environment check, printing results
|
||||||
if (!check_moodle_environment($INSTALL['release'], $environment_results, false)) {
|
if (!check_moodle_environment($INSTALL['release'], $environment_results, false)) {
|
||||||
$errormsg = get_string('errorsinenvironment', 'install');
|
$errormsg = get_string('errorsinenvironment', 'install') . "\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/// We never should reach this because DB has been tested before arriving here
|
/// We never should reach this because DB has been tested before arriving here
|
||||||
|
@ -531,6 +554,8 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
if ( ( $interactive == CLI_FULL ) || ($interactive == CLI_SEMI && ( !isset($INSTALL['downloadlangaugepack']) ))) {
|
if ( ( $interactive == CLI_FULL ) || ($interactive == CLI_SEMI && ( !isset($INSTALL['downloadlangaugepack']) ))) {
|
||||||
$site_langs=get_list_of_languages();
|
$site_langs=get_list_of_languages();
|
||||||
if (!key_exists($INSTALL['lang'],$site_langs)) {
|
if (!key_exists($INSTALL['lang'],$site_langs)) {
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
console_write(STDOUT,'downloadlanguagepack','install');
|
console_write(STDOUT,'downloadlanguagepack','install');
|
||||||
$download_lang_pack=read_yes_no();
|
$download_lang_pack=read_yes_no();
|
||||||
if($download_lang_pack == 'yes'){
|
if($download_lang_pack == 'yes'){
|
||||||
|
@ -574,7 +599,7 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $verbose > CLI_NO && $downloadsuccess) {
|
if ( $verbose > CLI_NO && !empty($downloadsuccess)) {
|
||||||
//print success message if language pack download is successful
|
//print success message if language pack download is successful
|
||||||
console_write(STDOUT,'downloadsuccess');
|
console_write(STDOUT,'downloadsuccess');
|
||||||
print_newline();
|
print_newline();
|
||||||
|
@ -603,6 +628,7 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
|
|
||||||
if ($verbose > CLI_NO) {
|
if ($verbose > CLI_NO) {
|
||||||
console_write(STDOUT,'creatingconfigfile','install');
|
console_write(STDOUT,'creatingconfigfile','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$str = '<?php /// Moodle Configuration File '."\r\n";
|
$str = '<?php /// Moodle Configuration File '."\r\n";
|
||||||
|
@ -644,12 +670,17 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
if ($verbose > CLI_NO) {
|
if ($verbose > CLI_NO) {
|
||||||
console_write(STDOUT,'configfilecreated','install');
|
console_write(STDOUT,'configfilecreated','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console_write(STDERR,'writeconfigfilefailed','install');
|
console_write(STDOUT,'configfilenotwritten','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
|
console_write(STDERR, $str, '', false);
|
||||||
}
|
}
|
||||||
if ( $verbose ) {
|
if ( $verbose ) {
|
||||||
console_write(STDOUT,'installationiscomplete','install');
|
console_write(STDOUT,'installationiscomplete','install');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -657,6 +688,7 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
// This is what happens if there is no upgrade....
|
// This is what happens if there is no upgrade....
|
||||||
//console_write(STDERR,'configurationfileexist','install');
|
//console_write(STDERR,'configurationfileexist','install');
|
||||||
|
//console_write(STDOUT, "\n", '', false);
|
||||||
//die;
|
//die;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1305,6 +1337,7 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||||
if ( $verbose > CLI_NO ) {
|
if ( $verbose > CLI_NO ) {
|
||||||
print_newline();
|
print_newline();
|
||||||
console_write(STDOUT,'upgradingcompleted');
|
console_write(STDOUT,'upgradingcompleted');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,6 @@ thisdirection
|
||||||
thislanguage
|
thislanguage
|
||||||
unicoderecommended
|
unicoderecommended
|
||||||
unicoderequired
|
unicoderequired
|
||||||
unsafedirname
|
|
||||||
upgradingactivitymodule
|
upgradingactivitymodule
|
||||||
upgradingbackupdb
|
upgradingbackupdb
|
||||||
upgradingblocksdb
|
upgradingblocksdb
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
// install.php - created with Moodle 1.7 beta + (2006101003)
|
// install.php - created with Moodle 1.7 beta + (2006101003)
|
||||||
|
|
||||||
|
$string['aborting'] = 'Aborting installation';
|
||||||
$string['admindirerror'] = 'The admin directory specified is incorrect';
|
$string['admindirerror'] = 'The admin directory specified is incorrect';
|
||||||
$string['admindirname'] = 'Admin Directory';
|
$string['admindirname'] = 'Admin Directory';
|
||||||
$string['admindirsetting'] = 'A very few webhosts use /admin as a special URL for you to access a
|
$string['admindirsetting'] = 'A very few webhosts use /admin as a special URL for you to access a
|
||||||
|
@ -24,26 +24,26 @@ $string['adminlastname'] = 'Last Name :';
|
||||||
$string['adminpassword'] = 'Password :';
|
$string['adminpassword'] = 'Password :';
|
||||||
$string['adminusername'] = 'Username :';
|
$string['adminusername'] = 'Username :';
|
||||||
$string['askcontinue'] = 'Continue (yes/no) :';
|
$string['askcontinue'] = 'Continue (yes/no) :';
|
||||||
$string['availabledbtypes']='\nAvailable db types \n';
|
$string['availabledbtypes']='Available db types';
|
||||||
$string['availablelangs']='List of available languages \n';
|
$string['availablelangs']='List of available languages';
|
||||||
$string['cannotconnecttodb'] = 'Cannot connect to db \n';
|
$string['cannotconnecttodb'] = 'Cannot connect to db';
|
||||||
$string['caution'] = 'Caution';
|
$string['caution'] = 'Caution';
|
||||||
$string['checkingphpsettings']='\n\nChecking PHP Settings\n\n';
|
$string['checkingphpsettings']='Checking PHP Settings';
|
||||||
$string['chooselanguage'] = 'Choose a language';
|
$string['chooselanguage'] = 'Choose a language';
|
||||||
$string['chooselanguagehead'] = 'Choose a language';
|
$string['chooselanguagehead'] = 'Choose a language';
|
||||||
$string['chooselanguagesub'] = 'Please choose a language for the installation ONLY. You will be able to choose site and user languages on a later screen.';
|
$string['chooselanguagesub'] = 'Please choose a language for the installation ONLY. You will be able to choose site and user languages on a later screen.';
|
||||||
$string['compatibilitysettings'] = 'Checking your PHP settings ...';
|
$string['compatibilitysettings'] = 'Checking your PHP settings ...';
|
||||||
$string['compatibilitysettingshead'] = 'Checking your PHP settings ...';
|
$string['compatibilitysettingshead'] = 'Checking your PHP settings ...';
|
||||||
$string['compatibilitysettingssub'] = 'Your server should pass all these tests to make Moodle run properly';
|
$string['compatibilitysettingssub'] = 'Your server should pass all these tests to make Moodle run properly';
|
||||||
$string['configfilecreated'] = 'Configuration file successfully created\n ';
|
$string['configfilecreated'] = 'Configuration file successfully created';
|
||||||
$string['configfiledoesnotexist'] = 'Configuration file does not exist !!!';
|
$string['configfiledoesnotexist'] = 'Configuration file does not exist !!!';
|
||||||
$string['configfilenotwritten'] = 'The installer script was not able to automatically create a config.php file containing your chosen settings, probably because the Moodle directory is not writeable. You can manually copy the following code into a file named config.php within the root directory of Moodle.';
|
$string['configfilenotwritten'] = 'The installer script was not able to automatically create a config.php file containing your chosen settings, probably because the Moodle directory is not writeable. You can manually copy the following code into a file named config.php within the root directory of Moodle.';
|
||||||
$string['configfilewritten'] = 'config.php has been successfully created';
|
$string['configfilewritten'] = 'config.php has been successfully created';
|
||||||
$string['configurationcomplete'] = 'Configuration completed';
|
$string['configurationcomplete'] = 'Configuration completed';
|
||||||
$string['configurationcompletehead'] = 'Configuration completed';
|
$string['configurationcompletehead'] = 'Configuration completed';
|
||||||
$string['configurationcompletesub'] = 'Moodle made an attempt to save your configuration in a file in the root of your Moodle installation.';
|
$string['configurationcompletesub'] = 'Moodle made an attempt to save your configuration in a file in the root of your Moodle installation.';
|
||||||
$string['configurationfileexist']='Configuration file already exist!\n';
|
$string['configurationfileexist']='Configuration file already exist!';
|
||||||
$string['creatingconfigfile'] =' Creating configuration file ...\n';
|
$string['creatingconfigfile'] =' Creating configuration file ...';
|
||||||
$string['database'] = 'Database';
|
$string['database'] = 'Database';
|
||||||
$string['databasecreationsettings'] = 'Now you need to configure the database settings where most Moodle data
|
$string['databasecreationsettings'] = 'Now you need to configure the database settings where most Moodle data
|
||||||
will be stored. This database will be created automatically by the installer
|
will be stored. This database will be created automatically by the installer
|
||||||
|
@ -77,7 +77,7 @@ $string['databasesettings'] = 'Now you need to configure the database where most
|
||||||
<b>User:</b> your database username<br />
|
<b>User:</b> your database username<br />
|
||||||
<b>Password:</b> your database password<br />
|
<b>Password:</b> your database password<br />
|
||||||
<b>Tables Prefix:</b> optional prefix to use for all table names';
|
<b>Tables Prefix:</b> optional prefix to use for all table names';
|
||||||
$string['databasesettingsformoodle']='\n\nDatabase settings for Moodle\n\n';
|
$string['databasesettingsformoodle']='Database settings for Moodle';
|
||||||
$string['databasesettingshead'] = 'Now you need to configure the database where most Moodle data
|
$string['databasesettingshead'] = 'Now you need to configure the database where most Moodle data
|
||||||
will be stored. This database must already have been created
|
will be stored. This database must already have been created
|
||||||
and a username and password created to access it.';
|
and a username and password created to access it.';
|
||||||
|
@ -186,13 +186,13 @@ $string['download'] = 'Download';
|
||||||
$string['downloadlanguagebutton'] = 'Download the "$a" language pack';
|
$string['downloadlanguagebutton'] = 'Download the "$a" language pack';
|
||||||
$string['downloadlanguagehead'] = 'Download language pack';
|
$string['downloadlanguagehead'] = 'Download language pack';
|
||||||
$string['downloadlanguagenotneeded'] = 'You may continue the installation process using the default language pack, \"$a\".';
|
$string['downloadlanguagenotneeded'] = 'You may continue the installation process using the default language pack, \"$a\".';
|
||||||
$string['downloadlanguagepack']='\n\nDo you want to download language pack now(yes/no) :';
|
$string['downloadlanguagepack']='Do you want to download language pack now(yes/no) :';
|
||||||
$string['downloadlanguagesub'] = 'You now have the option of downloading a language pack and continuing the installation process in this language.<br /><br />If you are unable to download the language pack, the installation process will continue in English. (Once the installation process is complete, you will have the opportunity to download and install additional language packs.)';
|
$string['downloadlanguagesub'] = 'You now have the option of downloading a language pack and continuing the installation process in this language.<br /><br />If you are unable to download the language pack, the installation process will continue in English. (Once the installation process is complete, you will have the opportunity to download and install additional language packs.)';
|
||||||
$string['downloadsuccess'] = 'Language Pack Downloaded Successfuly';
|
$string['downloadsuccess'] = 'Language Pack Downloaded Successfuly';
|
||||||
$string['doyouagree'] = 'Do you agree ? (yes/no):';
|
$string['doyouagree'] = 'Do you agree ? (yes/no):';
|
||||||
$string['environmenthead'] = 'Checking your environment ...';
|
$string['environmenthead'] = 'Checking your environment ...';
|
||||||
$string['environmentsub'] = 'We are checking if the various components of your system meet the system requirements';
|
$string['environmentsub'] = 'We are checking if the various components of your system meet the system requirements';
|
||||||
$string['errorsinenvironment'] ='Errors in the environment !\n';
|
$string['errorsinenvironment'] ='Errors in the environment!';
|
||||||
$string['fail'] = 'Fail';
|
$string['fail'] = 'Fail';
|
||||||
$string['fileuploads'] = 'File Uploads';
|
$string['fileuploads'] = 'File Uploads';
|
||||||
$string['fileuploadserror'] = 'This should be on';
|
$string['fileuploadserror'] = 'This should be on';
|
||||||
|
@ -231,24 +231,24 @@ $string['inputdatadirectory']='Data Directory :';
|
||||||
$string['inputwebadress']='Web address :';
|
$string['inputwebadress']='Web address :';
|
||||||
$string['inputwebdirectory']='Moodle Directory :';
|
$string['inputwebdirectory']='Moodle Directory :';
|
||||||
$string['installation'] = 'Installation';
|
$string['installation'] = 'Installation';
|
||||||
$string['installationiscomplete'] = 'Installtion is completed !\n';
|
$string['installationiscomplete'] = 'Installation is completed!';
|
||||||
$string['invalidargumenthelp']='
|
$string['invalidargumenthelp']='
|
||||||
Error: Invalid argument(s)
|
Error: Invalid argument(s)
|
||||||
Usage: \$php cliupgrade.php OPTIONS
|
Usage: \$php cliupgrade.php OPTIONS
|
||||||
Use --help option to get more help\n';
|
Use --help option to get more help';
|
||||||
$string['invalidemail'] = 'Invalid Email';
|
$string['invalidemail'] = 'Invalid Email';
|
||||||
$string['invalidhost'] = 'Invalid Host ';
|
$string['invalidhost'] = 'Invalid Host ';
|
||||||
$string['invalidint']='Error: value is not an integer \n';
|
$string['invalidint']='Error: value is not an integer';
|
||||||
$string['invalidintrange'] = 'Error: Value is outside valid range\n';
|
$string['invalidintrange'] = 'Error: Value is outside valid range';
|
||||||
$string['invalidpath'] = 'Invalid Path ';
|
$string['invalidpath'] = 'Invalid Path ';
|
||||||
$string['invalidsetelement']= 'Error: Value given is not in the given options \n';
|
$string['invalidsetelement']= 'Error: Value given is not in the given options';
|
||||||
$string['invalidtextvalue'] = 'Invalid Text Value';
|
$string['invalidtextvalue'] = 'Invalid Text Value';
|
||||||
$string['invalidurl'] = 'Invalid URL ';
|
$string['invalidurl'] = 'Invalid URL ';
|
||||||
$string['invalidvalueforlanguage']='Invalid value for --lang option. Type --help for more help\n';
|
$string['invalidvalueforlanguage']='Invalid value for --lang option. Type --help for more help';
|
||||||
$string['invalidyesno'] = 'Error: value is not a valid yes/no argument \n';
|
$string['invalidyesno'] = 'Error: value is not a valid yes/no argument';
|
||||||
$string['langdownloaderror'] = 'Unfortunately the language \"$a\" was not installed. The installation process will continue in English.';
|
$string['langdownloaderror'] = 'Unfortunately the language \"$a\" was not installed. The installation process will continue in English.';
|
||||||
$string['langdownloadok'] = 'The language \"$a\" was installed successfully. The installation process will continue in this language.';
|
$string['langdownloadok'] = 'The language \"$a\" was installed successfully. The installation process will continue in this language.';
|
||||||
$string['locationanddirectories']= '\n\nLocation and directories \n\n';
|
$string['locationanddirectories']= 'Location and directories';
|
||||||
$string['magicquotesruntime'] = 'Magic Quotes Run Time';
|
$string['magicquotesruntime'] = 'Magic Quotes Run Time';
|
||||||
$string['magicquotesruntimeerror'] = 'This should be off';
|
$string['magicquotesruntimeerror'] = 'This should be off';
|
||||||
$string['magicquotesruntimehelp'] = '<p>Magic quotes runtime should be turned off for Moodle to function properly.</p>
|
$string['magicquotesruntimehelp'] = '<p>Magic quotes runtime should be turned off for Moodle to function properly.</p>
|
||||||
|
@ -310,7 +310,7 @@ $string['safemodehelp'] = '<p>Moodle may have a variety of problems with safe mo
|
||||||
to just find a new web hosting company for your Moodle site.</p>
|
to just find a new web hosting company for your Moodle site.</p>
|
||||||
|
|
||||||
<p>You can try continuing the install if you like, but expect a few problems later on.</p>';
|
<p>You can try continuing the install if you like, but expect a few problems later on.</p>';
|
||||||
$string['selectlanguage']='\n\nSelecting a language for installation\n';
|
$string['selectlanguage']='Selecting a language for installation';
|
||||||
$string['sessionautostart'] = 'Session Auto Start';
|
$string['sessionautostart'] = 'Session Auto Start';
|
||||||
$string['sessionautostarterror'] = 'This should be off';
|
$string['sessionautostarterror'] = 'This should be off';
|
||||||
$string['sessionautostarthelp'] = '<p>Moodle requires session support and will not function without it.</p>
|
$string['sessionautostarthelp'] = '<p>Moodle requires session support and will not function without it.</p>
|
||||||
|
@ -323,12 +323,11 @@ $string['siteshortname'] = 'Site short name :';
|
||||||
$string['sitesummary'] ='Site summary :';
|
$string['sitesummary'] ='Site summary :';
|
||||||
$string['skipdbencodingtest'] = 'Skip DB Encoding Test';
|
$string['skipdbencodingtest'] = 'Skip DB Encoding Test';
|
||||||
$string['tableprefix']='Table prefix :';
|
$string['tableprefix']='Table prefix :';
|
||||||
$string['unsafedirname'] = 'Error: Unsafe characters in directory name. valid characters are a-zA-Z0-9_-\n';
|
|
||||||
$string['upgradingactivitymodule']= 'Upgrading Activity Module';
|
$string['upgradingactivitymodule']= 'Upgrading Activity Module';
|
||||||
$string['upgradingbackupdb'] = 'Upgrading Backup Database';
|
$string['upgradingbackupdb'] = 'Upgrading Backup Database';
|
||||||
$string['upgradingblocksdb'] = 'Upgrading Blocks Database';
|
$string['upgradingblocksdb'] = 'Upgrading Blocks Database';
|
||||||
$string['upgradingblocksplugin'] = 'Upgrading Blocks Plugin';
|
$string['upgradingblocksplugin'] = 'Upgrading Blocks Plugin';
|
||||||
$string['upgradingcompleted'] = 'Upgrading completed...\n';
|
$string['upgradingcompleted'] = 'Upgrading completed...';
|
||||||
$string['upgradingcourseformatplugin'] = 'Upgrading Course Format Pluggin';
|
$string['upgradingcourseformatplugin'] = 'Upgrading Course Format Pluggin';
|
||||||
$string['upgradingenrolplugin'] = 'Upgrading Enrol Plugin';
|
$string['upgradingenrolplugin'] = 'Upgrading Enrol Plugin';
|
||||||
$string['upgradinggradeexportplugin'] = 'Upgrading Grade Export Plugin';
|
$string['upgradinggradeexportplugin'] = 'Upgrading Grade Export Plugin';
|
||||||
|
@ -340,7 +339,8 @@ $string['upgradingqtypeplugin'] = 'Upgrading Question/type Plugin';
|
||||||
$string['upgradingrpcfunctions'] = 'Upgrading RPC Functions';
|
$string['upgradingrpcfunctions'] = 'Upgrading RPC Functions';
|
||||||
$string['usagehelp']='
|
$string['usagehelp']='
|
||||||
Synopsis:
|
Synopsis:
|
||||||
\$php cliupgrade.php OPTIONS\n
|
\$php cliupgrade.php OPTIONS
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
--lang Valid installed language for installation. Default is English(en)
|
--lang Valid installed language for installation. Default is English(en)
|
||||||
--webaddr Web address for the Moodle site
|
--webaddr Web address for the Moodle site
|
||||||
|
@ -364,9 +364,10 @@ OPTIONS
|
||||||
--adminusername Username for the admin. Default is admin
|
--adminusername Username for the admin. Default is admin
|
||||||
--adminpassword Password for the admin. Default is admin
|
--adminpassword Password for the admin. Default is admin
|
||||||
--adminemail Email address of admin. Default is root@localhost
|
--adminemail Email address of admin. Default is root@localhost
|
||||||
--help print out this help\n
|
--help print out this help
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
\$php cliupgrade.php --lang=en --webaddr=http://www.example.com --moodledir=/var/www/html/moodle --datadir=/var/moodledata --dbtype=mysql --dbhost=localhost --dbname=moodle --dbuser=root --prefix=mdl --agreelicense=yes --confirmrelease=yes --sitefullname=\"Example Moodle Site\" --siteshortname=moodle --sitesummary=siteforme --adminfirstname=Admin --adminlastname=User --adminusername=admin --adminpassword=admin --adminemail=admin@example.com --verbose=1 --interactivelevel=2 \n';
|
\$php cliupgrade.php --lang=en --webaddr=http://www.example.com --moodledir=/var/www/html/moodle --datadir=/var/moodledata --dbtype=mysql --dbhost=localhost --dbname=moodle --dbuser=root --prefix=mdl --agreelicense=yes --confirmrelease=yes --sitefullname=\"Example Moodle Site\" --siteshortname=moodle --sitesummary=siteforme --adminfirstname=Admin --adminlastname=User --adminusername=admin --adminpassword=admin --adminemail=admin@example.com --verbose=1 --interactivelevel=2';
|
||||||
$string['versionerror'] = 'User aborted due to version Error ';
|
$string['versionerror'] = 'User aborted due to version Error ';
|
||||||
$string['welcomep10'] = '$a->installername ($a->installerversion)';
|
$string['welcomep10'] = '$a->installername ($a->installerversion)';
|
||||||
$string['welcomep20'] = 'You are seeing this page because you have successfully installed and
|
$string['welcomep20'] = 'You are seeing this page because you have successfully installed and
|
||||||
|
@ -382,10 +383,10 @@ $string['welcomep60'] = 'The following pages will lead you through some easy to
|
||||||
configure and set up <strong>Moodle</strong> on your computer. You may accept the default
|
configure and set up <strong>Moodle</strong> on your computer. You may accept the default
|
||||||
settings or, optionally, amend them to suit your own needs.';
|
settings or, optionally, amend them to suit your own needs.';
|
||||||
$string['welcomep70'] = 'Click the \"Next\" button below to continue with the set up of <strong>Moodle</strong>.';
|
$string['welcomep70'] = 'Click the \"Next\" button below to continue with the set up of <strong>Moodle</strong>.';
|
||||||
$string['welcometext']='\n\n---Welcome to moodle commandline installer---\n\n';
|
$string['welcometext']='---Welcome to moodle commandline installer---';
|
||||||
$string['writetoconfigfilefaild'] = 'Error: Write to config file failed ';
|
$string['writetoconfigfilefaild'] = 'Error: Write to config file failed ';
|
||||||
$string['wwwroot'] = 'Web address';
|
$string['wwwroot'] = 'Web address';
|
||||||
$string['wwwrooterror'] = 'The \'Web Address\' does not appear to be valid - this Moodle installation doesn\'t appear to be there. The value below has been reset.';
|
$string['wwwrooterror'] = 'The \'Web Address\' does not appear to be valid - this Moodle installation doesn\'t appear to be there. The value below has been reset.';
|
||||||
$string['yourchoice']='\nYour choice :';
|
$string['yourchoice']='Your choice :';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -240,6 +240,7 @@ function validate_option_values($options){
|
||||||
if (isset($values['lang'])) {
|
if (isset($values['lang'])) {
|
||||||
if (!valid_language($INSTALL['lang'])) {
|
if (!valid_language($INSTALL['lang'])) {
|
||||||
console_write(STDERR,'invalidvalueforlanguage');
|
console_write(STDERR,'invalidvalueforlanguage');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($values['webdir'])) {
|
if (isset($values['webdir'])) {
|
||||||
|
@ -370,7 +371,7 @@ function console_write($stream,$identifier,$module='install',$use_string_lib=tru
|
||||||
fwrite($stream,$identifier);
|
fwrite($stream,$identifier);
|
||||||
}
|
}
|
||||||
if ($stream == STDERR) {
|
if ($stream == STDERR) {
|
||||||
fwrite($stream,get_string('aborting',$module));
|
fwrite($stream, "\n\n" . get_string('aborting',$module) . "\n\n");
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -397,6 +398,7 @@ function read_int() {
|
||||||
return $input;
|
return $input;
|
||||||
} else {
|
} else {
|
||||||
console_write(STDERR,'invalidint');
|
console_write(STDERR,'invalidint');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//=========================================================================//
|
//=========================================================================//
|
||||||
|
@ -413,6 +415,7 @@ function read_int_range($start,$end) {
|
||||||
return $input;
|
return $input;
|
||||||
} else {
|
} else {
|
||||||
console_write(STDERR,'invalidintrange');
|
console_write(STDERR,'invalidintrange');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -432,6 +435,7 @@ function read_yes_no() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console_write(STDERR,'invalidyesno');
|
console_write(STDERR,'invalidyesno');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -459,6 +463,7 @@ function read_element($set=array()) {
|
||||||
return $input;
|
return $input;
|
||||||
} else {
|
} else {
|
||||||
console_write(STDERR,'invalidsetelement');
|
console_write(STDERR,'invalidsetelement');
|
||||||
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//=========================================================================//
|
//=========================================================================//
|
||||||
|
@ -576,18 +581,22 @@ function inst_check_php_version() {
|
||||||
* @param array $env, of type object
|
* @param array $env, of type object
|
||||||
*/
|
*/
|
||||||
function print_environment_status($env = array()) {
|
function print_environment_status($env = array()) {
|
||||||
console_write(STDOUT,"Status\t\tInfo\t\tPart\n\r",'',false);
|
console_write(STDOUT, get_string('name') . "\t\t\t" . get_string('info') . "\t" . get_string('status') . "\n\r", '', false);
|
||||||
|
//console_write(STDOUT,"Status\t\tInfo\t\tPart\n\r",'',false);
|
||||||
foreach ( $env as $object) {
|
foreach ( $env as $object) {
|
||||||
|
console_write(STDOUT,$object->part,'',false);
|
||||||
|
console_write(STDOUT,"\t\t",'',false);
|
||||||
|
if (!empty($object->info)) {
|
||||||
|
console_write(STDOUT, $object->info, '', false);
|
||||||
|
} else {
|
||||||
|
console_write(STDOUT, "\t", '', false);
|
||||||
|
}
|
||||||
|
console_write(STDOUT, "\t\t", '', false);
|
||||||
if ($object->status == 1 ) {
|
if ($object->status == 1 ) {
|
||||||
console_write(STDOUT,'ok','',false);
|
console_write(STDOUT,'ok','',false);
|
||||||
} else {
|
} else {
|
||||||
console_write(STDOUT,'fail','',false);
|
console_write(STDOUT,'fail','',false);
|
||||||
}
|
}
|
||||||
console_write(STDOUT,"\t\t",'',false);
|
|
||||||
console_write(STDOUT,$object->info,'',false);
|
|
||||||
console_write(STDOUT,"\t\t",'',false);
|
|
||||||
console_write(STDOUT,$object->part,'',false);
|
|
||||||
console_write(STDOUT,"\n\r",'',false);
|
console_write(STDOUT,"\n\r",'',false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -627,6 +636,6 @@ function print_environment_status_detailed($env = array()) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function print_newline() {
|
function print_newline() {
|
||||||
console_write(STDOUT,'newline','install');
|
console_write(STDOUT, "\n", '', false);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -2354,7 +2354,7 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
|
||||||
if ($return) {
|
if ($return) {
|
||||||
return $output;
|
return $output;
|
||||||
} else {
|
} else {
|
||||||
console_write(STDOUT,$output,'',false);
|
console_write(STDOUT,$output . "\n",'',false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5762,7 +5762,7 @@ function error ($message, $link='') {
|
||||||
global $CFG, $SESSION, $THEME;
|
global $CFG, $SESSION, $THEME;
|
||||||
$message = clean_text($message); // In case nasties are in here
|
$message = clean_text($message); // In case nasties are in here
|
||||||
|
|
||||||
if (defined('CLI_UPGRADE') || CLI_UPGRADE) {
|
if (defined('CLI_UPGRADE') && CLI_UPGRADE) {
|
||||||
console_write(STDERR,$message,'',false);
|
console_write(STDERR,$message,'',false);
|
||||||
die ;
|
die ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue