Skip to content

Commit

Permalink
Version 5.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
humanit-se authored and root committed Oct 30, 2020
1 parent 2d051fe commit 56fd403
Show file tree
Hide file tree
Showing 1,696 changed files with 225,628 additions and 436,195 deletions.
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -14,4 +14,4 @@
define( 'WP_USE_THEMES', true );

/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
5 changes: 3 additions & 2 deletions license.txt
@@ -1,6 +1,6 @@
WordPress - Web publishing software

Copyright 2011-2020 by the contributors
Copyright 2011-2019 by the contributors

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -19,7 +19,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
This program incorporates work covered by the following copyright and
permission notices:

b2 is (c) 2001, 2002 Michel Valdrighi - https://cafelog.com
b2 is (c) 2001, 2002 Michel Valdrighi - m@tidakada.com -
http://tidakada.com

Wherever third party code has been used, credit has been given in the code's
comments.
Expand Down
4 changes: 2 additions & 2 deletions readme.html
Expand Up @@ -52,13 +52,13 @@ <h2>Att flytta till WordPress från andra system</h2>

<h2>Systemkrav</h2>
<ul>
<li><a href="https://secure.php.net/">PHP</a> version <strong>5.6.20</strong> eller senare.</li>
<li><a href="https://secure.php.net/">PHP</a> version <strong>5.2.4</strong> eller senare.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.0</strong> eller senare.</li>
</ul>

<h3>Rekommenderas</h3>
<ul>
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.3</strong> eller senare.</li>
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.2</strong> eller senare.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.6</strong> eller senare.</li>
<li>Apache-modulen <a href="https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a>.</li>
<li>Stöd för <a href="https://wordpress.org/news/2016/12/moving-toward-ssl/">HTTPS</a>.</li>
Expand Down
44 changes: 19 additions & 25 deletions wp-activate.php
Expand Up @@ -9,9 +9,9 @@
define( 'WP_INSTALLING', true );

/** Sets up the WordPress Environment. */
require __DIR__ . '/wp-load.php';
require( dirname( __FILE__ ) . '/wp-load.php' );

require __DIR__ . '/wp-blog-header.php';
require( dirname( __FILE__ ) . '/wp-blog-header.php' );

if ( ! is_multisite() ) {
wp_redirect( wp_registration_url() );
Expand All @@ -37,7 +37,7 @@
if ( $key ) {
$redirect_url = remove_query_arg( 'key' );

if ( remove_query_arg( false ) !== $redirect_url ) {
if ( $redirect_url !== remove_query_arg( false ) ) {
setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
wp_safe_redirect( $redirect_url );
exit;
Expand All @@ -46,18 +46,18 @@
}
}

if ( null === $result && isset( $_COOKIE[ $activate_cookie ] ) ) {
if ( $result === null && isset( $_COOKIE[ $activate_cookie ] ) ) {
$key = $_COOKIE[ $activate_cookie ];
$result = wpmu_activate_signup( $key );
setcookie( $activate_cookie, ' ', time() - YEAR_IN_SECONDS, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
}

if ( null === $result || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) {
if ( $result === null || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) {
status_header( 404 );
} elseif ( is_wp_error( $result ) ) {
$error_code = $result->get_error_code();

if ( ! in_array( $error_code, $valid_error_codes, true ) ) {
if ( ! in_array( $error_code, $valid_error_codes ) ) {
status_header( 400 );
}
}
Expand All @@ -68,7 +68,7 @@
$wp_object_cache->cache_enabled = false;
}

// Fix for page title.
// Fix for page title
$wp_query->is_404 = false;

/**
Expand Down Expand Up @@ -117,16 +117,14 @@ function wpmu_activate_stylesheet() {
add_action( 'wp_head', 'wp_sensitive_page_meta' );

get_header( 'wp-activate' );

$blog_details = get_blog_details();
?>

<div id="signup-content" class="widecolumn">
<div class="wp-activate-container">
<?php if ( ! $key ) { ?>

<h2><?php _e( 'Activation Key Required' ); ?></h2>
<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url( $blog_details->path . 'wp-activate.php' ); ?>">
<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url( 'wp-activate.php' ); ?>">
<p>
<label for="key"><?php _e( 'Activation Key:' ); ?></label>
<br /><input type="text" name="key" id="key" value="" size="50" />
Expand All @@ -138,33 +136,33 @@ function wpmu_activate_stylesheet() {

<?php
} else {
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes, true ) ) {
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes ) ) {
$signup = $result->get_error_data();
?>
<h2><?php _e( 'Your account is now active!' ); ?></h2>
<?php
echo '<p class="lead-in">';
if ( '' === $signup->domain . $signup->path ) {
if ( $signup->domain . $signup->path == '' ) {
printf(
/* translators: 1: Login URL, 2: Username, 3: User email address, 4: Lost password URL. */
/* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
network_site_url( $blog_details->path . 'wp-login.php', 'login' ),
network_site_url( 'wp-login.php', 'login' ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
);
} else {
printf(
/* translators: 1: Site URL, 2: Username, 3: User email address, 4: Lost password URL. */
/* translators: 1: site URL, 2: username, 3: user email, 4: lost password URL */
__( 'Your site at %1$s is active. You may now log in to your site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
sprintf( '<a href="http://%1$s%2$s">%1$s%2$s</a>', $signup->domain, $blog_details->path ),
sprintf( '<a href="http://%1$s">%1$s</a>', $signup->domain ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
);
}
echo '</p>';
} elseif ( null === $result || is_wp_error( $result ) ) {
} elseif ( $result === null || is_wp_error( $result ) ) {
?>
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
<?php if ( is_wp_error( $result ) ) : ?>
Expand All @@ -183,26 +181,22 @@ function wpmu_activate_stylesheet() {
</div>

<?php
if ( $url && network_home_url( '', 'http' ) !== $url ) :
if ( $url && $url != network_home_url( '', 'http' ) ) :
switch_to_blog( (int) $result['blog_id'] );
$login_url = wp_login_url();
restore_current_blog();
?>
<p class="view">
<?php
/* translators: 1: Site URL, 2: Login URL. */
/* translators: 1: site URL, 2: login URL */
printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, esc_url( $login_url ) );
?>
</p>
<?php else : ?>
<p class="view">
<?php
printf(
/* translators: 1: Login URL, 2: Network home URL. */
__( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ),
network_site_url( $blog_details->path . 'wp-login.php', 'login' ),
network_home_url( $blog_details->path )
);
/* translators: 1: login URL, 2: network home URL */
printf( __( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url( 'wp-login.php', 'login' ), network_home_url() );
?>
</p>
<?php
Expand Down

0 comments on commit 56fd403

Please sign in to comment.