On 22/11/06, simetrical(a)svn.wikimedia.org <simetrical(a)svn.wikimedia.org> wrote:
> * Put AOL proxy IPs in whitelist, and also one from Singapore that was troublesome on enwiki (more should be added, probably?)
We should probably *not* specify our custom whitelist in the default
distribution. Those AOL IPs could be useful for other site admins, and
should be listed in, e.g. docs/autoblocker.txt (which might be a nice
place to put some rewritten documentation on the changed autoblocker).
This has the downside that local admins on Wikimedia wikis will need
to sort out their lists, but it might be better if we let local
communities sort that out; bung the AOL ones somewhere accessible.
Bit of a problem either way. :|
Rob Church
rotem(a)svn.wikimedia.org wrote:
> Reverting the addition of class names near
> the parameters: it doesn't seem to have a purpose, and breaks PHP
> 5.0.4 on my computer (PHP raises error when the parameters are set to
> null).
For reference, as of PHP 5 you can specify type requirements on function
parameters, to enforce that objects of the correct type are passed.
Unfortunately this is pretty limited; you can't allow 'type-X-or-null'
or other such conditions, nor I think can you specify non-object types.
Of course it's a runtime check, not compile-time, so probably doesn't
tell you anything that you wouldn't get from the fatal error trying to
call a nonexistent method. ;).
[I often wish that you *could* enforce type-X-and-not-null in languages
like Java at compile-time, though...]
http://www.php.net/manual/en/language.oop5.typehinting.php
-- brion vibber (brion @ pobox.com)
On 23/11/06, werdna(a)svn.wikimedia.org <werdna(a)svn.wikimedia.org> wrote:
> (bug 8013) Add autosummary for new pages with >500 characters. I would merge this with the original short new page autosummary, but this would break current message customisations on other wikis. en.wp comes to mind.
If merging the two messages into one under a new name makes sense now,
then do it. Existing message customisations can be renamed.
Rob Church
Few initialization / can-we-delete-this questions, if anyone can shed any light on them:
-------------------------------------------
Line 2136 of includes/User.php, $expiration is not defined:
$url = $this->confirmationTokenUrl( $expiration );
-------------------------------------------
Line 427 of inclides\MimeMagic.php, $script does not seem to be used, so can this line be deleted? :
if (preg_match('%/?([^\s]+/)(w+)%sim',$head,$match)) $script= $match[2];
-------------------------------------------
Line 59 of includes/SpecialRecentChanges.php - $options is not defined, and doesn't seem to be used, so any reason to keep this:
# As a feed, use limited settings only
if( $feedFormat ) {
global $wgFeedLimit;
if( $limit > $wgFeedLimit ) {
$options['limit'] = $wgFeedLimit;
}
}
-------------------------------------------
Line 652 of includes\ImagePage.php, any reason to keep this, as $size does not seem to be used:
$dbr =& wfGetDB( DB_SLAVE );
$size = $dbr->selectField( 'oldimage', 'oi_size', array( 'oi_archive_name' => $oldimage ) );
-------------------------------------------
Line 75 of includes\SpecialRevisiondelete.php, any reason this line can't be deleted, as $bitfields isn't used or declared :
$bitfields[] = $rev->mDeleted; // FIXME
-------------------------------------------
All the best,
Nick.
> Mark Clements wrote:
>> Is there a reason why replies to mediawiki-cvs are coming to wikitech-l
>> suddenly? Or has that always been the case and up until now there just
>> haven't been any replies?
It's always been the case, but there haven't been many generally. I've
started commenting more frequently lately, as we've got some noobs on
board and it's I think a good chance to illustrate points.
Tim Starling wrote:
> I usually send my comments directly to the developer. It saves
> embarrassment, although of course it reduces the benefit to other developers.
Indeed, my purpose is pedagogical. It's I hope good for both the other
noobs and old fogies too. Don't feel singled out, Simetrical! :)
-- brion vibber (brion @ pobox.com)
is there some variable to be able to input raw php into the edit box??
for example,
I have the raw html variable enabled...
and <html></html> seem to work fine
I have tried..
<html><?php echo "hello"; ?></html>
but does not seem to do the trick...
Any ideas?
thank you
An automated run of parserTests.php showed the following failures:
Reading tests from "/home/brion/src/wiki/phase3/maintenance/parserTests.txt"...
Running test TODO: Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)... FAILED!
Running test TODO: Link containing double-single-quotes '' (bug 4598)... FAILED!
Running test TODO: Template with thumb image (with link in description)... FAILED!
Running test TODO: message transform: <noinclude> in transcluded template (bug 4926)... FAILED!
Running test TODO: message transform: <onlyinclude> in transcluded template (bug 4926)... FAILED!
Running test BUG 1887, part 2: A <math> with a thumbnail- math enabled... FAILED!
Running test TODO: HTML bullet list, unclosed tags (bug 5497)... FAILED!
Running test TODO: HTML ordered list, unclosed tags (bug 5497)... FAILED!
Running test TODO: HTML nested bullet list, open tags (bug 5497)... FAILED!
Running test TODO: HTML nested ordered list, open tags (bug 5497)... FAILED!
Running test TODO: Parsing optional HTML elements (Bug 6171)... FAILED!
Running test TODO: Inline HTML vs wiki block nesting... FAILED!
Running test TODO: Mixing markup for italics and bold... FAILED!
Running test TODO: 5 quotes, code coverage +1 line... FAILED!
Running test TODO: dt/dd/dl test... FAILED!
Running test TODO: Images with the "|" character in the comment... FAILED!
Running test TODO: Parents of subpages, two levels up, without trailing slash or name.... FAILED!
Running test TODO: Parents of subpages, two levels up, with lots of extra trailing slashes.... FAILED!
Running test TODO: Don't fall for the self-closing div... FAILED!
Running test TODO: Always escape literal '>' in output, not just after '<'... FAILED!
Reading tests from "/home/brion/src/wiki/phase3/extensions/Cite/citeParserTests.txt"...
Passed 449 of 469 tests (95.74%)... FAILED!
b> ------- Additional Comments From brion(a)pobox.com 2006-11-16 15:52 UTC -------
b> There would not be any right column if there are no style sheets.
b> If there is, maybe it's specific to your custom
b> skin, which you'll have to debug yourself.
Nope, in WWWOFFLE I only allowed
http://kb.mozillazine.org/Editing_configuration/Troubleshooting
the one single page thru, and confirmed with tcpflow that all the
other pages were not allowed to reach firefox, running with caching
disabled.
The last letters of "Editing configuration/Troubleshooting" overwrite
the right column. Even with javascript disabled the overwriting
happens.
Changing the
<table width="100%" cellpadding="7" cellspacing="0" style="table-layout: fixed">
to just
<table>
fixes it.
Not sure who to blame.
Hi,
We're having an issue with anonymous editors not seeing their edits
right away when the page is saved. Usually after refreshing a few
times they appear, but not after. We're using Squid with a few backend
apaches, is there a configuration setting to fix this, and if so, does
it adversely affect performance?
Thanks,
Travis
On 22/11/06, werdna(a)svn.wikimedia.org <werdna(a)svn.wikimedia.org> wrote:
> Revision: 17847
> Author: werdna
> Date: 2006-11-22 03:51:49 -0800 (Wed, 22 Nov 2006)
>
> Log Message:
> -----------
> * (bug 7883) Added autoblock whitelisting feature, using which specific ranges can be protected from autoblocking. These ranges are specified, in list format, in the autoblock_whitelist system message.
Is this the best place for this to be specified?
> +* (bug 7883) Added autoblock whitelisting feature, using which specific ranges
> + can be protected from autoblocking. These ranges are specified, in list format,
> + in the autoblock_whitelist system message.
Nice and verbose. :D
> + $wlEntry = substr($line, 1);
> + $wlEntry = trim($wlEntry);
Investigate the trim() parameters a bit more, this should be able to
be cut down to one line.
> +/**
> + * Get the start and end of a range.
> + * @param $range The range to get the start and end for.
> + * @return array An array with the first element as the start of the range, as a long, and the second element as the end of the range, also as a long.
> + *
> + */
> +function wfRangeStartEnd( $range ) {
> + list( $network, $bits ) = wfParseCIDR( $range );
> + if ( $network !== false ) {
> + $start = sprintf( '%08X', $network );
> + $end = sprintf( '%08X', $network + (1 << (32 - $bits)) - 1 );
> + return array($start, $end);
> + }
> + return false;
> +}
Wouldn't a better place for this be as a static function of the IP
class? (And isn't wfParseCIDR deprecated in favour of such a
function?)
> +/**
> + * Determine if a given integer IPv4 address is in a given CIDR network
> + * @param $addr The address to check against the given range.
> + * @param $range The range to check the given address against.
> + * @return bool Whether or not the given address is in the given range.
> + */
> +function wfIsAddressInRange( $addr, $range ) {
> + $unsignedIP = IP::toUnsigned($addr);
> + $startend = wfRangeStartEnd($range);
> + $start = $startend[0];
> + $end = $startend[1];
> +
> + return (($unsignedIP >= $start) && ($unsignedip <= $end));
> +}
Ditto above.
Rob Church