| 1 |
<?php
|
| 2 |
|
| 3 |
function splash_update_6200() {
|
| 4 |
$ret = array();
|
| 5 |
|
| 6 |
// Old variables
|
| 7 |
$redirect = variable_get('splash_redirect', NULL);
|
| 8 |
$cookie = variable_get('splash_cookie', NULL);
|
| 9 |
$frequency = variable_get('splash_frequency', NULL);
|
| 10 |
$code = variable_get('splash_code', NULL);
|
| 11 |
|
| 12 |
// New variables
|
| 13 |
variable_set('splash_when', array(
|
| 14 |
'frequency' => (!is_string($frequency) || strlen($frequency) == 0) ? 'always' : $frequency,
|
| 15 |
'cookie' => (!is_string($cookie) || strlen($frequency) == 0) ? 'splash_cookie' : $cookie,
|
| 16 |
));
|
| 17 |
variable_set('splash_what', array(
|
| 18 |
'content' => (!is_string($redirect) || strlen($redirect) == 0) ? '' : $redirect,
|
| 19 |
));
|
| 20 |
|
| 21 |
// Code has been moved to Conditions module
|
| 22 |
if (is_string($code) && strlen($code) > 0) {
|
| 23 |
drupal_set_message(t('Splash - Install the conditions module to trigger the display by the PHP code you had set: %code', array('%code' => $code)));
|
| 24 |
}
|
| 25 |
|
| 26 |
return $ret;
|
| 27 |
}
|
| 28 |
|
| 29 |
?>
|