I noticed a minor item with respect to the use of Tidy on Windows machines.
Windows binaries for PHP usually include Tidy by default. Unlike other OS versions, the Windows users don't take an active role in including or excluding Tidy.
In DefaultSettings.php for version 1.12 (looking ahead a bit), I noticed that the global for internal Tidy is set by testing for the inclusion of the internal Tidy extension in PHP. Parser.php will perform a check on whether internal Tidy is available and selects that in preference to external Tidy. Hence, if LocalSettings.php is set to use Tidy, it gets internal Tidy by default.
If the admin doesn't realize that internal Tidy is in PHP and/or prefers to use external Tidy (for whatever reason), he will be surprised that external is not used unless he explicitly resets the internal Tidy flag to false.
Personally, I find this a "surprising" default setting. I would expect the internal Tidy flag to be false by default.
I haven't put this in as a bug, since I'd prefer to see if others think this is not an issue.
PS - since internal Tidy has been knackered in Parser.php from 1.7 to 1.11 inclusive (it only had PHP4 functions), I assume that internal Tidy is not something most developers/admins think much about. Hence this change in Parser.php for 1.12 might not have been thought out in terms of all OSes being used.
Mike
Michael Daly wrote:
I noticed a minor item with respect to the use of Tidy on Windows machines.
Windows binaries for PHP usually include Tidy by default. Unlike other OS versions, the Windows users don't take an active role in including or excluding Tidy.
In DefaultSettings.php for version 1.12 (looking ahead a bit), I noticed that the global for internal Tidy is set by testing for the inclusion of the internal Tidy extension in PHP. Parser.php will perform a check on whether internal Tidy is available and selects that in preference to external Tidy. Hence, if LocalSettings.php is set to use Tidy, it gets internal Tidy by default.
If the admin doesn't realize that internal Tidy is in PHP and/or prefers to use external Tidy (for whatever reason), he will be surprised that external is not used unless he explicitly resets the internal Tidy flag to false.
Personally, I find this a "surprising" default setting. I would expect the internal Tidy flag to be false by default.
I haven't put this in as a bug, since I'd prefer to see if others think this is not an issue.
PS - since internal Tidy has been knackered in Parser.php from 1.7 to 1.11 inclusive (it only had PHP4 functions), I assume that internal Tidy is not something most developers/admins think much about. Hence this change in Parser.php for 1.12 might not have been thought out in terms of all OSes being used.
I only really considered Windows when I made this change, so I'm not sure why you think it's anti-Windows. Is there some problem with php_tidy.dll that I don't know about? I've been using without any problems.
The internal tidy works out of the box on Windows. The external tidy will typically need configuration of $wgTidyBin. Why do you think it's more surprising to use the reliable internal tidy than to ignore it and fail due to a missing external tidy?
-- Tim Starling
Tim Starling wrote:
Is there some problem with php_tidy.dll that I don't know about? I've been using without any problems.
No, it works fine.
The internal tidy works out of the box on Windows. The external tidy will typically need configuration of $wgTidyBin. Why do you think it's more surprising to use the reliable internal tidy than to ignore it and fail due to a missing external tidy?
I don't. I think it's surprising that internal Tidy is enabled by default and one has to dig through Parser.php and DefaultSettings.php to figure out why enabling an external Tidy doesn't work. For *nix installations, it's not a default - the admin has to set up Tidy in the PHP install by compiling in the Tidy bits. If you install plain vanilla versions for one Windows and one *nix wiki, you get two different default behaviours - Windows gets internal Tidy and *nix doesn't.
Versions ? to 1.6 got internal Tidy with PHP4 and no Tidy with PHP5. 1.7 to 1.11 got no Tidy by default (and required a code fix by the admin in Parser.php to get it working) and now 1.12 gets Tidy by default again. To be consistent with the previous several versions, I think that $wginternalTidy should default to false.
Mike
mediawiki-l@lists.wikimedia.org