Index: trunk/phase3/includes/Title.php |
— | — | @@ -161,12 +161,11 @@ |
162 | 162 | * Create a new Title from URL-encoded text. Ensures that |
163 | 163 | * the given title's length does not exceed the maximum. |
164 | 164 | * @param string $url the title, as might be taken from a URL |
165 | | - * @param bool $isvalid, allows for multiple colons and characters set as illegal |
166 | 165 | * @return Title the new object, or NULL on an error |
167 | 166 | * @static |
168 | 167 | * @access public |
169 | 168 | */ |
170 | | - public static function newFromURL( $url, $isvalid=true ) { |
| 169 | + public static function newFromURL( $url ) { |
171 | 170 | global $wgLegalTitleChars; |
172 | 171 | $t = new Title(); |
173 | 172 | |
— | — | @@ -178,7 +177,7 @@ |
179 | 178 | } |
180 | 179 | |
181 | 180 | $t->mDbkeyform = str_replace( ' ', '_', $url ); |
182 | | - if( $t->secureAndSplit( $isvalid ) ) { |
| 181 | + if( $t->secureAndSplit() ) { |
183 | 182 | return $t; |
184 | 183 | } else { |
185 | 184 | return NULL; |
— | — | @@ -1706,11 +1705,10 @@ |
1707 | 1706 | * removes illegal characters, splits off the interwiki and |
1708 | 1707 | * namespace prefixes, sets the other forms, and canonicalizes |
1709 | 1708 | * everything. |
1710 | | - * @param bool $isvalid, allows for multiple colons and characters set as illegal |
1711 | 1709 | * @return bool true on success |
1712 | 1710 | * @private |
1713 | 1711 | */ |
1714 | | - /* private */ function secureAndSplit( $isvalid=true ) { |
| 1712 | + /* private */ function secureAndSplit() { |
1715 | 1713 | global $wgContLang, $wgLocalInterwiki, $wgCapitalLinks; |
1716 | 1714 | |
1717 | 1715 | # Initialisation |
— | — | @@ -1811,7 +1809,7 @@ |
1812 | 1810 | $this->mArticleID = 0; |
1813 | 1811 | } |
1814 | 1812 | $fragment = strstr( $dbkey, '#' ); |
1815 | | - if ( $isvalid && false !== $fragment ) { |
| 1813 | + if ( false !== $fragment ) { |
1816 | 1814 | $this->setFragment( $fragment ); |
1817 | 1815 | $dbkey = substr( $dbkey, 0, strlen( $dbkey ) - strlen( $fragment ) ); |
1818 | 1816 | # remove whitespace again: prevents "Foo_bar_#" |
— | — | @@ -1821,7 +1819,7 @@ |
1822 | 1820 | |
1823 | 1821 | # Reject illegal characters. |
1824 | 1822 | # |
1825 | | - if( $isvalid && preg_match( $rxTc, $dbkey ) ) { |
| 1823 | + if( preg_match( $rxTc, $dbkey ) ) { |
1826 | 1824 | return false; |
1827 | 1825 | } |
1828 | 1826 | |