Version Description
(September 2020) =
- Fixed: Even more code that was to new for PHP 5.6 (I do have some tests, I just didn't look at them
\_()_/
.)
Download this release
Release Info
Developer | eskapism |
Plugin | Simple History |
Version | 2.37.2 |
Comparing to | |
See all releases |
Code changes from version 2.37.0 to 2.37.2
- index.php +2 -2
- loggers/SimplePluginLogger.php +11 -8
- readme.txt +10 -2
index.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Text Domain: simple-history
|
7 |
* Domain Path: /languages
|
8 |
* Description: Plugin that logs various things that occur in WordPress and then presents those events in a very nice GUI.
|
9 |
-
* Version: 2.37.
|
10 |
* Author: Pär Thernström
|
11 |
* Author URI: http://simple-history.com/
|
12 |
* License: GPL2
|
@@ -45,7 +45,7 @@ if ($ok_php_version && $ok_wp_version) {
|
|
45 |
* @TODO: make activation multi site aware, as in https://github.com/scribu/wp-proper-network-activation
|
46 |
* register_activation_hook( trailingslashit(WP_PLUGIN_DIR) . trailingslashit( plugin_basename(__DIR__) ) . "index.php" , array("SimpleHistory", "on_plugin_activate" ) );
|
47 |
*/
|
48 |
-
define('SIMPLE_HISTORY_VERSION', '2.37.
|
49 |
define('SIMPLE_HISTORY_PATH', plugin_dir_path(__FILE__));
|
50 |
define('SIMPLE_HISTORY_BASENAME', plugin_basename(__FILE__));
|
51 |
define('SIMPLE_HISTORY_DIR_URL', plugin_dir_url(__FILE__));
|
6 |
* Text Domain: simple-history
|
7 |
* Domain Path: /languages
|
8 |
* Description: Plugin that logs various things that occur in WordPress and then presents those events in a very nice GUI.
|
9 |
+
* Version: 2.37.2
|
10 |
* Author: Pär Thernström
|
11 |
* Author URI: http://simple-history.com/
|
12 |
* License: GPL2
|
45 |
* @TODO: make activation multi site aware, as in https://github.com/scribu/wp-proper-network-activation
|
46 |
* register_activation_hook( trailingslashit(WP_PLUGIN_DIR) . trailingslashit( plugin_basename(__DIR__) ) . "index.php" , array("SimpleHistory", "on_plugin_activate" ) );
|
47 |
*/
|
48 |
+
define('SIMPLE_HISTORY_VERSION', '2.37.2');
|
49 |
define('SIMPLE_HISTORY_PATH', plugin_dir_path(__FILE__));
|
50 |
define('SIMPLE_HISTORY_BASENAME', plugin_basename(__FILE__));
|
51 |
define('SIMPLE_HISTORY_DIR_URL', plugin_dir_url(__FILE__));
|
loggers/SimplePluginLogger.php
CHANGED
@@ -245,7 +245,10 @@ class SimplePluginLogger extends SimpleLogger
|
|
245 |
* )
|
246 |
*/
|
247 |
|
248 |
-
$action = $_GET['action']
|
|
|
|
|
|
|
249 |
|
250 |
// Bail if doing ajax and
|
251 |
// - action is not toggle-auto-updates
|
@@ -255,7 +258,7 @@ class SimplePluginLogger extends SimpleLogger
|
|
255 |
return;
|
256 |
}
|
257 |
|
258 |
-
$type = $_POST['type']
|
259 |
if ($type !== 'plugin') {
|
260 |
return;
|
261 |
}
|
@@ -275,7 +278,7 @@ class SimplePluginLogger extends SimpleLogger
|
|
275 |
|
276 |
if (in_array($action, ['enable-auto-update', 'disable-auto-update'])) {
|
277 |
// Opening single item enable/disable auto update link in plugin list in new window.
|
278 |
-
$plugin = $_GET['plugin']
|
279 |
|
280 |
if ($plugin) {
|
281 |
$plugins[] = sanitize_text_field(urldecode($plugin));
|
@@ -292,8 +295,8 @@ class SimplePluginLogger extends SimpleLogger
|
|
292 |
// * [state] => disable | enable
|
293 |
// * [type] => plugin
|
294 |
// * [asset] => redirection/redirection.php
|
295 |
-
$state = $_POST['state']
|
296 |
-
$asset = $_POST['asset']
|
297 |
|
298 |
if ($state === 'enable') {
|
299 |
$enableOrDisable = 'enable';
|
@@ -306,7 +309,7 @@ class SimplePluginLogger extends SimpleLogger
|
|
306 |
}
|
307 |
} elseif (in_array($action, ['enable-auto-update-selected', 'disable-auto-update-selected'])) {
|
308 |
// $_POST when checking multiple plugins and choosing Enable auto updates or Disable auto updates.
|
309 |
-
$checked = $_POST['checked']
|
310 |
if ($checked) {
|
311 |
$plugins = (array) $checked;
|
312 |
}
|
@@ -347,8 +350,8 @@ class SimplePluginLogger extends SimpleLogger
|
|
347 |
|
348 |
$context = [
|
349 |
'plugin_slug' => $onePluginSlug,
|
350 |
-
'plugin_name' => $pluginData['Name']
|
351 |
-
'plugin_version' => $pluginData['Version']
|
352 |
];
|
353 |
|
354 |
if ($enableOrDisable === 'enable') {
|
245 |
* )
|
246 |
*/
|
247 |
|
248 |
+
$action = isset($_GET['action']) ? $_GET['action'] : null;
|
249 |
+
if (!$action) {
|
250 |
+
$action = isset($_POST['action']) ? $_POST['action'] : null;
|
251 |
+
}
|
252 |
|
253 |
// Bail if doing ajax and
|
254 |
// - action is not toggle-auto-updates
|
258 |
return;
|
259 |
}
|
260 |
|
261 |
+
$type = isset($_POST['type']) ? $_POST['type'] : null;
|
262 |
if ($type !== 'plugin') {
|
263 |
return;
|
264 |
}
|
278 |
|
279 |
if (in_array($action, ['enable-auto-update', 'disable-auto-update'])) {
|
280 |
// Opening single item enable/disable auto update link in plugin list in new window.
|
281 |
+
$plugin = isset($_GET['plugin']) ? $_GET['plugin'] : null;
|
282 |
|
283 |
if ($plugin) {
|
284 |
$plugins[] = sanitize_text_field(urldecode($plugin));
|
295 |
// * [state] => disable | enable
|
296 |
// * [type] => plugin
|
297 |
// * [asset] => redirection/redirection.php
|
298 |
+
$state = isset($_POST['state']) ? $_POST['state'] : null;
|
299 |
+
$asset = isset($_POST['asset']) ? $_POST['asset'] : null;
|
300 |
|
301 |
if ($state === 'enable') {
|
302 |
$enableOrDisable = 'enable';
|
309 |
}
|
310 |
} elseif (in_array($action, ['enable-auto-update-selected', 'disable-auto-update-selected'])) {
|
311 |
// $_POST when checking multiple plugins and choosing Enable auto updates or Disable auto updates.
|
312 |
+
$checked = isset($_POST['checked']) ? $_POST['checked'] : null;
|
313 |
if ($checked) {
|
314 |
$plugins = (array) $checked;
|
315 |
}
|
350 |
|
351 |
$context = [
|
352 |
'plugin_slug' => $onePluginSlug,
|
353 |
+
'plugin_name' => isset($pluginData['Name']) ? $pluginData['Name'] : null,
|
354 |
+
'plugin_version' => isset($pluginData['Version']) ? $pluginData['Version'] : null,
|
355 |
];
|
356 |
|
357 |
if ($enableOrDisable === 'enable') {
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: history, log, changes, changelog, audit, audit log, event log, user tracki
|
|
5 |
Requires at least: 5.2
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.37.
|
9 |
|
10 |
View changes made by users within WordPress. See who created a page, uploaded an attachment or approved an comment, and more.
|
11 |
|
@@ -189,7 +189,15 @@ Events in the log are stored for 60 days by default. Events older than this will
|
|
189 |
|
190 |
== Changelog ==
|
191 |
|
192 |
-
= 2.37 (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
- Added: Enabling or disabling plugin auto-updates is now logged.
|
195 |
- Added: Function `sh_d()` that echoes any number of variables to the screen.
|
5 |
Requires at least: 5.2
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.37.2
|
9 |
|
10 |
View changes made by users within WordPress. See who created a page, uploaded an attachment or approved an comment, and more.
|
11 |
|
189 |
|
190 |
== Changelog ==
|
191 |
|
192 |
+
= 2.37.2 (September 2020) =
|
193 |
+
|
194 |
+
- Fixed: Even more code that was to new for PHP 5.6 (I do have some tests, I just didn't look at them `¯\_(ツ)_/¯`.)
|
195 |
+
|
196 |
+
= 2.37.1 (September 2020) =
|
197 |
+
|
198 |
+
- Fixed: Some code was to new for PHP 5.6.
|
199 |
+
|
200 |
+
= 2.37 (September 2020) =
|
201 |
|
202 |
- Added: Enabling or disabling plugin auto-updates is now logged.
|
203 |
- Added: Function `sh_d()` that echoes any number of variables to the screen.
|