Version Description
- Bugfix: "Create Piwik site" link (network dashboard)
Download this release
Release Info
Developer | Braekling |
Plugin | WP-Matomo (WP-Piwik) |
Version | 0.9.6.2 |
Comparing to | |
See all releases |
Code changes from version 0.9.6.1 to 0.9.6.2
- readme.txt +5 -6
- settings/sitebrowser.php +2 -3
- wp-piwik.php +11 -9
readme.txt
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Contributors: Braekling
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 3.4.2
|
6 |
-
Stable tag: 0.9.6.
|
7 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
|
8 |
Tags: statistics, stats, analytics, piwik, wpmu
|
9 |
|
@@ -92,14 +92,13 @@ Add WP-Piwik to your /wp-content/plugins folder and enable it as [Network Plugin
|
|
92 |
|
93 |
== Upgrade Notice ==
|
94 |
|
95 |
-
|
96 |
-
WordPress metabox concept used properly, different bugfixes, custom variables feature added.
|
97 |
-
|
98 |
-
= 0.9.6.1 =
|
99 |
-
Toolbar graph bugfix
|
100 |
|
101 |
== Changelog ==
|
102 |
|
|
|
|
|
|
|
103 |
= 0.9.6.1 =
|
104 |
* Toolbar graph bugfix
|
105 |
|
3 |
Contributors: Braekling
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 3.4.2
|
6 |
+
Stable tag: 0.9.6.2
|
7 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
|
8 |
Tags: statistics, stats, analytics, piwik, wpmu
|
9 |
|
92 |
|
93 |
== Upgrade Notice ==
|
94 |
|
95 |
+
Bugfix: ["Create Piwik site" link (network dashboard)](http://wordpress.org/support/topic/plugin-wp-piwik-you-attempted-to-access-the-networks-dashboard-but-you-do-not)
|
|
|
|
|
|
|
|
|
96 |
|
97 |
== Changelog ==
|
98 |
|
99 |
+
= 0.9.6.2 =
|
100 |
+
* Bugfix: ["Create Piwik site" link (network dashboard)](http://wordpress.org/support/topic/plugin-wp-piwik-you-attempted-to-access-the-networks-dashboard-but-you-do-not)
|
101 |
+
|
102 |
= 0.9.6.1 =
|
103 |
* Toolbar graph bugfix
|
104 |
|
settings/sitebrowser.php
CHANGED
@@ -1,8 +1,6 @@
|
|
1 |
<?php
|
2 |
$bolCURL = function_exists('curl_init');
|
3 |
$bolFOpen = ini_get('allow_url_fopen');
|
4 |
-
if (!isset($bolNetwork))
|
5 |
-
$bolNetwork = false;
|
6 |
if (!$bolFOpen && !$bolCURL) {
|
7 |
?><tr>
|
8 |
<td colspan="2">
|
@@ -68,6 +66,7 @@ class SiteBrowser extends WP_List_Table {
|
|
68 |
'total_items' => $total_items,
|
69 |
'per_page' => $per_page
|
70 |
));
|
|
|
71 |
foreach ($this->aryData as $intKey => $aryDataset) {
|
72 |
if (empty($aryDataset['piwikid']) || !is_int($aryDataset['piwikid']))
|
73 |
$this->aryData[$intKey]['piwikid'] = '<a href="'.admin_url(($pagenow == 'settings.php'?'network/':'')).$pagenow.'?page=wp-piwik/wp-piwik.php&tab=sitebrowser'.($aryDataset['id'] != '-'?'&wpmu_show_stats='.$aryDataset['id']:'').'">Create Piwik site</a>';
|
@@ -91,7 +90,7 @@ class SiteBrowser extends WP_List_Table {
|
|
91 |
}
|
92 |
}
|
93 |
$objSiteBrowser = new SiteBrowser();
|
94 |
-
$intCnt = $objSiteBrowser->prepare_items($bolNetwork);
|
95 |
if ($intCnt > 0) $objSiteBrowser->display();
|
96 |
else echo '<p>No site configured yet.</p>'
|
97 |
?>
|
1 |
<?php
|
2 |
$bolCURL = function_exists('curl_init');
|
3 |
$bolFOpen = ini_get('allow_url_fopen');
|
|
|
|
|
4 |
if (!$bolFOpen && !$bolCURL) {
|
5 |
?><tr>
|
6 |
<td colspan="2">
|
66 |
'total_items' => $total_items,
|
67 |
'per_page' => $per_page
|
68 |
));
|
69 |
+
if ($bolNetwork) $pagenow = 'settings.php';
|
70 |
foreach ($this->aryData as $intKey => $aryDataset) {
|
71 |
if (empty($aryDataset['piwikid']) || !is_int($aryDataset['piwikid']))
|
72 |
$this->aryData[$intKey]['piwikid'] = '<a href="'.admin_url(($pagenow == 'settings.php'?'network/':'')).$pagenow.'?page=wp-piwik/wp-piwik.php&tab=sitebrowser'.($aryDataset['id'] != '-'?'&wpmu_show_stats='.$aryDataset['id']:'').'">Create Piwik site</a>';
|
90 |
}
|
91 |
}
|
92 |
$objSiteBrowser = new SiteBrowser();
|
93 |
+
$intCnt = $objSiteBrowser->prepare_items($this->bolNetwork);
|
94 |
if ($intCnt > 0) $objSiteBrowser->display();
|
95 |
else echo '<p>No site configured yet.</p>'
|
96 |
?>
|
wp-piwik.php
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://wordpress.org/extend/plugins/wp-piwik/
|
|
6 |
|
7 |
Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
|
8 |
|
9 |
-
Version: 0.9.6.
|
10 |
Author: André Bräkling
|
11 |
Author URI: http://www.braekling.de
|
12 |
|
@@ -60,13 +60,13 @@ if (!function_exists('is_plugin_active_for_network'))
|
|
60 |
class wp_piwik {
|
61 |
|
62 |
private static
|
63 |
-
$intRevisionId =
|
64 |
-
$strVersion = '0.9.6.
|
65 |
$intDashboardID = 30,
|
66 |
$strPluginBasename = NULL,
|
67 |
$bolJustActivated = false,
|
68 |
$aryGlobalSettings = array(
|
69 |
-
'revision' =>
|
70 |
'add_tracking_code' => false,
|
71 |
'last_settings_update' => 0,
|
72 |
'piwik_token' => '',
|
@@ -100,7 +100,8 @@ class wp_piwik {
|
|
100 |
);
|
101 |
|
102 |
private
|
103 |
-
$intStatsPage = NULL
|
|
|
104 |
|
105 |
/**
|
106 |
* Load plugin settings
|
@@ -971,10 +972,11 @@ class wp_piwik {
|
|
971 |
|
972 |
// Open stats page as network admin
|
973 |
function showStatsNetwork() {
|
974 |
-
$this->
|
|
|
975 |
}
|
976 |
|
977 |
-
function showStats(
|
978 |
// Disabled time limit if required
|
979 |
if (isset(self::$aryGlobalSettings['disable_timelimit']) && self::$aryGlobalSettings['disable_timelimit'])
|
980 |
set_time_limit(0);
|
@@ -986,7 +988,7 @@ class wp_piwik {
|
|
986 |
<?php screen_icon('options-general'); ?>
|
987 |
<h2><?php _e('Piwik Statistics', 'wp-piwik'); ?></h2>
|
988 |
<?php /************************************************************************/
|
989 |
-
if (is_plugin_active_for_network('wp-piwik/wp-piwik.php') && function_exists('is_super_admin') && is_super_admin() && $bolNetwork) {
|
990 |
/* global $blog_id;
|
991 |
global $wpdb;
|
992 |
$aryBlogs = $wpdb->get_results($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs.' ORDER BY blog_id'));
|
@@ -1011,7 +1013,7 @@ class wp_piwik {
|
|
1011 |
switch_to_blog((int) $_GET['wpmu_show_stats']);
|
1012 |
self::loadSettings();
|
1013 |
} else {
|
1014 |
-
|
1015 |
return;
|
1016 |
}
|
1017 |
echo '<p>'.__('Currently shown stats:').' <a href="'.get_bloginfo('url').'">'.(int) $_GET['wpmu_show_stats'].' - '.get_bloginfo('name').'</a>.'.' <a href="?page=wp-piwik_stats">Show site overview</a>.</p>'."\n";
|
6 |
|
7 |
Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
|
8 |
|
9 |
+
Version: 0.9.6.2
|
10 |
Author: André Bräkling
|
11 |
Author URI: http://www.braekling.de
|
12 |
|
60 |
class wp_piwik {
|
61 |
|
62 |
private static
|
63 |
+
$intRevisionId = 90603,
|
64 |
+
$strVersion = '0.9.6.2',
|
65 |
$intDashboardID = 30,
|
66 |
$strPluginBasename = NULL,
|
67 |
$bolJustActivated = false,
|
68 |
$aryGlobalSettings = array(
|
69 |
+
'revision' => 90603,
|
70 |
'add_tracking_code' => false,
|
71 |
'last_settings_update' => 0,
|
72 |
'piwik_token' => '',
|
100 |
);
|
101 |
|
102 |
private
|
103 |
+
$intStatsPage = NULL,
|
104 |
+
$bolNetwork = false;
|
105 |
|
106 |
/**
|
107 |
* Load plugin settings
|
972 |
|
973 |
// Open stats page as network admin
|
974 |
function showStatsNetwork() {
|
975 |
+
$this->bolNetwork = true;
|
976 |
+
$this->showStats();
|
977 |
}
|
978 |
|
979 |
+
function showStats() {
|
980 |
// Disabled time limit if required
|
981 |
if (isset(self::$aryGlobalSettings['disable_timelimit']) && self::$aryGlobalSettings['disable_timelimit'])
|
982 |
set_time_limit(0);
|
988 |
<?php screen_icon('options-general'); ?>
|
989 |
<h2><?php _e('Piwik Statistics', 'wp-piwik'); ?></h2>
|
990 |
<?php /************************************************************************/
|
991 |
+
if (is_plugin_active_for_network('wp-piwik/wp-piwik.php') && function_exists('is_super_admin') && is_super_admin() && $this->bolNetwork) {
|
992 |
/* global $blog_id;
|
993 |
global $wpdb;
|
994 |
$aryBlogs = $wpdb->get_results($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs.' ORDER BY blog_id'));
|
1013 |
switch_to_blog((int) $_GET['wpmu_show_stats']);
|
1014 |
self::loadSettings();
|
1015 |
} else {
|
1016 |
+
$this->includeFile('settings/sitebrowser');
|
1017 |
return;
|
1018 |
}
|
1019 |
echo '<p>'.__('Currently shown stats:').' <a href="'.get_bloginfo('url').'">'.(int) $_GET['wpmu_show_stats'].' - '.get_bloginfo('name').'</a>.'.' <a href="?page=wp-piwik_stats">Show site overview</a>.</p>'."\n";
|