Opened 16 years ago
Closed 16 years ago
#10186 closed enhancement (wontfix)
Add global $server_version
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8 |
Component: | General | Keywords: | has-patch tested |
Focuses: | Cc: |
Description
A number of workarounds/features are specific to IIS in WordPress Core. However, some workarounds/features apply to certain IIS versions only. I suggest adding a global $iis_version.
Attachments (1)
Change History (13)
#2
@
16 years ago
I was thinking of that for browsers as well, Ie, If Opera is >= 10, or IE 5 or 6.. etc..
#3
@
16 years ago
However, it is possible that some fcuntion may be checking those $is_ variables as boolean. I am afraid that changing them to version numbers may break compatibility with them.
What do you think?
#5
@
16 years ago
What do you think?
I think its possible. However, a point that we dont need to worry about.
$version = 10.4; var_dump( $version == true );
true
PHP will evaluate anything non-false/null/zero to be true in the above example.
(Of course, $version === true would be false, But thats going to be rarely used, a triple check along with a true.. most people are just going to do if($iis)
#6
@
16 years ago
If it was a problem, Introducing a new variable for it for future..
$apache = apache_version(); $iis = iis_version();
leaving $is_... alone for back compat
#7
@
16 years ago
- Summary changed from Add global $iis_version to Add global $server_version
I have uploaded a new patch that generates $server_version instead of $iis_version.
#9
@
16 years ago
- Milestone 2.9 deleted
- Resolution set to wontfix
- Status changed from new to closed
I think we should move away from referencing versions completely.
We should be working on capabilities not versions.
The current implementation of IIS7 specific stuff will break as soon as IIS8 is used even if it supports everything that is required because we check explicitly for 7.
I don't think we should be making globals available with version numbers of things like this in them and so I am going to close this ticket.
#10
@
16 years ago
- Resolution wontfix deleted
- Status changed from closed to reopened
However, the server version number is required for fixing #10186, and we will also need to care IIS URL_Rewirte when IIS 8 is released. I think adding global $server_version is useful.
#12
@
16 years ago
- Resolution set to wontfix
- Status changed from reopened to closed
We should not create globals with server version in.
It encourages checks to be made that should be better made on capabilities.
If we need a capabilite check like iis_supports_rewrites that could have to check a version but the version extraction should be encapsulated where it is used not stored in a global to encourage miss-use.
The other option, is to change the $is_* variables to the version (if known).
ie.