Skip to content

Commit 0ddea3e

Browse files
committed
Work in progress.
1 parent 9b11df0 commit 0ddea3e

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

core/main/Info.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ public static function mysql_database() : array {
219219
$data = wp_cache_get( 'gd-press-tools', 'database' );
220220

221221
if ( $data === false ) {
222-
$sql = debugpress_db()->wpdb()->prepare( "SELECT table_schema, COUNT(*) as tables_count, SUM(data_length + index_length) AS data_size, SUM(data_free) AS free_space, SUM(table_rows) AS rows_count FROM information_schema.TABLES WHERE table_schema = %s GROUP BY table_schema", DB_NAME );
223-
$raw = debugpress_db()->wpdb()->get_row( $sql );
222+
$sql = debugpress_db()->wpdb()->prepare( "SELECT table_schema, COUNT(*) as tables_count, SUM(data_length + index_length) AS data_size, SUM(data_free) AS free_space, SUM(table_rows) AS rows_count FROM information_schema.TABLES WHERE table_schema = %s GROUP BY table_schema", DB_NAME ); // phpcs:ignore WordPress.DB.PreparedSQL
223+
$raw = debugpress_db()->wpdb()->get_row( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL
224224

225225
$data = array(
226226
'tables' => absint( $raw->tables_count ),
@@ -263,8 +263,8 @@ public static function mysql_wordpress() : array {
263263
$data = wp_cache_get( 'database', 'debugpress' );
264264

265265
if ( $data === false ) {
266-
$sql = debugpress_db()->wpdb()->prepare( "SELECT table_schema, COUNT(*) as tables_count, SUM(data_length + index_length) AS data_size, SUM(data_free) AS free_space, SUM(table_rows) AS rows_count FROM information_schema.TABLES WHERE table_schema = %s AND table_name like '" . debugpress_db()->wpdb()->base_prefix . "%' GROUP BY table_schema", DB_NAME );
267-
$raw = debugpress_db()->wpdb()->get_row( $sql );
266+
$sql = debugpress_db()->wpdb()->prepare( "SELECT table_schema, COUNT(*) as tables_count, SUM(data_length + index_length) AS data_size, SUM(data_free) AS free_space, SUM(table_rows) AS rows_count FROM information_schema.TABLES WHERE table_schema = %s AND table_name like '" . debugpress_db()->wpdb()->base_prefix . "%' GROUP BY table_schema", DB_NAME ); // phpcs:ignore WordPress.DB.PreparedSQL
267+
$raw = debugpress_db()->wpdb()->get_row( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL
268268

269269
$data = array(
270270
'tables' => absint( $raw->tables_count ?? 0 ),

core/printer/kint/load.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ function debugpress_rx( $value, $footer = true ) : string {
4949
Kint::$display_called_from = false;
5050
}
5151

52-
$show = @Kint::dump( $value );
52+
// The only way for Kint Dump method to return value, and not echo it, is with @ modifier
53+
$show = @Kint::dump( $value ); // phpcs:ignore WordPress.PHP.NoSilencedErrors
5354

5455
if ( ! $footer ) {
5556
Kint::$display_called_from = true;

debugpress.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Author: Milan Petrovic
77
* Author URI: https://www.dev4press.com/
88
* Text Domain: debugpress
9-
* Version: 3.8.1
9+
* Version: 3.8.2
1010
* Requires at least: 5.5
1111
* Tested up to: 6.5
1212
* Requires PHP: 7.4
@@ -33,7 +33,7 @@
3333
* along with this program. If not, see <http://www.gnu.org/licenses/>
3434
*/
3535

36-
const DEBUGPRESS_VERSION = '3.8.1';
36+
const DEBUGPRESS_VERSION = '3.8.2';
3737
const DEBUGPRESS_FILE = __FILE__;
3838
const DEBUGPRESS_PLUGIN_PATH = __DIR__ . '/';
3939

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contributors: GDragoN
33
Donate link: https://buymeacoffee.com/millan
44
Tags: dev4press, query monitor, debugging, development, ajax monitor
5-
Stable tag: 3.8.1
5+
Stable tag: 3.8.2
66
Requires at least: 5.5
77
Tested up to: 6.5
88
Requires PHP: 7.3
@@ -118,6 +118,9 @@ Yes. Once the popup is open, you will find the Layout icon next to the button to
118118
Open the WordPress 'Settings' menu, there you will find 'DebugPress' panel.
119119

120120
== Changelog ==
121+
= 3.8.2 (2024.04.29) =
122+
* Edit: few more updates and improvements
123+
121124
= 3.8.1 (2024.04.27) =
122125
* Edit: replacement of some native with WordPress functions
123126
* Edit: various small updates and tweaks

0 commit comments

Comments
 (0)