@@ -22,7 +22,7 @@ function install_main() {
2222 // The user agent header is used to pass a database prefix in the request when
2323 // running tests. However, for security reasons, it is imperative that no
2424 // installation be permitted using such a prefix.
25- if (isset ($ _SERVER ['HTTP_USER_AGENT ' ]) && strpos ($ _SERVER ['HTTP_USER_AGENT ' ], "simpletest " ) !== FALSE ) {
25+ if (isset ($ _SERVER ['HTTP_USER_AGENT ' ]) && strpos ($ _SERVER ['HTTP_USER_AGENT ' ], "simpletest " ) !== false ) {
2626 header ($ _SERVER ['SERVER_PROTOCOL ' ] . ' 403 Forbidden ' );
2727 exit ;
2828 }
@@ -43,7 +43,7 @@ function install_main() {
4343 include_once './includes/module.inc ' ;
4444 $ module_list ['system ' ]['filename ' ] = 'modules/system/system.module ' ;
4545 $ module_list ['filter ' ]['filename ' ] = 'modules/filter/filter.module ' ;
46- module_list (TRUE , FALSE , FALSE , $ module_list );
46+ module_list (true , false , false , $ module_list );
4747 drupal_load ('module ' , 'system ' );
4848 drupal_load ('module ' , 'filter ' );
4949
@@ -85,7 +85,7 @@ function install_main() {
8585 require_once './includes/cache-install.inc ' ;
8686 $ conf ['cache_inc ' ] = './includes/cache-install.inc ' ;
8787
88- $ task = NULL ;
88+ $ task = null ;
8989 }
9090
9191 // No profile was passed in GET, ask the user.
@@ -105,7 +105,7 @@ function install_main() {
105105 if (!empty ($ _GET ['locale ' ])) {
106106 $ install_locale = preg_replace ('/[^a-zA-Z_0-9\-]/ ' , '' , $ _GET ['locale ' ]);
107107 }
108- elseif (($ install_locale = install_select_locale ($ profile )) !== FALSE ) {
108+ elseif (($ install_locale = install_select_locale ($ profile )) !== false ) {
109109 install_goto ("install.php?profile= $ profile&locale= $ install_locale " );
110110 }
111111
@@ -191,19 +191,19 @@ function install_verify_settings() {
191191
192192 $ url = parse_url (is_array ($ db_url ) ? $ db_url ['default ' ] : $ db_url );
193193 $ db_user = urldecode ($ url ['user ' ]);
194- $ db_pass = isset ($ url ['pass ' ]) ? urldecode ($ url ['pass ' ]) : NULL ;
194+ $ db_pass = isset ($ url ['pass ' ]) ? urldecode ($ url ['pass ' ]) : null ;
195195 $ db_host = urldecode ($ url ['host ' ]);
196196 $ db_port = isset ($ url ['port ' ]) ? urldecode ($ url ['port ' ]) : '' ;
197197 $ db_path = ltrim (urldecode ($ url ['path ' ]), '/ ' );
198- $ settings_file = './ ' . conf_path (FALSE , TRUE ) .'/settings.php ' ;
198+ $ settings_file = './ ' . conf_path (false , true ) .'/settings.php ' ;
199199
200200 $ form_state = array ();
201201 _install_settings_form_validate ($ db_prefix , $ db_type , $ db_user , $ db_pass , $ db_host , $ db_port , $ db_path , $ settings_file , $ form_state );
202202 if (!form_get_errors ()) {
203- return TRUE ;
203+ return true ;
204204 }
205205 }
206- return FALSE ;
206+ return false ;
207207}
208208
209209/**
@@ -218,7 +218,7 @@ function install_change_settings($profile = 'default', $install_locale = '') {
218218 $ db_host = isset ($ url ['host ' ]) ? urldecode ($ url ['host ' ]) : '' ;
219219 $ db_port = isset ($ url ['port ' ]) ? urldecode ($ url ['port ' ]) : '' ;
220220 $ db_path = ltrim (urldecode ($ url ['path ' ]), '/ ' );
221- $ conf_path = './ ' . conf_path (FALSE , TRUE );
221+ $ conf_path = './ ' . conf_path (false , true );
222222 $ settings_file = $ conf_path .'/settings.php ' ;
223223
224224 // We always need this because we want to run form_get_errors.
@@ -262,7 +262,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
262262 $ form ['basic_options ' ]['db_type ' ] = array (
263263 '#type ' => 'radios ' ,
264264 '#title ' => st ('Database type ' ),
265- '#required ' => TRUE ,
265+ '#required ' => true ,
266266 '#options ' => $ db_types ,
267267 '#default_value ' => ($ db_type ? $ db_type : current ($ db_types )),
268268 '#description ' => st ('The type of database your @drupal data will be stored in. ' , array ('@drupal ' => drupal_install_profile_name ())),
@@ -286,7 +286,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
286286 '#title ' => st ('Database name ' ),
287287 '#default_value ' => $ db_path ,
288288 '#size ' => 45 ,
289- '#required ' => TRUE ,
289+ '#required ' => true ,
290290 '#description ' => $ db_path_description
291291 );
292292
@@ -296,7 +296,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
296296 '#title ' => st ('Database username ' ),
297297 '#default_value ' => $ db_user ,
298298 '#size ' => 45 ,
299- '#required ' => TRUE ,
299+ '#required ' => true ,
300300 );
301301
302302 // Database username
@@ -310,8 +310,8 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
310310 $ form ['advanced_options ' ] = array (
311311 '#type ' => 'fieldset ' ,
312312 '#title ' => st ('Advanced options ' ),
313- '#collapsible ' => TRUE ,
314- '#collapsed ' => TRUE ,
313+ '#collapsible ' => true ,
314+ '#collapsed ' => true ,
315315 '#description ' => st ("These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider. " )
316316 );
317317
@@ -323,7 +323,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
323323 '#size ' => 45 ,
324324 // Hostnames can be 255 characters long.
325325 '#maxlength ' => 255 ,
326- '#required ' => TRUE ,
326+ '#required ' => true ,
327327 '#description ' => st ('If your database is located on a different server, change this. ' ),
328328 );
329329
@@ -357,7 +357,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
357357 $ form ['settings_file ' ] = array ('#type ' => 'value ' , '#value ' => $ settings_file );
358358 $ form ['_db_url ' ] = array ('#type ' => 'value ' );
359359 $ form ['#action ' ] = "install.php?profile= $ profile " . ($ install_locale ? "&locale= $ install_locale " : '' );
360- $ form ['#redirect ' ] = FALSE ;
360+ $ form ['#redirect ' ] = false ;
361361 }
362362 return $ form ;
363363}
@@ -373,7 +373,7 @@ function install_settings_form_validate($form, &$form_state) {
373373/**
374374 * Helper function for install_settings_validate.
375375 */
376- function _install_settings_form_validate ($ db_prefix , $ db_type , $ db_user , $ db_pass , $ db_host , $ db_port , $ db_path , $ settings_file , &$ form_state , $ form = NULL ) {
376+ function _install_settings_form_validate ($ db_prefix , $ db_type , $ db_user , $ db_pass , $ db_host , $ db_port , $ db_path , $ settings_file , &$ form_state , $ form = null ) {
377377 global $ db_url ;
378378
379379 // Verify the table prefix
@@ -423,11 +423,11 @@ function install_settings_form_submit($form, &$form_state) {
423423 // Update global settings array and save
424424 $ settings ['db_url ' ] = array (
425425 'value ' => $ form_state ['values ' ]['_db_url ' ],
426- 'required ' => TRUE ,
426+ 'required ' => true ,
427427 );
428428 $ settings ['db_prefix ' ] = array (
429429 'value ' => $ form_state ['values ' ]['db_prefix ' ],
430- 'required ' => TRUE ,
430+ 'required ' => true ,
431431 );
432432 drupal_rewrite_settings ($ settings );
433433
@@ -439,7 +439,7 @@ function install_settings_form_submit($form, &$form_state) {
439439 * Find all .profile files.
440440 */
441441function install_find_profiles () {
442- return file_scan_directory ('./profiles ' , '\.profile$ ' , array ('. ' , '.. ' , 'CVS ' ), 0 , TRUE , 'name ' , 0 );
442+ return file_scan_directory ('./profiles ' , '\.profile$ ' , array ('. ' , '.. ' , 'CVS ' ), 0 , true , 'name ' , 0 );
443443}
444444
445445/**
@@ -524,7 +524,7 @@ function install_select_profile_form(&$form_state, $profile_files) {
524524 * Find all .po files for the current profile.
525525 */
526526function install_find_locales ($ profilename ) {
527- $ locales = file_scan_directory ('./profiles/ ' . $ profilename .'/translations ' , '\.po$ ' , array ('. ' , '.. ' , 'CVS ' ), 0 , FALSE );
527+ $ locales = file_scan_directory ('./profiles/ ' . $ profilename .'/translations ' , '\.po$ ' , array ('. ' , '.. ' , 'CVS ' ), 0 , false );
528528 array_unshift ($ locales , (object ) array ('name ' => 'en ' ));
529529 return $ locales ;
530530}
@@ -567,7 +567,7 @@ function install_select_locale($profilename) {
567567 }
568568 // One language, but not the default profile, assume
569569 // the user knows what he is doing.
570- return FALSE ;
570+ return false ;
571571 }
572572 else {
573573 // Allow profile to pre-select the language, skipping the selection.
@@ -614,7 +614,7 @@ function install_select_locale_form(&$form_state, $locales) {
614614 $ form ['locale ' ][$ locale ->name ] = array (
615615 '#type ' => 'radio ' ,
616616 '#return_value ' => $ locale ->name ,
617- '#default_value ' => ($ locale ->name == 'en ' ? TRUE : FALSE ),
617+ '#default_value ' => ($ locale ->name == 'en ' ? true : false ),
618618 '#title ' => $ name . ($ locale ->name == 'en ' ? ' ' . st ('(built-in) ' ) : '' ),
619619 '#parents ' => array ('locale ' )
620620 );
@@ -706,7 +706,7 @@ function install_tasks($profile, $task) {
706706 if (!empty ($ install_locale ) && ($ install_locale != 'en ' )) {
707707 include_once 'includes/locale.inc ' ;
708708 // Enable installation language as default site language.
709- locale_add_language ($ install_locale , NULL , NULL , NULL , NULL , NULL , 1 , TRUE );
709+ locale_add_language ($ install_locale , null , null , null , null , null , 1 , true );
710710 // Collect files to import for this language.
711711 $ batch = locale_batch_by_language ($ install_locale , '_install_locale_initial_batch_finished ' );
712712 if (!empty ($ batch )) {
@@ -729,15 +729,15 @@ function install_tasks($profile, $task) {
729729 }
730730
731731 if ($ task == 'configure ' ) {
732- if (variable_get ('site_name ' , FALSE ) || variable_get ('site_mail ' , FALSE )) {
732+ if (variable_get ('site_name ' , false ) || variable_get ('site_mail ' , false )) {
733733 // Site already configured: This should never happen, means re-running
734734 // the installer, possibly by an attacker after the 'install_task' variable
735735 // got accidentally blown somewhere. Stop it now.
736736 install_already_done_error ();
737737 }
738738 $ form = drupal_get_form ('install_configure_form ' , $ url );
739739
740- if (!variable_get ('site_name ' , FALSE ) && !variable_get ('site_mail ' , FALSE )) {
740+ if (!variable_get ('site_name ' , false ) && !variable_get ('site_mail ' , false )) {
741741 // Not submitted yet: Prepare to display the form.
742742 $ output = $ form ;
743743 drupal_set_title (st ('Configure site ' ));
@@ -911,17 +911,17 @@ function install_check_requirements($profile, $verify) {
911911
912912 // If Drupal is not set up already, we need to create a settings file.
913913 if (!$ verify ) {
914- $ writable = FALSE ;
915- $ conf_path = './ ' . conf_path (FALSE , TRUE );
914+ $ writable = false ;
915+ $ conf_path = './ ' . conf_path (false , true );
916916 $ settings_file = $ conf_path .'/settings.php ' ;
917917 $ file = $ conf_path ;
918- $ exists = FALSE ;
918+ $ exists = false ;
919919 // Verify that the directory exists.
920920 if (drupal_verify_install_file ($ conf_path , FILE_EXIST , 'dir ' )) {
921921 // Check to make sure a settings.php already exists.
922922 $ file = $ settings_file ;
923923 if (drupal_verify_install_file ($ settings_file , FILE_EXIST )) {
924- $ exists = TRUE ;
924+ $ exists = true ;
925925 // If it does, make sure it is writable.
926926 $ writable = drupal_verify_install_file ($ settings_file , FILE_READABLE |FILE_WRITABLE );
927927 }
@@ -973,7 +973,7 @@ function install_check_requirements($profile, $verify) {
973973/**
974974 * Add the installation task list to the current page.
975975 */
976- function install_task_list ($ active = NULL ) {
976+ function install_task_list ($ active = null ) {
977977 // Default list of tasks.
978978 $ tasks = array (
979979 'profile-select ' => st ('Choose profile ' ),
@@ -1024,7 +1024,7 @@ function install_task_list($active = NULL) {
10241024 // Let the theming function know that 'finished' and 'done'
10251025 // include everything, so every step is completed.
10261026 if (in_array ($ active , array ('finished ' , 'done ' ))) {
1027- $ active = NULL ;
1027+ $ active = null ;
10281028 }
10291029 drupal_set_content ('left ' , theme_task_list ($ tasks , $ active ));
10301030}
@@ -1041,28 +1041,28 @@ function install_configure_form(&$form_state, $url) {
10411041 $ form ['site_information ' ] = array (
10421042 '#type ' => 'fieldset ' ,
10431043 '#title ' => st ('Site information ' ),
1044- '#collapsible ' => FALSE ,
1044+ '#collapsible ' => false ,
10451045 );
10461046 $ form ['site_information ' ]['site_name ' ] = array (
10471047 '#type ' => 'textfield ' ,
10481048 '#title ' => st ('Site name ' ),
1049- '#required ' => TRUE ,
1049+ '#required ' => true ,
10501050 '#weight ' => -20 ,
10511051 );
10521052 $ form ['site_information ' ]['site_mail ' ] = array (
10531053 '#type ' => 'textfield ' ,
10541054 '#title ' => st ('Site e-mail address ' ),
10551055 '#default_value ' => ini_get ('sendmail_from ' ),
10561056 '#description ' => st ("The <em>From</em> address in automated e-mails sent during registration and new password requests, and other notifications. (Use an address ending in your site's domain to help prevent this e-mail being flagged as spam.) " ),
1057- '#required ' => TRUE ,
1057+ '#required ' => true ,
10581058 '#weight ' => -15 ,
10591059 );
10601060 $ form ['admin_account ' ] = array (
10611061 '#type ' => 'fieldset ' ,
10621062 '#title ' => st ('Administrator account ' ),
1063- '#collapsible ' => FALSE ,
1063+ '#collapsible ' => false ,
10641064 );
1065- $ form ['admin_account ' ]['account ' ]['#tree ' ] = TRUE ;
1065+ $ form ['admin_account ' ]['account ' ]['#tree ' ] = true ;
10661066 $ form ['admin_account ' ]['markup ' ] = array (
10671067 '#value ' => '<p class="description"> ' . st ('The administrator account has complete access to the site; it will automatically be granted all permissions and can perform any administrative activity. This will be the only account that can perform certain activities, so keep its credentials safe. ' ) .'</p> ' ,
10681068 '#weight ' => -10 ,
@@ -1072,28 +1072,28 @@ function install_configure_form(&$form_state, $url) {
10721072 '#title ' => st ('Username ' ),
10731073 '#maxlength ' => USERNAME_MAX_LENGTH ,
10741074 '#description ' => st ('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores. ' ),
1075- '#required ' => TRUE ,
1075+ '#required ' => true ,
10761076 '#weight ' => -10 ,
10771077 );
10781078
10791079 $ form ['admin_account ' ]['account ' ]['mail ' ] = array ('#type ' => 'textfield ' ,
10801080 '#title ' => st ('E-mail address ' ),
10811081 '#maxlength ' => EMAIL_MAX_LENGTH ,
10821082 '#description ' => st ('All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail. ' ),
1083- '#required ' => TRUE ,
1083+ '#required ' => true ,
10841084 '#weight ' => -5 ,
10851085 );
10861086 $ form ['admin_account ' ]['account ' ]['pass ' ] = array (
10871087 '#type ' => 'password_confirm ' ,
1088- '#required ' => TRUE ,
1088+ '#required ' => true ,
10891089 '#size ' => 25 ,
10901090 '#weight ' => 0 ,
10911091 );
10921092
10931093 $ form ['server_settings ' ] = array (
10941094 '#type ' => 'fieldset ' ,
10951095 '#title ' => st ('Server settings ' ),
1096- '#collapsible ' => FALSE ,
1096+ '#collapsible ' => false ,
10971097 );
10981098 $ form ['server_settings ' ]['date_default_timezone ' ] = array (
10991099 '#type ' => 'select ' ,
@@ -1110,7 +1110,7 @@ function install_configure_form(&$form_state, $url) {
11101110 '#default_value ' => 0 ,
11111111 '#options ' => array (0 => st ('Disabled ' ), 1 => st ('Enabled ' )),
11121112 '#description ' => st ('This option makes Drupal emit "clean" URLs (i.e. without <code>?q=</code> in the URL). ' ),
1113- '#disabled ' => TRUE ,
1113+ '#disabled ' => true ,
11141114 '#prefix ' => '<div id="clean-url" class="install"> ' ,
11151115 '#suffix ' => '</div> ' ,
11161116 '#weight ' => 10 ,
@@ -1131,7 +1131,7 @@ function install_configure_form(&$form_state, $url) {
11311131 '#weight ' => 15 ,
11321132 );
11331133 $ form ['#action ' ] = $ url ;
1134- $ form ['#redirect ' ] = FALSE ;
1134+ $ form ['#redirect ' ] = false ;
11351135
11361136 // Allow the profile to alter this form. $form_state isn't available
11371137 // here, but to conform to the hook_form_alter() signature, we pass
@@ -1174,7 +1174,7 @@ function install_configure_form_submit($form, &$form_state) {
11741174 }
11751175
11761176 // Turn this off temporarily so that we can pass a password through.
1177- variable_set ('user_email_verification ' , FALSE );
1177+ variable_set ('user_email_verification ' , false );
11781178 $ form_state ['old_values ' ] = $ form_state ['values ' ];
11791179 $ form_state ['values ' ] = $ form_state ['values ' ]['account ' ];
11801180
@@ -1186,7 +1186,7 @@ function install_configure_form_submit($form, &$form_state) {
11861186 user_authenticate ($ form_state ['values ' ]);
11871187 $ form_state ['values ' ] = $ form_state ['old_values ' ];
11881188 unset($ form_state ['old_values ' ]);
1189- variable_set ('user_email_verification ' , TRUE );
1189+ variable_set ('user_email_verification ' , true );
11901190
11911191 if (isset ($ form_state ['values ' ]['clean_url ' ])) {
11921192 variable_set ('clean_url ' , $ form_state ['values ' ]['clean_url ' ]);
0 commit comments