Make WordPress Core

#58372 closed defect (bug) (fixed)

Improve formatting of some SQL queries for readability

Reported by: umeshmcakadi's profile umeshmcakadi Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.3 Priority: normal
Severity: minor Version:
Component: Database Keywords: has-patch
Focuses: administration, coding-standards Cc:

Description

In wp-admin/export.php in function export_date_options query should be in more readable format for that it must be start in the same line we use the double quote. Please see my patch file for that.

Attachments (3)

export.diff (697 bytes) - added by umeshmcakadi 16 months ago.
wp_prepare_code_format.diff (3.0 KB) - added by umeshmcakadi 16 months ago.
58372.diff (3.5 KB) - added by umeshmcakadi 16 months ago.

Download all attachments as: .zip

Change History (10)

#1 @mukesh27
16 months ago

  • Version 6.2.1 deleted

Hi there! thanks for ticket and patch!

Can you check other instance of query format and correct it in single patch?

#2 @umeshmcakadi
16 months ago

Hi @mukesh27,

I have uploaded another patch file named wp_prepare_code_format.diff for all possible fix for this.

Thanks

Last edited 16 months ago by umeshmcakadi (previous) (diff)

#3 follow-up: @krupalpanchal
16 months ago

Hi @umeshmcakadi

Welcome to core trac.

There are two more instances found in the user.php file on L1272 & L1303. Also, check once again if you find other instances and update in the patch.

#4 in reply to: ↑ 3 @umeshmcakadi
16 months ago

Okay I will check for that as well and add patch again
Replying to krupalpanchal:

Hi @umeshmcakadi

Welcome to core trac.

There are two more instances found in the user.php file on L1272 & L1303. Also, check once again if you find other instances and update in the patch.

@umeshmcakadi
16 months ago

#5 @dhrumilk
16 months ago

  • Keywords has-patch added

#6 @SergeyBiryukov
16 months ago

  • Component changed from Export to Database
  • Milestone changed from Awaiting Review to 6.3
  • Summary changed from Code Format to Improve formatting of some SQL queries for readability

Hi there, welcome to WordPress Trac! Thanks for the ticket, moving to 6.3 for review.

Updating the component, as it's not only about wp-admin/export.php now.

#7 @SergeyBiryukov
16 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 55857:

Coding Standards: Improve formatting of some SQL queries for better readability.

This corrects the placement of double quotes around the query and makes sure the alignment is consistent.

Props umeshmcakadi, mukesh27, krupalpanchal, dhrumilk, SergeyBiryukov.
Fixes #58372.

Note: See TracTickets for help on using tickets.