@@ 126-139 (lines=14) @@ | ||
123 | * |
|
124 | * @return string|null Url to redirect to, or null if $mValue is invalid. |
|
125 | */ |
|
126 | function dispatchRevision() { |
|
127 | $oldid = $this->mValue; |
|
128 | if ( !ctype_digit( $oldid ) ) { |
|
129 | return null; |
|
130 | } |
|
131 | $oldid = (int)$oldid; |
|
132 | if ( $oldid === 0 ) { |
|
133 | return null; |
|
134 | } |
|
135 | ||
136 | return wfAppendQuery( wfScript( 'index' ), [ |
|
137 | 'oldid' => $oldid |
|
138 | ] ); |
|
139 | } |
|
140 | ||
141 | /** |
|
142 | * Handle Special:Redirect/page/xxx (by redirecting to index.php?curid=xxx) |
|
@@ 146-159 (lines=14) @@ | ||
143 | * |
|
144 | * @return string|null Url to redirect to, or null if $mValue is invalid. |
|
145 | */ |
|
146 | function dispatchPage() { |
|
147 | $curid = $this->mValue; |
|
148 | if ( !ctype_digit( $curid ) ) { |
|
149 | return null; |
|
150 | } |
|
151 | $curid = (int)$curid; |
|
152 | if ( $curid === 0 ) { |
|
153 | return null; |
|
154 | } |
|
155 | ||
156 | return wfAppendQuery( wfScript( 'index' ), [ |
|
157 | 'curid' => $curid |
|
158 | ] ); |
|
159 | } |
|
160 | ||
161 | /** |
|
162 | * Handle Special:Redirect/logid/xxx |