You are here

function optimizely_update_7210 in Optimizely 7.2

Same name and namespace in other branches
  1. 7.3 optimizely.install \optimizely_update_7210()

Disable all project entries to ensure that validatation tests are run on each entry when enabled. Validation includes valid and unique paths.

File

./optimizely.install, line 234
Install, update and uninstall functions for the Optimizely module

Code

function optimizely_update_7210(&$sandbox) {

  // Update all database project entries to disabled
  $disabled_projects = (bool) db_update('optimizely')
    ->fields(array(
    'enabled' => 0,
  ))
    ->execute();
  drupal_set_message(st('All Optimizely project entries have been disabled. Reenable each project on the') . ' ' . l(st('project listing Adminstration page'), 'admin/config/system/optimizely') . ' ' . st('to ensure that the settings pass new validation functionality. Each entry must have valid paths that point to functional paths that are unique to the entry.'), 'status');
}