Skip to content
Snippets Groups Projects
Commit 51f5f1bd authored by Ted Cooper's avatar Ted Cooper
Browse files

Issue #1275104 by ELC: rm hook_install, fix spacing, default to on.

hook_install() just set variables to defaults with no purpose - removed.
Removed some extra spare lines at end of .module file - no real change.
Module now defaults to ON once Acc ID has been added instead of OFF. This
 is to prevent confusion with people transferring from the current zipped
 version of the module to the d.o hosted version, as the zipped version
 did not have this on/off switch.
Also fix format of CHANGELOG and made it 7.x specific
parent dcd3d92c
Branches 2486651-donate
No related tags found
No related merge requests found
2011-10-dd - 6.x-1.0rc1 and 7.x-1.0rc1
7.x-1.0rc1, 2011-10-10
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Original code from Will Ronco
* Add doxygen
* Update javascript to current version - re-arrange inclution logic and add
on/off switch.
* Fixup Coder recomendations
* hook_requirements
wronco: Original code from Will Ronco
ELC: Add doxygen
ELC: Update javascript to current version - re-arrange inclution logic
and add on/off switch.
ELC: Fixup Coder recomendations
ELC: hook_requirements
ELC: Added on/off switch
ELC: Spelling + Comment fixes
#1303824 by ELC: t() usage cleanup.
#1275104 by ELC: rm hook_install, fix spacing, default to on
......@@ -21,7 +21,7 @@ function visual_website_optimizer_requirements($phase) {
elseif ($phase == 'runtime') {
// Check that the account ID has been set
$vwo_id = variable_get('visual_website_optimizer_id', 'NONE');
$vwo_onoff = variable_get('visual_website_optimizer_onoff', 'off');
$vwo_onoff = variable_get('visual_website_optimizer_onoff', 'on');
if ($vwo_id == 'NONE') {
// Requirements failed - module will not run.
......@@ -56,14 +56,6 @@ function visual_website_optimizer_requirements($phase) {
return $requirements;
}
/**
* Implementation of hook_install().
*/
function visual_website_optimizer_install() {
variable_set('visual_website_optimizer_id', 'NONE');
variable_set('visual_website_optimizer_onoff', 'off');
}
/**
* Implementation of hook_enable().
*/
......
......@@ -19,7 +19,7 @@ function visual_website_optimizer_init() {
// Grab the ID, but only proceed if it's set to something.
$vwo_id = variable_get('visual_website_optimizer_id', 'NONE');
$vwo_onoff = variable_get('visual_website_optimizer_onoff', 'off');
$vwo_onoff = variable_get('visual_website_optimizer_onoff', 'on');
if ($vwo_onoff == 'on' && $vwo_id != "NONE") {
......@@ -109,7 +109,7 @@ function visual_website_optimizer_setup_form($form_state) {
'#type' => 'radios',
'#title' => t('Enable Visual Website Optimizer'),
'#description' => t('To start using Visual Website Optimizer, this setting must be enabled. This setting can be used to globally disable VWO from working on your site without disabling yours tests on the VWO website.'),
'#default_value' => variable_get('visual_website_optimizer_onoff', 'off'),
'#default_value' => variable_get('visual_website_optimizer_onoff', 'on'),
'#options' => array(
'off' => 'Disabled',
'on' => 'Enabled',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment