Make WordPress Core

Opened 2 weeks ago

Closed 13 days ago

#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 2 weeks ago.
wp_prepare_code_format.diff (3.0 KB) - added by umeshmcakadi 2 weeks ago.
58372.diff (3.5 KB) - added by umeshmcakadi 2 weeks ago.

Download all attachments as: .zip

Change History (10)

@umeshmcakadi
2 weeks ago

#1 @mukesh27
2 weeks 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
2 weeks ago

Hi @mukesh27,

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

Thanks

Last edited 2 weeks ago by umeshmcakadi (previous) (diff)

#3 follow-up: @krupalpanchal
2 weeks 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
2 weeks 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
2 weeks ago

#5 @dhrumilk
2 weeks ago

  • Keywords has-patch added

#6 @SergeyBiryukov
2 weeks 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
13 days 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.