Index: branches/REL1_18/phase3/maintenance/Site.php |
— | — | @@ -12,8 +12,8 @@ |
13 | 13 | $this->url = $u; |
14 | 14 | } |
15 | 15 | |
16 | | - function getURL( $lang ) { |
| 16 | + function getURL( $lang, $urlprotocol ) { |
17 | 17 | $xlang = str_replace( '_', '-', $lang ); |
18 | | - return "http://$xlang.{$this->url}/wiki/\$1"; |
| 18 | + return "$urlprotocol//$xlang.{$this->url}/wiki/\$1"; |
19 | 19 | } |
20 | | -} |
\ No newline at end of file |
| 20 | +} |
Index: branches/REL1_18/phase3/maintenance/dumpInterwiki.php |
— | — | @@ -37,6 +37,7 @@ |
38 | 38 | $this->addOption( 'dblist', 'File with one db per line', false, true ); |
39 | 39 | $this->addOption( 'specialdbs', "File with one 'special' db per line", false, true ); |
40 | 40 | $this->addOption( 'o', 'Cdb output file', false, true ); |
| 41 | + $this->addOption( 'protocolrelative', 'Output wikimedia interwiki urls as protocol relative', false, false ); |
41 | 42 | } |
42 | 43 | |
43 | 44 | function execute() { |
— | — | @@ -55,6 +56,12 @@ |
56 | 57 | $this->dbFile = false; |
57 | 58 | } |
58 | 59 | |
| 60 | + if ( $this->hasOption( 'protocolrelative' ) ) { |
| 61 | + $this->urlprotocol = ''; |
| 62 | + } else { |
| 63 | + $this->urlprotocol = 'http:'; |
| 64 | + } |
| 65 | + |
59 | 66 | $this->getRebuildInterwikiDump(); |
60 | 67 | } |
61 | 68 | |
— | — | @@ -76,9 +83,9 @@ |
77 | 84 | |
78 | 85 | # Extra interwiki links that can't be in the intermap for some reason |
79 | 86 | $extraLinks = array( |
80 | | - array( 'm', 'http://meta.wikimedia.org/wiki/$1', 1 ), |
81 | | - array( 'meta', 'http://meta.wikimedia.org/wiki/$1', 1 ), |
82 | | - array( 'sep11', 'http://sep11.wikipedia.org/wiki/$1', 1 ), |
| 87 | + array( 'm', $this->urlprotocol . '//meta.wikimedia.org/wiki/$1', 1 ), |
| 88 | + array( 'meta', $this->urlprotocol . '//meta.wikimedia.org/wiki/$1', 1 ), |
| 89 | + array( 'sep11', $this->urlprotocol . '//sep11.wikipedia.org/wiki/$1', 1 ), |
83 | 90 | ); |
84 | 91 | |
85 | 92 | # Language aliases, usually configured as redirects to the real wiki in apache |
— | — | @@ -126,6 +133,13 @@ |
127 | 134 | |
128 | 135 | $url = $matches[2]; |
129 | 136 | if ( preg_match( '/(wikipedia|wiktionary|wikisource|wikiquote|wikibooks|wikimedia)\.org/', $url ) ) { |
| 137 | + if ( $this->hasOption( 'protocolrelative' ) ) { |
| 138 | + if ( substr( $url, 0, 5 ) == 'http:' ) { |
| 139 | + $url = substr( $url, 5 ); |
| 140 | + } else if ( substr( $url, 0, 6 ) == 'https:' ) { |
| 141 | + $url = substr( $url, 6 ); |
| 142 | + } |
| 143 | + } |
130 | 144 | $local = 1; |
131 | 145 | } else { |
132 | 146 | $local = 0; |
— | — | @@ -155,7 +169,7 @@ |
156 | 170 | # Links to multilanguage sites |
157 | 171 | foreach ( $sites as $targetSite ) { |
158 | 172 | $this->makeLink( array( 'iw_prefix' => $targetSite->lateral, |
159 | | - 'iw_url' => $targetSite->getURL( 'en' ), |
| 173 | + 'iw_url' => $targetSite->getURL( 'en', $this->urlprotocol ), |
160 | 174 | 'iw_local' => 1 ), $db ); |
161 | 175 | } |
162 | 176 | } else { |
— | — | @@ -179,14 +193,14 @@ |
180 | 194 | foreach ( $sites as $targetSite ) { |
181 | 195 | if ( $targetSite->suffix != $site->suffix ) { |
182 | 196 | $this->makeLink( array( 'iw_prefix' => $targetSite->lateral, |
183 | | - 'iw_url' => $targetSite->getURL( $lang ), |
| 197 | + 'iw_url' => $targetSite->getURL( $lang, $this->urlprotocol ), |
184 | 198 | 'iw_local' => 1 ), $db ); |
185 | 199 | } |
186 | 200 | } |
187 | 201 | |
188 | 202 | if ( $site->suffix == "wiki" ) { |
189 | 203 | $this->makeLink( array( 'iw_prefix' => 'w', |
190 | | - 'iw_url' => "http://en.wikipedia.org/wiki/$1", |
| 204 | + 'iw_url' => $this->urlprotocol . "//en.wikipedia.org/wiki/$1", |
191 | 205 | 'iw_local' => 1 ), $db ); |
192 | 206 | } |
193 | 207 | |
— | — | @@ -203,12 +217,12 @@ |
204 | 218 | function makeLanguageLinks( &$site, $source ) { |
205 | 219 | # Actual languages with their own databases |
206 | 220 | foreach ( $this->langlist as $targetLang ) { |
207 | | - $this->makeLink( array( $targetLang, $site->getURL( $targetLang ), 1 ), $source ); |
| 221 | + $this->makeLink( array( $targetLang, $site->getURL( $targetLang, $this->urlprotocol ), 1 ), $source ); |
208 | 222 | } |
209 | 223 | |
210 | 224 | # Language aliases |
211 | 225 | foreach ( $this->languageAliases as $alias => $lang ) { |
212 | | - $this->makeLink( array( $alias, $site->getURL( $lang ), 1 ), $source ); |
| 226 | + $this->makeLink( array( $alias, $site->getURL( $lang, $this->urlprotocol ), 1 ), $source ); |
213 | 227 | } |
214 | 228 | } |
215 | 229 | |
Index: branches/REL1_18/phase3/skins/vector/screen.css |
— | — | @@ -790,11 +790,10 @@ |
791 | 791 | background-color: #f9f9f9; |
792 | 792 | } |
793 | 793 | pre { |
794 | | - overflow-x: auto; |
795 | 794 | padding: 1em; |
796 | | - border: 1px solid #EBEBEB; |
| 795 | + border: 1px dashed #2f6fab; |
797 | 796 | color: black; |
798 | | - background-color: #F7F7F7; |
| 797 | + background-color: #f9f9f9; |
799 | 798 | line-height: 1.3em; |
800 | 799 | } |
801 | 800 | ul { |
Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18 |
— | — | @@ -454,6 +454,8 @@ |
455 | 455 | * (bug 30907) Special:Unusedcategories should sort ascendingly. |
456 | 456 | * (bug 28545) When using the uca-default collation, sortkey's starting with a |
457 | 457 | space (U+20) will sort under an invisible header like in 1.16 rather than a U+6DE |
| 458 | +* (bug 30497) Add client-nojs and client-js classes on document element |
| 459 | + to let styles easily hide or show things based on general JS availability |
458 | 460 | |
459 | 461 | === API changes in 1.18 === |
460 | 462 | * BREAKING CHANGE: action=watch now requires POST and token. |
Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
461 | 463 | Merged /trunk/phase3/RELEASE-NOTES-1.18:r93912,95318,96139 |
Index: branches/REL1_18/phase3/includes/OutputPage.php |
— | — | @@ -2213,7 +2213,7 @@ |
2214 | 2214 | } |
2215 | 2215 | $sk->setupUserCss( $this ); |
2216 | 2216 | |
2217 | | - $ret = Html::htmlHeader( array( 'lang' => $this->getLang()->getCode(), 'dir' => $userdir ) ); |
| 2217 | + $ret = Html::htmlHeader( array( 'lang' => $this->getLang()->getCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) ); |
2218 | 2218 | |
2219 | 2219 | if ( $this->getHTMLTitle() == '' ) { |
2220 | 2220 | $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() ) ); |
Property changes on: branches/REL1_18/phase3/includes/OutputPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2221 | 2221 | Merged /trunk/phase3/includes/OutputPage.php:r93912,95318,96139 |
Index: branches/REL1_18/phase3/resources/mediawiki.page/mediawiki.page.startup.js |
— | — | @@ -3,11 +3,13 @@ |
4 | 4 | /* Client profile classes for <html> */ |
5 | 5 | |
6 | 6 | var prof = $.client.profile(); |
7 | | - $( 'html' ).addClass( |
8 | | - 'client-' + prof.name |
9 | | - + ' client-' + prof.name + '-' + prof.versionBase |
10 | | - + ' client-' + prof.layout |
11 | | - + ' client-' + prof.platform |
12 | | - ); |
| 7 | + $( 'html' ) |
| 8 | + .addClass( |
| 9 | + 'client-' + prof.name |
| 10 | + + ' client-' + prof.name + '-' + prof.versionBase |
| 11 | + + ' client-' + prof.layout |
| 12 | + + ' client-' + prof.platform |
| 13 | + + ' client-js' ) |
| 14 | + .removeClass( 'client-nojs' ); |
13 | 15 | |
14 | 16 | } )( jQuery ); |