Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#58372 closed defect (bug) (fixed)

Improve formatting of some SQL queries for readability

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

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

Download all attachments as: .zip

Change History (10)

@umeshmcakadi
3 years ago

#1 @mukesh27
3 years ago

  • Version 6.2.1

Hi there! thanks for ticket and patch!

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

#2 @umeshmcakadi
3 years ago

Hi @mukesh27,

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

Thanks

Last edited 3 years ago by umeshmcakadi (previous) (diff)

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

#5 @dhrumilk
3 years ago

  • Keywords has-patch added

#6 @SergeyBiryukov
3 years ago

  • Component ExportDatabase
  • Milestone Awaiting Review6.3
  • Summary Code FormatImprove 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
3 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

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.