Skip to content

Commit

Permalink
CRM-21812 - don't specify installation type post install
Browse files Browse the repository at this point in the history
props @MegaphoneJon
The wp-cli-login-server plugin checks for the presence of elements in the $_GET array, and fails if any are found. This conflicts with CiviCRM, which places:

$_GET['civicrm_install_type'] = 'wordpress';

into every page load.

I confirmed that this value is only used for install, and placed a conditional around it to only insert pre-install. I successfully installed CiviCRM and engaged in normal use with the conditional applied, and confirmed that this fixed the WP plugin.

This is intended to close aaemnnosttv/wp-cli-login-command#24.

Signed-off-by: Kevin Cristiano <kcristiano@tadpole.cc>
  • Loading branch information
kcristiano committed Jun 8, 2018
1 parent 9632b2b commit ea8bab0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion civicrm.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ public function setup_instance() {
if ( $this->civicrm_in_wordpress() ) {
// this is required for AJAX calls in WordPress admin
$_GET['noheader'] = TRUE;
} else {
}

if ( !CIVICRM_INSTALLED && !$this->civicrm_in_wordpress() ) {
$_GET['civicrm_install_type'] = 'wordpress';
}

Expand Down

0 comments on commit ea8bab0

Please sign in to comment.