X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUpgrade%2FIncremental%2Fphp%2FFourFour.php;h=0a887b1258789ee0297f28e9553bf9a06d02a5c3;hb=50afd725cb4b09ad12a7b46dd1857a1f44b94997;hp=af2a61d3a00a04b025f6b138e84300d217e18ee5;hpb=fdfd59ccd77f9b06547204a505b67e35bf6596d7;p=civicrm-core.git diff --git a/CRM/Upgrade/Incremental/php/FourFour.php b/CRM/Upgrade/Incremental/php/FourFour.php index af2a61d3a0..0a887b1258 100644 --- a/CRM/Upgrade/Incremental/php/FourFour.php +++ b/CRM/Upgrade/Incremental/php/FourFour.php @@ -378,13 +378,17 @@ ALTER TABLE civicrm_dashboard static function upgradeImageUrls(CRM_Queue_TaskContext $ctx, $startId, $endId){ $dao = self::findContactImageUrls($startId, $endId); $failures = array(); + $config = CRM_Core_Config::singleton(); while ($dao->fetch()){ $imageURL = $dao->image_url; $baseurl = CIVICRM_UF_BASEURL; + //CRM-15897 - gross hack for joomla to remove the administrator/ + if ($config->userFramework == 'Joomla') { + $baseurl = str_replace("/administrator/", "/", $baseurl); + } $baselen = strlen($baseurl); if (substr($imageURL, 0, $baselen)==$baseurl){ $photo = basename($dao->image_url); - $config = CRM_Core_Config::singleton(); $fullpath = $config->customFileUploadDir.$photo; if (file_exists($fullpath)){ // For anyone who upgraded 4.4.6 release (eg 4.4.0=>4.4.6), the $newImageUrl incorrectly used backend URLs.