Changeset 25018 for trunk/install.php
- Timestamp:
- Oct 19, 2013, 7:43:04 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/install.php
r25005 r25018 253 253 include(PHPWG_ROOT_PATH . 'admin/include/functions_upgrade.php'); 254 254 255 if ( isset( $_POST['install']))255 if (isset($_POST['install'])) 256 256 { 257 257 install_db_connect($infos, $errors); 258 258 pwg_db_check_charset(); 259 259 260 $webmaster = trim(preg_replace( '/\s{2,}/', ' ', $admin_name )); 261 if ( empty($webmaster)) 262 array_push( $errors, l10n('enter a login for webmaster') ); 263 else if ( preg_match( '/[\'"]/', $webmaster ) ) 264 array_push( $errors, l10n('webmaster login can\'t contain characters \' or "') ); 265 if ( $admin_pass1 != $admin_pass2 || empty($admin_pass1) ) 266 array_push( $errors, l10n('please enter your password again') ); 267 if ( empty($admin_mail)) 268 array_push( $errors, l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)') ); 260 $webmaster = trim(preg_replace('/\s{2,}/', ' ', $admin_name)); 261 if (empty($webmaster)) 262 { 263 $errors[] = l10n('enter a login for webmaster'); 264 } 265 else if (preg_match( '/[\'"]/', $webmaster)) 266 { 267 $errors[] = l10n('webmaster login can\'t contain characters \' or "'); 268 } 269 if ($admin_pass1 != $admin_pass2 || empty($admin_pass1)) 270 { 271 $errors[] = l10n('please enter your password again'); 272 } 273 if (empty($admin_mail)) 274 { 275 $errors[] = l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'); 276 } 269 277 else 270 278 { 271 279 $error_mail_address = validate_mail_address(null, $admin_mail); 272 280 if (!empty($error_mail_address)) 273 array_push( $errors, $error_mail_address ); 281 { 282 $errors[] = $error_mail_address; 283 } 274 284 } 275 285 … … 389 399 foreach (get_available_upgrade_ids() as $upgrade_id) 390 400 { 391 array_push( 392 $datas, 393 array( 394 'id' => $upgrade_id, 395 'applied' => CURRENT_DATE, 396 'description' => 'upgrade included in installation', 397 ) 401 $datas[] = array( 402 'id' => $upgrade_id, 403 'applied' => CURRENT_DATE, 404 'description' => 'upgrade included in installation', 398 405 ); 399 406 } … … 450 457 else 451 458 { 452 array_push( 453 $infos, 454 l10n('Congratulations, Piwigo installation is completed') 455 ); 459 $infos[] = l10n('Congratulations, Piwigo installation is completed'); 456 460 457 461 if (isset($error_copy)) 458 462 { 459 array_push($errors, $error_copy);463 $errors[] = $error_copy; 460 464 } 461 465 else
Note: See TracChangeset
for help on using the changeset viewer.