Opened 14 years ago
Closed 14 years ago
#16970 closed defect (bug) (fixed)
Remove PHP4 functionality from timezone selector code
Reported by: | Viper007Bond | Owned by: | |
---|---|---|---|
Milestone: | 3.2 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
All of the functions needed for the fancy timezone selector code are bundled with all versions of PHP since 5.2.0. This means we can deprecate wp_timezone_supported()
and remove all references to it in core as well as strip all of the PHP4 fallback code.
Attachments (3)
Change History (19)
#2
@
14 years ago
We were talking about this on IRC, so I thought I'd throw in my two cents:
The manual says There is no installation needed to use these functions; they are part of the PHP core. And the most recently added was in 5.2.0, so there's just no need for wp_timezone_supported()
anymore. I think it should just be deprecated and changed to return true (for plugins using it). Obviously we should clean up core accordingly.
For those that care, these are the functions that wp_timezone_supported()
checks for:
#3
@
14 years ago
The function contains a filter, so core - even the function deprecates - can not assume that it always returns true.
So the other code needs to stay in core. Until the function can be completely removed. (Which I suggest as the chance had been passed to deprecate this in 3.1 already in the know of the 3.2 php requirements commming.)
#5
follow-up:
↓ 6
@
14 years ago
What legitimate use-case would there be for adding a filter that returns false, in a PHP 5.2 context?
#6
in reply to:
↑ 5
@
14 years ago
Replying to scribu:
What legitimate use-case would there be for adding a filter that returns false, in a PHP 5.2 context?
No idea, I only hear "Backwards Compatibility". But don't ask me because I'm for removing this function entirely personally and so I can not see a reason at all.
@kawauso - functions could be disabled per ini (no idea which we need to check actually, in HTTP we check fopen but that's I/O related, so more or less informative)
#7
@
14 years ago
My opinion: Deprecate, kill the filter, return true, and kill all code that handles when wp_timezone_supported() is false.
#9
@
14 years ago
Patch: Deprecate, kill the filter, return true, kill all code that handles when wp_timezone_supported() is false and replace wp_timezone_supported() with TRUE, remove dead code then.
Related: #16920
#10
follow-up:
↓ 11
@
14 years ago
The patch looks fine. Does exactly what Alex and I had first discussed.
My issue is that Alex said he was going to do the patch since he hadn't contributed anything to core for a while. What was the purpose of uploading a patch less than an hour after he said he would? Did he ask you to (or did you ask him)? If not, couldn't you have focused your time on another ticket (just offering input on this one like everyone else did) instead of stepping on someone's toes like that?
#11
in reply to:
↑ 10
@
14 years ago
Replying to aaroncampbell:
The patch looks fine. Does exactly what Alex and I had first discussed.
My issue is that Alex said he was going to do the patch since he hadn't contributed anything to core for a while. What was the purpose of uploading a patch less than an hour after he said he would? Did he ask you to (or did you ask him)? If not, couldn't you have focused your time on another ticket (just offering input on this one like everyone else did) instead of stepping on someone's toes like that?
I never want to discourage someone from contributing. But among the more active contributors, there's a bit of informal code about things like this. Those who have commented to this ticket, we all have the ability (in terms of skill) to contribute to basically any ticket. When someone says they want to tackle something, I'd think it'd be common courtesy would be to at least circle back, oh, more than 25 minutes later. Chances are Alex was working on the patch at the time.
Given enough eyeballs, all bugs are shallow, but that doesn't mean it's a race or that duplicative efforts shouldn't be avoided when it isn't necessary. As Aaron says, certainly time could have been spent on another ticket.
Again, I never want to discourage contributions. If it was a newer contributor who posted a patch, I would not want this conversation to take place. But among us, let's have some mutual respect please?
#13
@
14 years ago
- Owner Viper007Bond deleted
- Status changed from accepted to assigned
Too slow I guess. :)
It's been a while since I contributed anything to core. I might as well take this on.