Index: branches/liquidthreads/maintenance/changeuser.sql |
— | — | @@ -1,12 +0,0 @@ |
2 | | -set @oldname = 'At18'; |
3 | | -set @newname = 'Alfio'; |
4 | | - |
5 | | -update low_priority /*$wgDBprefix*/user set user_name=@newname where user_name=@oldname; |
6 | | -update low_priority /*$wgDBprefix*/user_newtalk set user_ip=@newname where user_ip=@oldname; |
7 | | -update low_priority /*$wgDBprefix*/cur set cur_user_text=@newname where cur_user_text=@oldname; |
8 | | -update low_priority /*$wgDBprefix*/old set old_user_text=@newname where old_user_text=@oldname; |
9 | | -update low_priority /*$wgDBprefix*/archive set ar_user_text=@newname where ar_user_text=@oldname; |
10 | | -update low_priority /*$wgDBprefix*/ipblocks set ipb_address=@newname where ipb_address=@oldname; |
11 | | -update low_priority /*$wgDBprefix*/oldimage set oi_user_text=@newname where oi_user_text=@oldname; |
12 | | -update low_priority /*$wgDBprefix*/recentchanges set rc_user_text=@newname where rc_user_text=@oldname; |
13 | | - |
Index: branches/liquidthreads/skins/common/images/spinner.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: branches/liquidthreads/docs/hooks.txt |
— | — | @@ -650,6 +650,10 @@ |
651 | 651 | $user: user that watched |
652 | 652 | $article: article object that was watched |
653 | 653 | |
| 654 | +'UserGetRights': Called in User::getRights() |
| 655 | +$user: User to get rights for |
| 656 | +&$rights: Current rights |
| 657 | + |
654 | 658 | 'UserEffectiveGroups': Called in User::getEffectiveGroups() |
655 | 659 | $user: User to get groups for |
656 | 660 | &$groups: Current effective groups |
Index: branches/liquidthreads/tests/SanitizerTest.php |
— | — | @@ -1,49 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -class SanitizerTest extends PHPUnit_Framework_TestCase { |
5 | | - function testDecodeNamed() { |
6 | | - $this->assertEquals( |
7 | | - "\xc3\xa9cole", |
8 | | - Sanitizer::decodeCharReferences( 'école' ) ); |
9 | | - } |
10 | | - |
11 | | - function testDecodeNumbered() { |
12 | | - $this->assertEquals( |
13 | | - "\xc4\x88io bonas dans l'\xc3\xa9cole!", |
14 | | - Sanitizer::decodeCharReferences( "Ĉio bonas dans l'école!" ) ); |
15 | | - } |
16 | | - |
17 | | - function testDecodeMixed() { |
18 | | - $this->assertEquals( |
19 | | - "\xc4\x88io bonas dans l'\xc3\xa9cole!", |
20 | | - Sanitizer::decodeCharReferences( "Ĉio bonas dans l'école!" ) ); |
21 | | - } |
22 | | - |
23 | | - function testDecodeMixedComplex() { |
24 | | - $this->assertEquals( |
25 | | - "\xc4\x88io bonas dans l'\xc3\xa9cole! (mais pas Ĉio dans l'école)", |
26 | | - Sanitizer::decodeCharReferences( "Ĉio bonas dans l'école! (mais pas &#x108;io dans l'&eacute;cole)" ) ); |
27 | | - } |
28 | | - |
29 | | - function testDecodeInvalidAmp() { |
30 | | - $this->assertEquals( |
31 | | - "a & b", |
32 | | - Sanitizer::decodeCharReferences( "a & b" ) ); |
33 | | - } |
34 | | - |
35 | | - function testDecodeInvalidNamed() { |
36 | | - $this->assertEquals( |
37 | | - "&foo;", |
38 | | - Sanitizer::decodeCharReferences( "&foo;" ) ); |
39 | | - } |
40 | | - |
41 | | - function testDecodeInvalidNumbered() { |
42 | | - $this->assertEquals( |
43 | | - UTF8_REPLACEMENT, |
44 | | - Sanitizer::decodeCharReferences( "�" ) ); |
45 | | - } |
46 | | - |
47 | | - /* TODO: many more! */ |
48 | | -} |
49 | | - |
50 | | - |
Index: branches/liquidthreads/includes/User.php |
— | — | @@ -1595,6 +1595,7 @@ |
1596 | 1596 | function getRights() { |
1597 | 1597 | if ( is_null( $this->mRights ) ) { |
1598 | 1598 | $this->mRights = self::getGroupPermissions( $this->getEffectiveGroups() ); |
| 1599 | + wfRunHooks( 'UserGetRights', array( $this, &$this->mRights ) ); |
1599 | 1600 | } |
1600 | 1601 | return $this->mRights; |
1601 | 1602 | } |
Index: branches/liquidthreads/includes/Hooks.php |
— | — | @@ -130,7 +130,9 @@ |
131 | 131 | } else { |
132 | 132 | $prettyFunc = strval( $callback ); |
133 | 133 | } |
134 | | - throw new MWException( "Invalid NULL return from broken hook $prettyFunc" ); |
| 134 | + throw new MWException( "Detected bug in an extension! " . |
| 135 | + "Hook $prettyFunc failed to return a value; " . |
| 136 | + "should return true to continue hook processing or false to abort." ); |
135 | 137 | } else if (!$retval) { |
136 | 138 | return false; |
137 | 139 | } |
Index: branches/liquidthreads/t/maint/bom.t |
— | — | @@ -14,14 +14,12 @@ |
15 | 15 | use Test::More; |
16 | 16 | |
17 | 17 | use File::Find; |
18 | | -use File::Slurp qw< slurp >; |
19 | 18 | |
20 | 19 | # Files for wich we want to check the BOM char ( 0xFE 0XFF ) |
21 | 20 | my $ext = qr/(?:php|inc)/x ; |
22 | 21 | |
23 | 22 | my $bomchar = qr/\xef\xbb\xbf/ ; |
24 | 23 | |
25 | | - |
26 | 24 | my @files; |
27 | 25 | |
28 | 26 | find( sub{ push @files, $File::Find::name if -f && /\.$ext$/ }, '.' ); |
— | — | @@ -30,10 +28,11 @@ |
31 | 29 | plan tests => scalar @files ; |
32 | 30 | |
33 | 31 | for my $file (@files) { |
34 | | - my $content = slurp $file ; |
35 | | - if( $content =~ /$bomchar/ ) { |
36 | | - fail "$file got a Byte Order Mark"; |
| 32 | + open my $fh, "<", $file or die "Couln't open $file: $!"; |
| 33 | + my $line = <$fh>; |
| 34 | + if( $line =~ /$bomchar/ ) { |
| 35 | + fail "$file has a Byte Order Mark at line $."; |
37 | 36 | } else { |
38 | | - pass "$file BOM less"; |
| 37 | + pass "$file has no Byte Order Mark!"; |
39 | 38 | } |
40 | 39 | } |
Index: branches/liquidthreads/t/maint/unix-newlines.t |
— | — | @@ -5,23 +5,28 @@ |
6 | 6 | use Test::More;; |
7 | 7 | |
8 | 8 | use File::Find; |
9 | | -use File::Slurp qw< slurp >; |
10 | | -use Socket qw< $CRLF $LF >; |
| 9 | +use Socket '$CRLF'; |
11 | 10 | |
12 | 11 | my $ext = qr/(?: t | pm | sql | js | php | inc | xml )/x; |
13 | 12 | |
14 | 13 | my @files; |
15 | 14 | find( sub { push @files, $File::Find::name if -f && /\. $ext $/x }, '.' ); |
16 | 15 | |
17 | | -plan tests => scalar @files; |
| 16 | +plan 'no_plan'; |
18 | 17 | |
19 | 18 | for my $file (@files) { |
20 | | - my $cont = slurp $file; |
21 | | - if ( $cont and $cont =~ $CRLF ) { |
22 | | - pass "$file contains windows newlines"; |
23 | | - } else { |
24 | | - fail "$file is made of unix newlines and win"; |
25 | | - } |
| 19 | + open my $fh, "<", $file or die "Can't open $file: $!"; |
| 20 | + binmode $fh; |
| 21 | + |
| 22 | + my $ok = 1; |
| 23 | + while (<$fh>) { |
| 24 | + if (/$CRLF/) { |
| 25 | + fail "$file has \\r\\n on line $."; |
| 26 | + $ok = 0; |
| 27 | + } |
| 28 | + } |
| 29 | + |
| 30 | + pass "$file has only unix newlines" if $ok; |
26 | 31 | } |
27 | 32 | |
28 | 33 | |
Index: branches/liquidthreads/RELEASE-NOTES |
— | — | @@ -151,6 +151,7 @@ |
152 | 152 | inline, as in most browsers |
153 | 153 | * Pass the user as an argument to 'isValidPassword' hook callbacks; see |
154 | 154 | docs/hooks.txt for more information |
| 155 | +* Introduce 'UserGetRights' hook; see docs/hooks.txt for more information |
155 | 156 | |
156 | 157 | == Bugfixes since 1.10 == |
157 | 158 | |
— | — | @@ -316,6 +317,7 @@ |
317 | 318 | * (bug 10591) Use Arabic numerals (0,1,2...) for the Malayam language |
318 | 319 | * (bug 10642) Fix shift-click checkbox behavior for Opera 9.0+ and 6.0 |
319 | 320 | * Work around Safari bug with pages ending in ".gz" or ".tgz" |
| 321 | +* Removed obsolete maintenance/changeuser.sql script; use RenameUser extension |
320 | 322 | |
321 | 323 | |
322 | 324 | == API changes since 1.10 == |
Property changes on: branches/liquidthreads |
___________________________________________________________________ |
Name: svnmerge-integrated |
323 | 325 | - /trunk/phase3:1-24275 |
324 | 326 | + /trunk/phase3:1-24301 |