}
/**
- * Compute any messages which should be displayed beforeupgrade
+ * Compute any messages which should be displayed beforeupgrade.
*
* Note: This function is called iteratively for each upcoming
* revision to the database.
}
/**
- * Compute any messages which should be displayed after upgrade
+ * Compute any messages which should be displayed after upgrade.
*
* @param string $postUpgradeMessage
* alterable.
$this->addTask(ts('Update saved search information'), 'changeSavedSearch');
}
+ /**
+ * Upgrade image URLs.
+ *
+ * @param \CRM_Queue_TaskContext $ctx
+ * @param $startId
+ * @param $endId
+ *
+ * @return bool
+ */
public 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.
return TRUE;
}
+ /**
+ * Change saved search.
+ *
+ * @param \CRM_Queue_TaskContext $ctx
+ *
+ * @return bool
+ */
public static function changeSavedSearch(CRM_Queue_TaskContext $ctx) {
$membershipStatuses = array_flip(CRM_Member_PseudoConstant::membershipStatus());