Skip to content

Commit

Permalink
Merge pull request #824 from websharks/feature/812
Browse files Browse the repository at this point in the history
PR: feature/812
  • Loading branch information
JasWSInc committed Dec 18, 2015
2 parents 485bc87 + 969982e commit 0f283e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitchange
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1450447258
1450450975
6 changes: 3 additions & 3 deletions s2member/includes/classes/mms-patches.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public static function mms_patches ($display_notices = FALSE)
else // Otherwise, we need to report that /wp-login.php could NOT be updated. Possibly a permissions error.
($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-login.php</code> file could NOT be patched. File NOT writable.', true) : null;

$load_file = ABSPATH . WPINC . "/load.php";
$load_section = "/([\r\n\t\s ]+)(if( *?)\(( *?)empty( *?)\(( *?)\\\$active_plugins( *?)\)( *?)\|\|( *?)defined( *?)\(( *?)['\"]WP_INSTALLING['\"]( *?)\)( *?)\))/";
$load_replace = "\n\n\t// Modified for full plugin compatiblity.\n\t//if ( empty( \$active_plugins ) || defined( 'WP_INSTALLING' ) )\n\tif ( empty( \$active_plugins ) || ( defined( 'WP_INSTALLING' ) && !preg_match(\"/\/wp-activate\.php/\", \$_SERVER[\"REQUEST_URI\"]) ) )";
$load_file = ABSPATH . WPINC . "/load.php"; // WordPress v4.4 uses `wp_installing()` instead of `defined( 'WP_INSTALLING' )`
$load_section = "/([\r\n\t\s ]+)(if( *?)\(( *?)empty( *?)\(( *?)\\\$active_plugins( *?)\)( *?)\|\|( *?)(wp_installing\s*\(\s*\)|defined( *?)\(( *?)['\"]WP_INSTALLING['\"]( *?)\))( *?)\))/";
$load_replace = "\n\n\t// Modified for full plugin compatiblity.\n\t//if ( empty( \$active_plugins ) || wp_installing() )\n\tif ( empty( \$active_plugins ) || ( wp_installing() && !preg_match(\"/\/wp-activate\.php/\", \$_SERVER[\"REQUEST_URI\"]) ) )";

if (file_exists ($load_file) && ($load = file_get_contents ($load_file)) && is_writable ($load_file))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Modified for full plugin compatiblity.
//if ( empty( $active_plugins ) || defined( 'WP_INSTALLING' ) )
if ( empty( $active_plugins ) || ( defined( 'WP_INSTALLING' ) && !preg_match("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"]) ) )
return $plugins;
//if ( empty( $active_plugins ) || wp_installing() )
if ( empty( $active_plugins ) || ( wp_installing() && !preg_match("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"]) ) )
return $plugins;

0 comments on commit 0f283e7

Please sign in to comment.