Commit 9a907bdd authored by voleger's avatar voleger

Issue #2957243 by voleger: Fatal error: Call to undefined function variable_init()

parent e2b9ae1d
......@@ -106,11 +106,13 @@ function lightbox2_uninstall() {
* too late now.
*/
function lightbox2_update_1() {
$ret = array();
$ret[] = update_sql('UPDATE {variable} SET name="lightbox2_lite"
WHERE name="lightbox2_plus";');
return $ret;
$variable_name = 'lightbox2_plus';
$var = variable_get($variable_name);
if ($var) {
variable_set('lightbox2_lite', $var);
variable_del($variable_name);
}
return array();
}
/**
......@@ -186,11 +188,11 @@ function lightbox2_update_6001() {
* 'lightbox2_slideshow_pause_on_prev_click'.
*/
function lightbox2_update_6002() {
$vars = variable_init();
if (array_key_exists('lightbox2_slideshow_pause_on_prev_click', $vars)) {
$value = $vars['lightbox2_slideshow_pause_on_prev_click'];
variable_set('lightbox2_slideshow_pause_on_previous_click', $value);
variable_del('lightbox2_slideshow_pause_on_prev_click');
$variable_name = 'lightbox2_slideshow_pause_on_prev_click';
$var = variable_get($variable_name);
if ($var) {
variable_set('lightbox2_slideshow_pause_on_previous_click', $var);
variable_del($variable_name);
}
return array();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment