Commit 7defd8a8 authored by ale's avatar ale Committed by agata

disable wp-piwik global update script

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