Index: trunk/phase3/maintenance/generateSitemap.php |
— | — | @@ -264,16 +264,6 @@ |
265 | 265 | $entry = $this->fileEntry( $title->getFullURL(), $date, $this->priority( $namespace ) ); |
266 | 266 | $length += strlen( $entry ); |
267 | 267 | $this->write( $this->file, $entry ); |
268 | | - // generate pages for language variants |
269 | | - if($wgContLang->hasVariants()){ |
270 | | - $variants = $wgContLang->getVariants(); |
271 | | - foreach($variants as $vCode){ |
272 | | - if($vCode==$wgContLang->getCode()) continue; // we don't want default variant |
273 | | - $entry = $this->fileEntry( $title->getFullVariantURL($vCode), $date, $this->priority( $namespace ) ); |
274 | | - $length += strlen( $entry ); |
275 | | - $this->write( $this->file, $entry ); |
276 | | - } |
277 | | - } |
278 | 268 | } |
279 | 269 | if ( $this->file ) { |
280 | 270 | $this->write( $this->file, $this->closeFile() ); |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -812,35 +812,6 @@ |
813 | 813 | } |
814 | 814 | |
815 | 815 | /** |
816 | | - * Get a real URL referring to this title in some of the variant |
817 | | - * |
818 | | - * @param string $variant variant name |
819 | | - * @return string the URL |
820 | | - * @access public |
821 | | - */ |
822 | | - function getFullVariantURL( $variant = '' ) { |
823 | | - global $wgServer, $wgRequest; |
824 | | - |
825 | | - $url=''; // this function should not be called for interwiki |
826 | | - |
827 | | - if ( '' == $this->mInterwiki ) { |
828 | | - $url = $this->getLocalVariantURL( $variant ); |
829 | | - |
830 | | - if ($wgRequest->getVal('action') != 'render') { |
831 | | - $url = $wgServer . $url; |
832 | | - } |
833 | | - } |
834 | | - |
835 | | - # Finally, add the fragment. |
836 | | - if ( '' != $this->mFragment ) { |
837 | | - $url .= '#' . $this->mFragment; |
838 | | - } |
839 | | - |
840 | | - return $url; |
841 | | - } |
842 | | - |
843 | | - |
844 | | - /** |
845 | 816 | * Get a URL with no fragment or server name. If this page is generated |
846 | 817 | * with action=render, $wgServer is prepended. |
847 | 818 | * @param string $query an optional query string; if not specified, |
— | — | @@ -897,30 +868,6 @@ |
898 | 869 | } |
899 | 870 | |
900 | 871 | /** |
901 | | - * Similar to getLocalURL, except it uses $wgVariantArticlePath |
902 | | - * and gets the URL with no fragment or server name, but in a |
903 | | - * certain language variant (relevant only to languages with variants) |
904 | | - * @param string $variant caption of variant |
905 | | - * @return string the URL |
906 | | - * @access public |
907 | | - */ |
908 | | - function getLocalVariantURL( $variant='' ) { |
909 | | - global $wgVariantArticlePath,$wgScript; |
910 | | - if($variant=='') return $this->getLocalURL(); |
911 | | - |
912 | | - if($wgVariantArticlePath==false) |
913 | | - $wgVariantArticlePath = "$wgScript?title=$1&variant=$2"; |
914 | | - |
915 | | - $dbkey = wfUrlencode( $this->getPrefixedDBkey() ); |
916 | | - $url = str_replace( '$1', $dbkey, $wgVariantArticlePath ); |
917 | | - $code = urlencode( $variant ); |
918 | | - $url = str_replace( '$2', $code, $url ); |
919 | | - |
920 | | - return $url; |
921 | | - |
922 | | - } |
923 | | - |
924 | | - /** |
925 | 872 | * Get an HTML-escaped version of the URL form, suitable for |
926 | 873 | * using in a link, without a server name or fragment |
927 | 874 | * @param string $query an optional query string |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -765,7 +765,7 @@ |
766 | 766 | $content_actions['varlang-' . $vcount] = array( |
767 | 767 | 'class' => $selected, |
768 | 768 | 'text' => $varname, |
769 | | - 'href' => $this->mTitle->getLocalVariantURL($code) |
| 769 | + 'href' => $this->mTitle->getLocalUrl( $actstr . 'variant=' . urlencode( $code ) ) |
770 | 770 | ); |
771 | 771 | $vcount ++; |
772 | 772 | } |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -124,7 +124,6 @@ |
125 | 125 | $wgStyleDirectory = "{$IP}/skins"; |
126 | 126 | $wgStyleSheetPath = &$wgStylePath; |
127 | 127 | $wgArticlePath = "{$wgScript}?title=$1"; |
128 | | -$wgVariantArticlePath = false; |
129 | 128 | $wgUploadPath = "{$wgScriptPath}/images"; |
130 | 129 | $wgUploadDirectory = "{$IP}/images"; |
131 | 130 | $wgHashedUploadDirectory = true; |
Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -96,14 +96,6 @@ |
97 | 97 | return $req; |
98 | 98 | } |
99 | 99 | |
100 | | - // check the syntax /code/ArticleTitle |
101 | | - $script = $_SERVER['SCRIPT_NAME']; |
102 | | - $variants = implode('|',$this->mVariants); |
103 | | - if(preg_match("/($variants)$/",$script,$matches)){ |
104 | | - $this->mPreferredVariant = $matches[1]; |
105 | | - return $this->mPreferredVariant; |
106 | | - } |
107 | | - |
108 | 100 | // get language variant preference from logged in users |
109 | 101 | // Don't call this on stub objects because that causes infinite |
110 | 102 | // recursion during initialisation |