Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#16745 closed enhancement (wontfix)

doubled replace in setup_postdata

Reported by: hakre's profile hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:

Attachments (4)

16745.patch (603 bytes) - added by hakre 14 years ago.
One off
16745.2.patch (749 bytes) - added by hakre 14 years ago.
Array'ed
16745.3.patch (1.4 KB) - added by hakre 14 years ago.
The "while we're at it" stop-by
16745.4.patch (1.4 KB) - added by hakre 14 years ago.
Same as prev but with #16746 fix

Download all attachments as: .zip

Change History (9)

@hakre
14 years ago

One off

@hakre
14 years ago

Array'ed

@hakre
14 years ago

The "while we're at it" stop-by

#1 @hakre
14 years ago

  • Type changed from defect (bug) to enhancement

@hakre
14 years ago

Same as prev but with #16746 fix

#2 @hakre
14 years ago

In case of fixing #16746, another patch has been attached as .3 would conflict merge with the fix in #16746.

Last edited 14 years ago by hakre (previous) (diff)

#3 follow-up: @garyc40
14 years ago

I'm sorry, but, what?

Could you write a better description for this ticket? And what do your patches have anything to do with the URL you posted?

#4 in reply to: ↑ 3 @hakre
13 years ago

Replying to garyc40:

I'm sorry, but, what?

Could you write a better description for this ticket?

The patches are rather trivial so I thought self explanatory:

If you first replace BA with A and then replace AB with A then there is no need to replace BAB with A as a third replace variant upfront.

Next to that, you can make use of arrays to replace multiple needles at once.

And what do your patches have anything to do with the URL you posted?

The URL was just informative, if you visit that address you will see the sourcecode of function setup_postdata() this ticket is about.

#5 @dd32
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Although the first case IS covered by the 2nd case running, and then the 3rd case running, the current code is much more explicit in what it's doing.

Since there's no significant performance alterations between using multiple calls, vs, an array notation, lets keep it explicitly ordered.

Note: See TracTickets for help on using tickets.