Skip to content

Commit b892e8d

Browse files
author
joaoraposo
committed
refactor: update comments for WP query warnings
1 parent f7e02bc commit b892e8d

File tree

7 files changed

+40
-7
lines changed

7 files changed

+40
-7
lines changed

trunk/HDB.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
* Network: True
1313
*/
1414

15-
// Fixes a security issue mentioned in the email
15+
// Custom tables used exclusively by this plugin and for infrequent operations (backup)
16+
// phpcs:disable WordPress.DB
17+
18+
// Fixes a security issue
1619
if( !defined( 'ABSPATH' ) ){ exit(); }
1720

1821
// Main folder of the plugin
@@ -825,7 +828,7 @@ function get_all_saves() {
825828
) );
826829
} );
827830

828-
831+
// phpcs:enable WordPress.DB
829832

830833
// Admin page
831834
function hejbit_savetonextcloud_param(){?>

trunk/inc/CleanSave.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
Cleaning up obsolete backups for HejBit Decentralised Backup.
55
**/
66

7-
// Fixes a security issue mentioned in the email
7+
// Custom tables used exclusively by this plugin and for infrequent operations (backup)
8+
// phpcs:disable WordPress.DB
9+
10+
// Fixes a security issue
811
if( !defined( 'ABSPATH' ) ){ exit(); }
912

1013
// Get the dynamic limit value from options and cast it to an integer
@@ -72,4 +75,6 @@
7275
foreach ($filesInFtp as $file) {
7376
wp_delete_file($file);
7477
}
78+
79+
// phpcs:enable WordPress.DB
7580
?>

trunk/inc/CreateDB.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
This file is used to create a file on the FTP containing the database script for HejBit Decentralised Backup.
55
**/
66

7-
// Fixes a security issue mentioned in the email
7+
// Custom tables used exclusively by this plugin and for infrequent operations (backup)
8+
// phpcs:disable WordPress.DB
9+
10+
// Fixes a security issue
811
if( !defined( 'ABSPATH' ) ){ exit(); }
912

1013
// Load the WordPress filesystem
@@ -131,4 +134,5 @@
131134
// Launch the next step
132135
wp_schedule_single_event(time(), 'hejbit_SaveInProgress');
133136

137+
// phpcs:enable WordPress.DB
134138
?>

trunk/inc/CreateZip.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
/**
44
Creation of partial Zip files for HejBit Decentralised Backup.
55
**/
6+
7+
// Custom tables used exclusively by this plugin and for infrequent operations (backup)
8+
// phpcs:disable WordPress.DB
9+
10+
// Fixes a security issue
611
if( !defined( 'ABSPATH' ) ){ exit(); }
712

813
// Listing of files to back up with exclusion of cache folders
@@ -107,4 +112,6 @@ function ($file, $key, $iterator) {
107112

108113
// Launch the next step
109114
wp_schedule_single_event(time(),'hejbit_SaveInProgress');
115+
116+
// phpcs:enable WordPress.DB
110117
?>

trunk/inc/MergeChunk.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
The query gathers all the pieces of the tar (chunks) into a tar file in NextCloud for HejBit Decentralised Backup.
55
**/
66

7-
// Fix a security issue mentioned in the email
8-
if(!defined( 'ABSPATH' )){exit();}
7+
// Custom tables used exclusively by this plugin and for infrequent operations (backup)
8+
// phpcs:disable WordPress.DB
9+
10+
// Fixes a security issue
11+
if( !defined( 'ABSPATH' ) ){ exit(); }
912

1013
// Check the destination folder
1114
// Retrieves the folders from the path into an array
@@ -112,4 +115,5 @@
112115
// Cleaning up the backups
113116
include ('CleanSave.php');
114117

118+
// phpcs:enable WordPress.DB
115119
?>

trunk/inc/MergeZip.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
Merge the files to be backed up into a single Zip for HejBit Decentralised Backup.
55
**/
66

7+
// Custom tables used exclusively by this plugin and for infrequent operations (backup)
8+
// phpcs:disable WordPress.DB
9+
10+
// Fixes a security issue
711
if( !defined( 'ABSPATH' ) ){ exit(); }
812

913
// Create the Zip archive
@@ -56,4 +60,5 @@
5660
// Schedule the next step of the backup process
5761
wp_schedule_single_event(time(),'hejbit_SaveInProgress');
5862

63+
// phpcs:enable WordPress.DB
5964
?>

trunk/inc/SendChunk.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
This file allows sending file chunks to NextCloud for HejBit Decentralised Backup.
55
**/
66

7-
// Fix a security issue mentioned in the email
7+
// Custom tables used exclusively by this plugin and for infrequent operations (backup)
8+
// phpcs:disable WordPress.DB
9+
10+
// Fixes a security issue
811
if( !defined( 'ABSPATH' ) ){ exit(); }
912

1013
// Initialize WP_Filesystem
@@ -100,4 +103,6 @@
100103

101104
// Start the next step if no chunk was read
102105
wp_schedule_single_event(time(),'hejbit_SaveInProgress');
106+
107+
// phpcs:enable WordPress.DB
103108
?>

0 commit comments

Comments
 (0)