Commit 5c83ab08 authored by ale's avatar ale Committed by kiki

disable wp-piwik global update script

parent cfa349a2
<?php
// Get & delete old version's options
if (self::$settings->checkNetworkActivation ()) {
$oldGlobalOptions = get_site_option ( 'wp-piwik_global-settings', array () );
delete_site_option('wp-piwik_global-settings');
} else {
$oldGlobalOptions = get_option ( 'wp-piwik_global-settings', array () );
delete_option('wp-piwik_global-settings');
}
$oldOptions = get_option ( 'wp-piwik_settings', array () );
delete_option('wp-piwik_settings');
if (self::$settings->checkNetworkActivation ()) {
global $wpdb;
$aryBlogs = \WP_Piwik\Settings::getBlogList();
if (is_array($aryBlogs))
foreach ($aryBlogs as $aryBlog) {
$oldOptions = get_blog_option ( $aryBlog['blog_id'], 'wp-piwik_settings', array () );
if (!$this->isConfigured())
foreach ( $oldOptions as $key => $value )
self::$settings->setOption ( $key, $value, $aryBlog['blog_id'] );
delete_blog_option($aryBlog['blog_id'], 'wp-piwik_settings');
}
}
if (!$this->isConfigured()) {
if (!$oldGlobalOptions['add_tracking_code']) $oldGlobalOptions['track_mode'] = 'disabled';
elseif (!$oldGlobalOptions['track_mode']) $oldGlobalOptions['track_mode'] = 'default';
elseif ($oldGlobalOptions['track_mode'] == 1) $oldGlobalOptions['track_mode'] = 'js';
elseif ($oldGlobalOptions['track_mode'] == 2) $oldGlobalOptions['track_mode'] = 'proxy';
// Store old values in new settings
foreach ( $oldGlobalOptions as $key => $value )
self::$settings->setGlobalOption ( $key, $value );
foreach ( $oldOptions as $key => $value )
self::$settings->setOption ( $key, $value );
}
self::$settings->save ();
\ No newline at end of file
<?php
/**** a/i patch: DISABLE THIS GLOBAL UPDATE
// Get & delete old version's options
if (self::$settings->checkNetworkActivation ()) {
$oldGlobalOptions = get_site_option ( 'wp-piwik_global-settings', array () );
delete_site_option('wp-piwik_global-settings');
} else {
$oldGlobalOptions = get_option ( 'wp-piwik_global-settings', array () );
delete_option('wp-piwik_global-settings');
}
$oldOptions = get_option ( 'wp-piwik_settings', array () );
delete_option('wp-piwik_settings');
if (self::$settings->checkNetworkActivation ()) {
global $wpdb;
$aryBlogs = \WP_Piwik\Settings::getBlogList();
if (is_array($aryBlogs))
foreach ($aryBlogs as $aryBlog) {
$oldOptions = get_blog_option ( $aryBlog['blog_id'], 'wp-piwik_settings', array () );
if (!$this->isConfigured())
foreach ( $oldOptions as $key => $value )
self::$settings->setOption ( $key, $value, $aryBlog['blog_id'] );
delete_blog_option($aryBlog['blog_id'], 'wp-piwik_settings');
}
}
if (!$this->isConfigured()) {
if (!$oldGlobalOptions['add_tracking_code']) $oldGlobalOptions['track_mode'] = 'disabled';
elseif (!$oldGlobalOptions['track_mode']) $oldGlobalOptions['track_mode'] = 'default';
elseif ($oldGlobalOptions['track_mode'] == 1) $oldGlobalOptions['track_mode'] = 'js';
elseif ($oldGlobalOptions['track_mode'] == 2) $oldGlobalOptions['track_mode'] = 'proxy';
// Store old values in new settings
foreach ( $oldGlobalOptions as $key => $value )
self::$settings->setGlobalOption ( $key, $value );
foreach ( $oldOptions as $key => $value )
self::$settings->setOption ( $key, $value );
}
self::$settings->save ();
****/
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