Changeset 3378902
- Timestamp:
- 10/15/2025 01:03:35 PM (5 months ago)
- Location:
- 0-day-analytics
- Files:
-
- 12 edited
- 1 copied
-
tags/3.7.6 (copied) (copied from 0-day-analytics/trunk)
-
tags/3.7.6/advanced-analytics.php (modified) (2 diffs)
-
tags/3.7.6/classes/vendor/lists/class-crons-list.php (modified) (2 diffs)
-
tags/3.7.6/classes/vendor/lists/class-wp-mail-list.php (modified) (1 diff)
-
tags/3.7.6/classes/vendor/lists/entity/class-common-table.php (modified) (8 diffs)
-
tags/3.7.6/css/admin/style.css (modified) (1 diff)
-
tags/3.7.6/readme.txt (modified) (2 diffs)
-
trunk/advanced-analytics.php (modified) (2 diffs)
-
trunk/classes/vendor/lists/class-crons-list.php (modified) (2 diffs)
-
trunk/classes/vendor/lists/class-wp-mail-list.php (modified) (1 diff)
-
trunk/classes/vendor/lists/entity/class-common-table.php (modified) (8 diffs)
-
trunk/css/admin/style.css (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
0-day-analytics/tags/3.7.6/advanced-analytics.php
r3377720 r3378902 11 11 * Plugin Name: 0 Day Analytics 12 12 * Description: Take full control of error log, crons, transients, plugins, requests, mails and DB tables. 13 * Version: 3.7. 513 * Version: 3.7.6 14 14 * Author: Stoil Dobrev 15 15 * Author URI: https://github.com/sdobreff/ … … 37 37 // Constants. 38 38 if ( ! defined( 'ADVAN_VERSION' ) ) { 39 define( 'ADVAN_VERSION', '3.7. 5' );39 define( 'ADVAN_VERSION', '3.7.6' ); 40 40 define( 'ADVAN_TEXTDOMAIN', '0-day-analytics' ); 41 41 define( 'ADVAN_NAME', '0 Day Analytics' ); -
0-day-analytics/tags/3.7.6/classes/vendor/lists/class-crons-list.php
r3375318 r3378902 636 636 ?> 637 637 <script> 638 window.location.href = '<?php echo \esc_url ( $redirect ); ?>';638 window.location.href = '<?php echo \esc_url_raw( $redirect ); ?>'; 639 639 </script> 640 640 <?php … … 674 674 ?> 675 675 <script> 676 window.location.href = '<?php echo \esc_url ( $redirect ); ?>';676 window.location.href = '<?php echo \esc_url_raw( $redirect ); ?>'; 677 677 </script> 678 678 <?php -
0-day-analytics/tags/3.7.6/classes/vendor/lists/class-wp-mail-list.php
r3375967 r3378902 1009 1009 ?> 1010 1010 <script> 1011 window.location.href = '<?php echo \esc_url ( $redirect ); ?>';1011 window.location.href = '<?php echo \esc_url_raw( $redirect ); ?>'; 1012 1012 </script> 1013 1013 <?php -
0-day-analytics/tags/3.7.6/classes/vendor/lists/entity/class-common-table.php
r3377720 r3378902 477 477 * 478 478 * @return int bool 479 * 479 * 480 480 * @since latest 481 481 */ … … 603 603 604 604 return $array; 605 606 // return array_combine( $array, $array );607 605 } 608 606 … … 884 882 885 883 $wpdb->suppress_errors( true ); 886 $results = $wpdb->get_var( $sql ); 884 $results = $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 887 885 888 886 if ( '' !== $wpdb->last_error || null === $results ) { … … 920 918 $wpdb->suppress_errors( true ); 921 919 922 $results = $wpdb->get_results( $sql, \ARRAY_A ); 920 $results = $wpdb->get_results( $sql, \ARRAY_A ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 923 921 924 922 if ( '' !== $wpdb->last_error || null === $results ) { … … 992 990 993 991 $query = $wpdb->prepare( 994 'SELECT * FROM `' . self::get_name() . '` WHERE `' . self::get_real_id_name() . '` = %s;', 992 'SELECT * FROM `' . self::get_name() . '` WHERE `' . self::get_real_id_name() . '` = %s;', // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 995 993 $id 996 994 ); … … 998 996 $wpdb->suppress_errors( true ); 999 997 1000 $results = $wpdb->get_results( $query, \ARRAY_A ); 998 $results = $wpdb->get_results( $query, \ARRAY_A ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 1001 999 1002 1000 if ( '' !== $wpdb->last_error || null === $results ) { … … 1032 1030 <tr> 1033 1031 <td width="40%"><strong><?php echo \esc_html( $key ); ?></strong></td> 1034 <td><?php echo \esc_html( $value );?></td>1032 <td><?php echo ( self::format_value_for_html( $value ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td> 1035 1033 </tr> 1036 1034 <?php … … 1058 1056 } 1059 1057 } 1058 1059 /** 1060 * Formats the value for HTML output 1061 * 1062 * @param mixed $value - The value to be formatted. 1063 * 1064 * @return string 1065 * 1066 * @since latest 1067 */ 1068 private static function format_value_for_html( $value ) { 1069 // Try to decode JSON if it's a string. 1070 if ( is_string( $value ) ) { 1071 $decoded = json_decode( $value, true ); 1072 1073 // Handle valid JSON (objects or arrays). 1074 if ( json_last_error() === JSON_ERROR_NONE ) { 1075 $value = $decoded; 1076 } 1077 1078 // Try unserialize if not valid JSON but looks like serialized PHP. 1079 elseif ( preg_match( '/^[aOs]:[0-9]+:/', $value ) ) { 1080 $unserialized = @unserialize( $value ); 1081 if ( false !== $unserialized || 'b:0;' === $value ) { 1082 $value = $unserialized; 1083 } 1084 } 1085 } 1086 1087 // Format by type. 1088 if ( is_array( $value ) ) { 1089 // Pretty print arrays or objects. 1090 $formatted = '<pre>' . \esc_html( print_r( $value, true ) ) . '</pre>'; 1091 } elseif ( is_object( $value ) ) { 1092 $formatted = '<pre>' . \esc_html( print_r( $value, true ) ) . '</pre>'; 1093 } elseif ( is_bool( $value ) ) { 1094 $formatted = $value ? 'true' : 'false'; 1095 } elseif ( is_null( $value ) ) { 1096 $formatted = '<em>null</em>'; 1097 } elseif ( is_numeric( $value ) ) { 1098 $formatted = esc_html( (string) $value ); 1099 } else { 1100 // Fallback to escaped plain string. 1101 $formatted = esc_html( (string) $value ); 1102 } 1103 1104 return $formatted; 1105 } 1060 1106 } 1061 1107 } -
0-day-analytics/tags/3.7.6/css/admin/style.css
r3356328 r3378902 2746 2746 html.aadvana-darkskin #wpfooter { 2747 2747 color: #c3c4da !important; 2748 } 2749 2750 html.aadvana-darkskin .wp-list-table .toggle-row::before { 2751 color: #b0bbc6 !important; 2748 2752 } 2749 2753 -
0-day-analytics/tags/3.7.6/readme.txt
r3377720 r3378902 4 4 Tested up to: 6.8 5 5 Requires PHP: 7.4 6 Stable tag: 3.7. 56 Stable tag: 3.7.6 7 7 License: GPLv3 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 113 113 == Changelog == 114 114 115 = 3.7.6 = 116 Resolved bug with bulk actions thanks to @lucianwpwhite . UI improvements for mobile, implemented formatting in table view, based on the typo of the value. 117 115 118 = 3.7.5 = 116 119 Added logic to open records from tables without primary key - keep in mind that this is not universal and if 2 or more records are with the same data, there is no way to guess which one is actually being used. In general such tables should not exist as this shows serious lack of basic knowledge. -
0-day-analytics/trunk/advanced-analytics.php
r3377720 r3378902 11 11 * Plugin Name: 0 Day Analytics 12 12 * Description: Take full control of error log, crons, transients, plugins, requests, mails and DB tables. 13 * Version: 3.7. 513 * Version: 3.7.6 14 14 * Author: Stoil Dobrev 15 15 * Author URI: https://github.com/sdobreff/ … … 37 37 // Constants. 38 38 if ( ! defined( 'ADVAN_VERSION' ) ) { 39 define( 'ADVAN_VERSION', '3.7. 5' );39 define( 'ADVAN_VERSION', '3.7.6' ); 40 40 define( 'ADVAN_TEXTDOMAIN', '0-day-analytics' ); 41 41 define( 'ADVAN_NAME', '0 Day Analytics' ); -
0-day-analytics/trunk/classes/vendor/lists/class-crons-list.php
r3375318 r3378902 636 636 ?> 637 637 <script> 638 window.location.href = '<?php echo \esc_url ( $redirect ); ?>';638 window.location.href = '<?php echo \esc_url_raw( $redirect ); ?>'; 639 639 </script> 640 640 <?php … … 674 674 ?> 675 675 <script> 676 window.location.href = '<?php echo \esc_url ( $redirect ); ?>';676 window.location.href = '<?php echo \esc_url_raw( $redirect ); ?>'; 677 677 </script> 678 678 <?php -
0-day-analytics/trunk/classes/vendor/lists/class-wp-mail-list.php
r3375967 r3378902 1009 1009 ?> 1010 1010 <script> 1011 window.location.href = '<?php echo \esc_url ( $redirect ); ?>';1011 window.location.href = '<?php echo \esc_url_raw( $redirect ); ?>'; 1012 1012 </script> 1013 1013 <?php -
0-day-analytics/trunk/classes/vendor/lists/entity/class-common-table.php
r3377720 r3378902 477 477 * 478 478 * @return int bool 479 * 479 * 480 480 * @since latest 481 481 */ … … 603 603 604 604 return $array; 605 606 // return array_combine( $array, $array );607 605 } 608 606 … … 884 882 885 883 $wpdb->suppress_errors( true ); 886 $results = $wpdb->get_var( $sql ); 884 $results = $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 887 885 888 886 if ( '' !== $wpdb->last_error || null === $results ) { … … 920 918 $wpdb->suppress_errors( true ); 921 919 922 $results = $wpdb->get_results( $sql, \ARRAY_A ); 920 $results = $wpdb->get_results( $sql, \ARRAY_A ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 923 921 924 922 if ( '' !== $wpdb->last_error || null === $results ) { … … 992 990 993 991 $query = $wpdb->prepare( 994 'SELECT * FROM `' . self::get_name() . '` WHERE `' . self::get_real_id_name() . '` = %s;', 992 'SELECT * FROM `' . self::get_name() . '` WHERE `' . self::get_real_id_name() . '` = %s;', // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 995 993 $id 996 994 ); … … 998 996 $wpdb->suppress_errors( true ); 999 997 1000 $results = $wpdb->get_results( $query, \ARRAY_A ); 998 $results = $wpdb->get_results( $query, \ARRAY_A ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 1001 999 1002 1000 if ( '' !== $wpdb->last_error || null === $results ) { … … 1032 1030 <tr> 1033 1031 <td width="40%"><strong><?php echo \esc_html( $key ); ?></strong></td> 1034 <td><?php echo \esc_html( $value );?></td>1032 <td><?php echo ( self::format_value_for_html( $value ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td> 1035 1033 </tr> 1036 1034 <?php … … 1058 1056 } 1059 1057 } 1058 1059 /** 1060 * Formats the value for HTML output 1061 * 1062 * @param mixed $value - The value to be formatted. 1063 * 1064 * @return string 1065 * 1066 * @since latest 1067 */ 1068 private static function format_value_for_html( $value ) { 1069 // Try to decode JSON if it's a string. 1070 if ( is_string( $value ) ) { 1071 $decoded = json_decode( $value, true ); 1072 1073 // Handle valid JSON (objects or arrays). 1074 if ( json_last_error() === JSON_ERROR_NONE ) { 1075 $value = $decoded; 1076 } 1077 1078 // Try unserialize if not valid JSON but looks like serialized PHP. 1079 elseif ( preg_match( '/^[aOs]:[0-9]+:/', $value ) ) { 1080 $unserialized = @unserialize( $value ); 1081 if ( false !== $unserialized || 'b:0;' === $value ) { 1082 $value = $unserialized; 1083 } 1084 } 1085 } 1086 1087 // Format by type. 1088 if ( is_array( $value ) ) { 1089 // Pretty print arrays or objects. 1090 $formatted = '<pre>' . \esc_html( print_r( $value, true ) ) . '</pre>'; 1091 } elseif ( is_object( $value ) ) { 1092 $formatted = '<pre>' . \esc_html( print_r( $value, true ) ) . '</pre>'; 1093 } elseif ( is_bool( $value ) ) { 1094 $formatted = $value ? 'true' : 'false'; 1095 } elseif ( is_null( $value ) ) { 1096 $formatted = '<em>null</em>'; 1097 } elseif ( is_numeric( $value ) ) { 1098 $formatted = esc_html( (string) $value ); 1099 } else { 1100 // Fallback to escaped plain string. 1101 $formatted = esc_html( (string) $value ); 1102 } 1103 1104 return $formatted; 1105 } 1060 1106 } 1061 1107 } -
0-day-analytics/trunk/css/admin/style.css
r3356328 r3378902 2746 2746 html.aadvana-darkskin #wpfooter { 2747 2747 color: #c3c4da !important; 2748 } 2749 2750 html.aadvana-darkskin .wp-list-table .toggle-row::before { 2751 color: #b0bbc6 !important; 2748 2752 } 2749 2753 -
0-day-analytics/trunk/readme.txt
r3377720 r3378902 4 4 Tested up to: 6.8 5 5 Requires PHP: 7.4 6 Stable tag: 3.7. 56 Stable tag: 3.7.6 7 7 License: GPLv3 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 113 113 == Changelog == 114 114 115 = 3.7.6 = 116 Resolved bug with bulk actions thanks to @lucianwpwhite . UI improvements for mobile, implemented formatting in table view, based on the typo of the value. 117 115 118 = 3.7.5 = 116 119 Added logic to open records from tables without primary key - keep in mind that this is not universal and if 2 or more records are with the same data, there is no way to guess which one is actually being used. In general such tables should not exist as this shows serious lack of basic knowledge.
Note: See TracChangeset
for help on using the changeset viewer.