Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1895,7 +1895,7 @@ |
1896 | 1896 | * |
1897 | 1897 | * showErrorPage( 'titlemsg', 'pagetextmsg', array( 'param1', 'param2' ) ); |
1898 | 1898 | * showErrorPage( 'titlemsg', $messageObject ); |
1899 | | - * |
| 1899 | + * |
1900 | 1900 | * @param $title String: message key for page title |
1901 | 1901 | * @param $msg Mixed: message key (string) for page text, or a Message object |
1902 | 1902 | * @param $params Array: message parameters; ignored if $msg is a Message object |
— | — | @@ -3039,7 +3039,7 @@ |
3040 | 3040 | ResourceLoaderModule::TYPE_STYLES |
3041 | 3041 | ); |
3042 | 3042 | } |
3043 | | - |
| 3043 | + |
3044 | 3044 | // Add stuff in $otherTags (previewed user CSS if applicable) |
3045 | 3045 | $ret .= $otherTags; |
3046 | 3046 | return $ret; |
Index: trunk/phase3/includes/WebRequest.php |
— | — | @@ -167,10 +167,16 @@ |
168 | 168 | return $proto . '://' . IP::combineHostAndPort( $host, $port, $stdPort ); |
169 | 169 | } |
170 | 170 | |
| 171 | + /** |
| 172 | + * @return array |
| 173 | + */ |
171 | 174 | public static function detectProtocolAndStdPort() { |
172 | 175 | return ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) ? array( 'https', 443 ) : array( 'http', 80 ); |
173 | 176 | } |
174 | 177 | |
| 178 | + /** |
| 179 | + * @return string |
| 180 | + */ |
175 | 181 | public static function detectProtocol() { |
176 | 182 | list( $proto, $stdPort ) = self::detectProtocolAndStdPort(); |
177 | 183 | return $proto; |
— | — | @@ -603,7 +609,7 @@ |
604 | 610 | * Return the request URI with the canonical service and hostname, path, |
605 | 611 | * and query string. This will be suitable for use as an absolute link |
606 | 612 | * in HTML or other output. |
607 | | - * |
| 613 | + * |
608 | 614 | * If $wgServer is protocol-relative, this will return a fully |
609 | 615 | * qualified URL with the protocol that was used for this request. |
610 | 616 | * |
— | — | @@ -921,6 +927,10 @@ |
922 | 928 | * if there was no dot before the question mark (bug 28235). |
923 | 929 | * |
924 | 930 | * @deprecated Use checkUrlExtension(). |
| 931 | + * |
| 932 | + * @param $extWhitelist array |
| 933 | + * |
| 934 | + * @return bool |
925 | 935 | */ |
926 | 936 | public function isPathInfoBad( $extWhitelist = array() ) { |
927 | 937 | global $wgScriptExtension; |
— | — | @@ -1180,15 +1190,26 @@ |
1181 | 1191 | throw new MWException( "{$method}() not implemented" ); |
1182 | 1192 | } |
1183 | 1193 | |
| 1194 | + /** |
| 1195 | + * @param $name string |
| 1196 | + * @param $default string |
| 1197 | + * @return string |
| 1198 | + */ |
1184 | 1199 | public function getText( $name, $default = '' ) { |
1185 | 1200 | # Override; don't recode since we're using internal data |
1186 | 1201 | return (string)$this->getVal( $name, $default ); |
1187 | 1202 | } |
1188 | 1203 | |
| 1204 | + /** |
| 1205 | + * @return Array |
| 1206 | + */ |
1189 | 1207 | public function getValues() { |
1190 | 1208 | return $this->data; |
1191 | 1209 | } |
1192 | 1210 | |
| 1211 | + /** |
| 1212 | + * @return array |
| 1213 | + */ |
1193 | 1214 | public function getQueryValues() { |
1194 | 1215 | if ( $this->wasPosted ) { |
1195 | 1216 | return array(); |
— | — | @@ -1197,6 +1218,9 @@ |
1198 | 1219 | } |
1199 | 1220 | } |
1200 | 1221 | |
| 1222 | + /** |
| 1223 | + * @return bool |
| 1224 | + */ |
1201 | 1225 | public function wasPosted() { |
1202 | 1226 | return $this->wasPosted; |
1203 | 1227 | } |
— | — | @@ -1209,10 +1233,18 @@ |
1210 | 1234 | $this->notImplemented( __METHOD__ ); |
1211 | 1235 | } |
1212 | 1236 | |
| 1237 | + /** |
| 1238 | + * @param $name |
| 1239 | + * @return bool|string |
| 1240 | + */ |
1213 | 1241 | public function getHeader( $name ) { |
1214 | 1242 | return isset( $this->headers[$name] ) ? $this->headers[$name] : false; |
1215 | 1243 | } |
1216 | 1244 | |
| 1245 | + /** |
| 1246 | + * @param $name string |
| 1247 | + * @param $val string |
| 1248 | + */ |
1217 | 1249 | public function setHeader( $name, $val ) { |
1218 | 1250 | $this->headers[$name] = $val; |
1219 | 1251 | } |
— | — | @@ -1230,14 +1262,25 @@ |
1231 | 1263 | return $this->session; |
1232 | 1264 | } |
1233 | 1265 | |
| 1266 | + /** |
| 1267 | + * @param array $extWhitelist |
| 1268 | + * @return bool |
| 1269 | + */ |
1234 | 1270 | public function isPathInfoBad( $extWhitelist = array() ) { |
1235 | 1271 | return false; |
1236 | 1272 | } |
1237 | 1273 | |
| 1274 | + /** |
| 1275 | + * @param array $extWhitelist |
| 1276 | + * @return bool |
| 1277 | + */ |
1238 | 1278 | public function checkUrlExtension( $extWhitelist = array() ) { |
1239 | 1279 | return true; |
1240 | 1280 | } |
1241 | 1281 | |
| 1282 | + /** |
| 1283 | + * @return string |
| 1284 | + */ |
1242 | 1285 | protected function getRawIP() { |
1243 | 1286 | return '127.0.0.1'; |
1244 | 1287 | } |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -47,7 +47,6 @@ |
48 | 48 | */ |
49 | 49 | const GAID_FOR_UPDATE = 1; |
50 | 50 | |
51 | | - |
52 | 51 | /** |
53 | 52 | * @name Private member variables |
54 | 53 | * Please use the accessor functions instead. |
— | — | @@ -759,7 +758,7 @@ |
760 | 759 | |
761 | 760 | /** |
762 | 761 | * Return the prefixed title with spaces _without_ the interwiki prefix |
763 | | - * |
| 762 | + * |
764 | 763 | * @return \type{\string} the title, prefixed by the namespace but not by the interwiki prefix, with spaces |
765 | 764 | */ |
766 | 765 | public function getSemiPrefixedText() { |
— | — | @@ -768,7 +767,7 @@ |
769 | 768 | $s = str_replace( '_', ' ', $s ); |
770 | 769 | $this->mSemiPrefixedText = $s; |
771 | 770 | } |
772 | | - return $this->mSemiPrefixedText; |
| 771 | + return $this->mSemiPrefixedText; |
773 | 772 | } |
774 | 773 | |
775 | 774 | /** |
— | — | @@ -999,7 +998,7 @@ |
1000 | 999 | public function escapeFullURL( $query = '' ) { |
1001 | 1000 | return htmlspecialchars( $this->getFullURL( $query ) ); |
1002 | 1001 | } |
1003 | | - |
| 1002 | + |
1004 | 1003 | /** |
1005 | 1004 | * HTML-escaped version of getCanonicalURL() |
1006 | 1005 | */ |
— | — | @@ -1011,7 +1010,7 @@ |
1012 | 1011 | * Get the URL form for an internal link. |
1013 | 1012 | * - Used in various Squid-related code, in case we have a different |
1014 | 1013 | * internal hostname for the server from the exposed one. |
1015 | | - * |
| 1014 | + * |
1016 | 1015 | * This uses $wgInternalServer to qualify the path, or $wgServer |
1017 | 1016 | * if $wgInternalServer is not set. If the server variable used is |
1018 | 1017 | * protocol-relative, the URL will be expanded to http:// |
— | — | @@ -1036,9 +1035,9 @@ |
1037 | 1036 | * Get the URL for a canonical link, for use in things like IRC and |
1038 | 1037 | * e-mail notifications. Uses $wgCanonicalServer and the |
1039 | 1038 | * GetCanonicalURL hook. |
1040 | | - * |
| 1039 | + * |
1041 | 1040 | * NOTE: Unlike getInternalURL(), the canonical URL includes the fragment |
1042 | | - * |
| 1041 | + * |
1043 | 1042 | * @param $query string An optional query string |
1044 | 1043 | * @param $variant string Language variant of URL (for sr, zh, ...) |
1045 | 1044 | * @return string The URL |
— | — | @@ -3380,7 +3379,7 @@ |
3381 | 3380 | array( 'rc_timestamp' => $rcts, 'rc_namespace' => $newns, 'rc_title' => $newdbk, 'rc_new' => 1 ), |
3382 | 3381 | __METHOD__ |
3383 | 3382 | ); |
3384 | | - |
| 3383 | + |
3385 | 3384 | if ( $wgEnableInterwikiTemplatesTracking && $wgGlobalDatabase ) { |
3386 | 3385 | $dbw2 = wfGetDB( DB_MASTER, array(), $wgGlobalDatabase ); |
3387 | 3386 | $dbw2->delete( 'globaltemplatelinks', |