Skip to content
Snippets Groups Projects
Verified Commit 9470e1fb authored by Kevin Cristiano's avatar Kevin Cristiano :earth_americas:
Browse files

CiviMail sent via wp-cli and cron mangles mailing urls

parent 73b77710
No related branches found
No related tags found
No related merge requests found
......@@ -558,23 +558,10 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base {
}
}
else {
$pathVars = explode('/', str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME']));
//might be windows installation.
$firstVar = array_shift($pathVars);
if ($firstVar) {
$cmsRoot = $firstVar;
}
//start w/ csm dir search.
foreach ($pathVars as $var) {
$cmsRoot .= "/$var";
if ($this->validInstallDir($cmsRoot)) {
//stop as we found bootstrap.
$valid = TRUE;
break;
}
}
$setting = Civi::settings()->get('wpLoadPhp');
$path = str_replace('wp-load.php', '', $setting);
$cmsRoot = rtrim($path, '/\\');
$valid = TRUE;
}
return ($valid) ? $cmsRoot : NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment