* @param $preUpgradeMessage
* @param string $rev
* a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'.
- * @param null $currentVer
- *
- * @return void
+ * @param string $currentVer
*/
public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
if ($rev == '4.4.beta1') {
* alterable.
* @param string $rev
* an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
- * @return void
*/
public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
if ($rev == '4.4.1') {
// CRM-12578 - Prior to this version a CSS file under drupal would disable core css
if (!empty($config->customCSSURL) && strpos($config->userFramework, 'Drupal') === 0) {
// The new setting doesn't exist yet - need to create it first
+ $sql = '
+ INSERT INTO civicrm_setting (group_name, name , value , domain_id , is_domain , created_date)
+ VALUES (%1, %2, %3, %4, %5, now())';
+ CRM_Core_DAO::executeQuery($sql, array(
+ 1 => array(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'String'),
+ 2 => array('disable_core_css', 'String'),
+ 3 => array(serialize(1), 'String'),
+ 4 => array(CRM_Core_Config::domainID(), 'Positive'),
+ 5 => array(1, 'Int'),
+ ));
Civi::service('settings_manager')->flush();
- Civi::settings()->set('disable_core_css', 1);
}
// CRM-13701 - Fix $config->timeInputFormat
}
/**
- * @param $rev
- * @param $originalVer
- * @param $latestVer
+ * Upgrade script for 4.4.7.
*
- * @return void
+ * @param string $rev
+ * @param string $originalVer
+ * @param string $latestVer
*/
public function upgrade_4_4_7($rev, $originalVer, $latestVer) {
// For WordPress/Joomla(?), cleanup broken image_URL from 4.4.6 upgrades - https://issues.civicrm.org/jira/browse/CRM-14971
$dao = new CRM_Contact_DAO_SavedSearch();
$dao->find();
while ($dao->fetch()) {
- $formValues = CRM_Contact_BAO_SavedSearch::getFormValues($dao->id);
+ $formValues = NULL;
+ if (!empty($dao->form_values)) {
+ $formValues = unserialize($dao->form_values);
+ }
if (!empty($formValues['mapper'])) {
foreach ($formValues['mapper'] as $key => $value) {
foreach ($value as $k => $v) {