Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -153,6 +153,8 @@ |
154 | 154 | * Translate the block expiry date |
155 | 155 | * (bug 28630) Add iwlinks, langlinks, redirect to |
156 | 156 | RefreshLinks::deleteLinksFromNonexistent |
| 157 | +* (bug 29797) Error: "Tried to load block with invalid type" when subpages |
| 158 | + are disabled for user pages. |
157 | 159 | |
158 | 160 | === API changes in 1.19 === |
159 | 161 | * BREAKING CHANGE: action=watch now requires POST and token. |
Index: trunk/phase3/CREDITS |
— | — | @@ -97,6 +97,7 @@ |
98 | 98 | * FunPika |
99 | 99 | * Harry Burt |
100 | 100 | * Ireas |
| 101 | +* Jarry1250 |
101 | 102 | * Jaska Zedlik |
102 | 103 | * Jeremy Baron |
103 | 104 | * Jidanni |
Index: trunk/phase3/includes/Block.php |
— | — | @@ -203,7 +203,8 @@ |
204 | 204 | $conds = array( 'ipb_address' => array() ); |
205 | 205 | } |
206 | 206 | |
207 | | - # Be aware that the != '' check is explicit, since empty values will be passed by some callers. |
| 207 | + # Be aware that the != '' check is explicit, since empty values will be |
| 208 | + # passed by some callers (bug 29116) |
208 | 209 | if( $vagueTarget != ''){ |
209 | 210 | list( $target, $type ) = self::parseTarget( $vagueTarget ); |
210 | 211 | switch( $type ) { |
— | — | @@ -1039,6 +1040,14 @@ |
1040 | 1041 | return array( null, null ); |
1041 | 1042 | } |
1042 | 1043 | |
| 1044 | + # Consider the possibility that this is not a username at all |
| 1045 | + # but actually an old subpage (bug #29797) |
| 1046 | + if( strpos( $target, '/' ) !== false ){ |
| 1047 | + # An old subpage, drill down to the user behind it |
| 1048 | + $parts = explode( '/', $target ); |
| 1049 | + $target = $parts[0]; |
| 1050 | + } |
| 1051 | + |
1043 | 1052 | $userObj = User::newFromName( $target ); |
1044 | 1053 | if ( $userObj instanceof User ) { |
1045 | 1054 | # Note that since numbers are valid usernames, a $target of "12345" will be |