Validation for network.php. props dremeda, see #13383.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a2a0b6041b
commit
88bce6a716
|
@ -96,7 +96,6 @@ include( './admin-header.php' );
|
||||||
<?php screen_icon(); ?>
|
<?php screen_icon(); ?>
|
||||||
<h2><?php echo esc_html( $title ); ?></h2>
|
<h2><?php echo esc_html( $title ); ?></h2>
|
||||||
|
|
||||||
<form method="post" action="">
|
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Prints step 1 for Network installation process.
|
* Prints step 1 for Network installation process.
|
||||||
|
@ -109,7 +108,7 @@ include( './admin-header.php' );
|
||||||
function network_step1( $errors = false ) {
|
function network_step1( $errors = false ) {
|
||||||
|
|
||||||
if ( get_option( 'siteurl' ) != get_option( 'home' ) ) {
|
if ( get_option( 'siteurl' ) != get_option( 'home' ) ) {
|
||||||
echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf( __( 'Your <strong>WordPress address</strong> must match your <strong>Site address</strong> before creating a Network. See <a href="%s">General Settings</a>.' ), esc_url( admin_url( 'options-general.php' ) ) ) . '</strong></p></div>';
|
echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf( __( 'Your <strong>WordPress address</strong> must match your <strong>Site address</strong> before creating a Network. See <a href="%s">General Settings</a>.' ), esc_url( admin_url( 'options-general.php' ) ) ) . '</p></div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
include ('./admin-footer.php' );
|
include ('./admin-footer.php' );
|
||||||
die();
|
die();
|
||||||
|
@ -126,7 +125,7 @@ function network_step1( $errors = false ) {
|
||||||
$hostname = get_clean_basedomain();
|
$hostname = get_clean_basedomain();
|
||||||
$has_ports = strstr( $hostname, ':' );
|
$has_ports = strstr( $hostname, ':' );
|
||||||
if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) {
|
if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) {
|
||||||
echo '<div class="error"><p><strong>' . __( 'Error:') . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ) . '</strong></p></div>';
|
echo '<div class="error"><p><strong>' . __( 'Error:') . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ) . '</p></div>';
|
||||||
echo '<p>' . sprintf( __( 'You cannot use port numbers such as <code>%s</code>.' ), $has_ports ) . '</p>';
|
echo '<p>' . sprintf( __( 'You cannot use port numbers such as <code>%s</code>.' ), $has_ports ) . '</p>';
|
||||||
echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Return to Dashboard' ) . '</a>';
|
echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Return to Dashboard' ) . '</a>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
@ -134,6 +133,8 @@ function network_step1( $errors = false ) {
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '<form method="post" action="">';
|
||||||
|
|
||||||
wp_nonce_field( 'install-network-1' );
|
wp_nonce_field( 'install-network-1' );
|
||||||
|
|
||||||
$error_codes = array();
|
$error_codes = array();
|
||||||
|
@ -244,6 +245,7 @@ function network_step1( $errors = false ) {
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p class='submit'><input class="button-primary" name='submit' type='submit' value='<?php esc_attr_e( 'Install' ); ?>' /></p>
|
<p class='submit'><input class="button-primary" name='submit' type='submit' value='<?php esc_attr_e( 'Install' ); ?>' /></p>
|
||||||
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,7 +392,6 @@ if ( $_POST ) {
|
||||||
network_step1();
|
network_step1();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include( './admin-footer.php' ); ?>
|
<?php include( './admin-footer.php' ); ?>
|
||||||
|
|
Loading…
Reference in New Issue