Index: branches/wmf/1.18wmf1/skins/modern/main.css |
— | — | @@ -411,38 +411,36 @@ |
412 | 412 | } |
413 | 413 | |
414 | 414 | #mw_content a.external, |
415 | | -#mw_content a[href ^="gopher://"] { |
| 415 | +#mw_content a.external[href ^="gopher://"] { |
416 | 416 | /* @embed */ |
417 | 417 | background: url(external.png) center right no-repeat; |
418 | 418 | padding-right: 13px; |
419 | 419 | } |
420 | | -#mw_content a[href ^="https://"], |
| 420 | +#mw_content a.external[href ^="https://"], |
421 | 421 | .link-https { |
422 | 422 | /* @embed */ |
423 | 423 | background: url(lock_icon.gif) center right no-repeat; |
424 | 424 | padding-right: 16px; |
425 | 425 | } |
426 | | -#mw_content a[href ^="mailto:"], |
| 426 | +#mw_content a.external[href ^="mailto:"], |
427 | 427 | .link-mailto { |
428 | 428 | /* @embed */ |
429 | 429 | background: url(mail_icon.gif) center right no-repeat; |
430 | 430 | padding-right: 18px; |
431 | 431 | } |
432 | | -#mw_content a[href ^="news://"] { |
| 432 | +#mw_content a.external[href ^="news://"] { |
433 | 433 | /* @embed */ |
434 | 434 | background: url(news_icon.png) center right no-repeat; |
435 | 435 | padding-right: 18px; |
436 | 436 | } |
437 | | -#mw_content a[href ^="ftp://"], |
| 437 | +#mw_content a.external[href ^="ftp://"], |
438 | 438 | .link-ftp { |
439 | 439 | /* @embed */ |
440 | 440 | background: url(file_icon.gif) center right no-repeat; |
441 | 441 | padding-right: 18px; |
442 | 442 | } |
443 | | -#mw_content a[href ^="irc://"], |
444 | | -#mw_content a.extiw[href ^="irc://"], |
445 | | -#mw_content a[href ^="ircs://"], |
446 | | -#mw_content a.extiw[href ^="ircs://"], |
| 443 | +#mw_content a.external[href ^="irc://"], |
| 444 | +#mw_content a.external[href ^="ircs://"], |
447 | 445 | .link-irc { |
448 | 446 | /* @embed */ |
449 | 447 | background: url(discussionitem_icon.gif) center right no-repeat; |
— | — | @@ -624,8 +622,6 @@ |
625 | 623 | #mw_content a.extiw, |
626 | 624 | #mw_content a.extiw:active { |
627 | 625 | color: #36b; |
628 | | - background: none; |
629 | | - padding: 0; |
630 | 626 | } |
631 | 627 | #mw_content a.external { |
632 | 628 | color: #36b; |
Index: branches/wmf/1.18wmf1/skins/simple/main.css |
— | — | @@ -198,34 +198,32 @@ |
199 | 199 | h1.firstHeading, h2 { |
200 | 200 | border-bottom: solid 1px black; |
201 | 201 | } |
202 | | -#bodyContent a[href ^="http://"], |
203 | | -#bodyContent a[href ^="gopher://"] { |
| 202 | +#bodyContent a.external, |
| 203 | +#bodyContent a.external[href ^="gopher://"] { |
204 | 204 | background: url("external.png") center right no-repeat; |
205 | 205 | padding-right: 13px; |
206 | 206 | } |
207 | | -#bodyContent a[href ^="https://"], |
| 207 | +#bodyContent a.external[href ^="https://"], |
208 | 208 | .link-https { |
209 | 209 | background: url("lock_icon.gif") center right no-repeat; |
210 | 210 | padding-right: 16px; |
211 | 211 | } |
212 | | -#bodyContent a[href ^="mailto:"], |
| 212 | +#bodyContent a.external[href ^="mailto:"], |
213 | 213 | .link-mailto { |
214 | 214 | background: url("mail_icon.gif") center right no-repeat; |
215 | 215 | padding-right: 18px; |
216 | 216 | } |
217 | | -#bodyContent a[href ^="news://"] { |
| 217 | +#bodyContent a.external[href ^="news://"] { |
218 | 218 | background: url("news_icon.png") center right no-repeat; |
219 | 219 | padding-right: 18px; |
220 | 220 | } |
221 | | -#bodyContent a[href ^="ftp://"], |
| 221 | +#bodyContent a.external[href ^="ftp://"], |
222 | 222 | .link-ftp { |
223 | 223 | background: url("file_icon.gif") center right no-repeat; |
224 | 224 | padding-right: 18px; |
225 | 225 | } |
226 | | -#bodyContent a[href ^="irc://"], |
227 | | -#bodyContent a.extiw[href ^="irc://"], |
228 | | -#bodyContent a[href ^="ircs://"], |
229 | | -#bodyContent a.extiw[href ^="ircs://"], |
| 226 | +#bodyContent a.external[href ^="irc://"], |
| 227 | +#bodyContent a.external[href ^="ircs://"], |
230 | 228 | .link-irc { |
231 | 229 | background: url("discussionitem_icon.gif") center right no-repeat; |
232 | 230 | padding-right: 18px; |
— | — | @@ -234,8 +232,6 @@ |
235 | 233 | #bodyContent a.extiw, |
236 | 234 | #bodyContent a.extiw:active { |
237 | 235 | color: #5E7CFF; |
238 | | - background: none; |
239 | | - padding: 0; |
240 | 236 | } |
241 | 237 | |
242 | 238 | td.diff-addedline { |
Index: branches/wmf/1.18wmf1/skins/vector/screen.css |
— | — | @@ -1035,38 +1035,36 @@ |
1036 | 1036 | padding-bottom: 0; |
1037 | 1037 | } |
1038 | 1038 | div#content a.external, |
1039 | | -div#content a[href ^="gopher://"] { |
| 1039 | +div#content a.external[href ^="gopher://"] { |
1040 | 1040 | /* @embed */ |
1041 | 1041 | background: url(images/external-link-ltr-icon.png) center right no-repeat; |
1042 | 1042 | padding-right: 13px; |
1043 | 1043 | } |
1044 | | -div#content a[href ^="https://"], |
| 1044 | +div#content a.external[href ^="https://"], |
1045 | 1045 | .link-https { |
1046 | 1046 | /* @embed */ |
1047 | 1047 | background: url(images/lock-icon.png) center right no-repeat; |
1048 | 1048 | padding-right: 13px; |
1049 | 1049 | } |
1050 | | -div#content a[href ^="mailto:"], |
| 1050 | +div#content a.external[href ^="mailto:"], |
1051 | 1051 | .link-mailto { |
1052 | 1052 | /* @embed */ |
1053 | 1053 | background: url(images/mail-icon.png) center right no-repeat; |
1054 | 1054 | padding-right: 13px; |
1055 | 1055 | } |
1056 | | -div#content a[href ^="news://"] { |
| 1056 | +div#content a.external[href ^="news://"] { |
1057 | 1057 | /* @embed */ |
1058 | 1058 | background: url(images/news-icon.png) center right no-repeat; |
1059 | 1059 | padding-right: 13px; |
1060 | 1060 | } |
1061 | | -div#content a[href ^="ftp://"], |
| 1061 | +div#content a.external[href ^="ftp://"], |
1062 | 1062 | .link-ftp { |
1063 | 1063 | /* @embed */ |
1064 | 1064 | background: url(images/file-icon.png) center right no-repeat; |
1065 | 1065 | padding-right: 13px; |
1066 | 1066 | } |
1067 | | -div#content a[href ^="irc://"], |
1068 | | -div#content a.extiw[href ^="irc://"], |
1069 | | -div#content a[href ^="ircs://"], |
1070 | | -div#content a.extiw[href ^="ircs://"], |
| 1067 | +div#content a.external[href ^="irc://"], |
| 1068 | +div#content a.external[href ^="ircs://"], |
1071 | 1069 | .link-irc { |
1072 | 1070 | /* @embed */ |
1073 | 1071 | background: url(images/talk-icon.png) center right no-repeat; |
Property changes on: branches/wmf/1.18wmf1/skins/vector/screen.css |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1074 | 1072 | Merged /trunk/phase3/skins/vector/screen.css:r98690 |
Property changes on: branches/wmf/1.18wmf1/skins/vector |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1075 | 1073 | Merged /trunk/phase3/skins/vector:r98690 |
Index: branches/wmf/1.18wmf1/includes/specials/SpecialLinkSearch.php |
— | — | @@ -43,13 +43,18 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | function execute( $par ) { |
47 | | - global $wgOut, $wgRequest, $wgUrlProtocols, $wgMiserMode, $wgLang; |
| 47 | + global $wgUrlProtocols, $wgMiserMode; |
| 48 | + |
48 | 49 | $this->setHeaders(); |
49 | | - $wgOut->allowClickjacking(); |
| 50 | + $this->outputHeader(); |
50 | 51 | |
51 | | - $target = $wgRequest->getVal( 'target', $par ); |
52 | | - $namespace = $wgRequest->getIntorNull( 'namespace', null ); |
| 52 | + $out = $this->getOutput(); |
| 53 | + $out->allowClickjacking(); |
53 | 54 | |
| 55 | + $request = $this->getRequest(); |
| 56 | + $target = $request->getVal( 'target', $par ); |
| 57 | + $namespace = $request->getIntorNull( 'namespace', null ); |
| 58 | + |
54 | 59 | $protocols_list[] = ''; |
55 | 60 | foreach( $wgUrlProtocols as $prot ) { |
56 | 61 | $protocols_list[] = $prot; |
— | — | @@ -77,11 +82,9 @@ |
78 | 83 | $protocol = ''; |
79 | 84 | } |
80 | 85 | |
81 | | - $self = $this->getTitle(); |
82 | | - |
83 | | - $wgOut->addWikiMsg( 'linksearch-text', '<nowiki>' . $wgLang->commaList( $wgUrlProtocols ) . '</nowiki>' ); |
| 86 | + $out->addWikiMsg( 'linksearch-text', '<nowiki>' . $this->getLang()->commaList( $wgUrlProtocols ) . '</nowiki>' ); |
84 | 87 | $s = Xml::openElement( 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'] ) ) . |
85 | | - Html::hidden( 'title', $self->getPrefixedDbKey() ) . |
| 88 | + Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) . |
86 | 89 | '<fieldset>' . |
87 | 90 | Xml::element( 'legend', array(), wfMsg( 'linksearch' ) ) . |
88 | 91 | Xml::inputLabel( wfMsg( 'linksearch-pat' ), 'target', 'target', 50, $target ) . ' '; |
— | — | @@ -92,7 +95,7 @@ |
93 | 96 | $s .= Xml::submitButton( wfMsg( 'linksearch-ok' ) ) . |
94 | 97 | '</fieldset>' . |
95 | 98 | Xml::closeElement( 'form' ); |
96 | | - $wgOut->addHTML( $s ); |
| 99 | + $out->addHTML( $s ); |
97 | 100 | |
98 | 101 | if( $target != '' ) { |
99 | 102 | $this->setParams( array( |
— | — | @@ -101,7 +104,7 @@ |
102 | 105 | 'protocol' => $protocol ) ); |
103 | 106 | parent::execute( $par ); |
104 | 107 | if( $this->mMungedQuery === false ) |
105 | | - $wgOut->addWikiMsg( 'linksearch-error' ); |
| 108 | + $out->addWikiMsg( 'linksearch-error' ); |
106 | 109 | } |
107 | 110 | } |
108 | 111 | |
— | — | @@ -172,8 +175,8 @@ |
173 | 176 | function formatResult( $skin, $result ) { |
174 | 177 | $title = Title::makeTitle( $result->namespace, $result->title ); |
175 | 178 | $url = $result->url; |
176 | | - $pageLink = $skin->linkKnown( $title ); |
177 | | - $urlLink = $skin->makeExternalLink( $url, $url ); |
| 179 | + $pageLink = Linker::linkKnown( $title ); |
| 180 | + $urlLink = Linker::makeExternalLink( $url, $url ); |
178 | 181 | |
179 | 182 | return wfMsgHtml( 'linksearch-line', $urlLink, $pageLink ); |
180 | 183 | } |
— | — | @@ -182,14 +185,13 @@ |
183 | 186 | * Override to check query validity. |
184 | 187 | */ |
185 | 188 | function doQuery( $offset = false, $limit = false ) { |
186 | | - global $wgOut; |
187 | 189 | list( $this->mMungedQuery, ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt ); |
188 | 190 | if( $this->mMungedQuery === false ) { |
189 | | - $wgOut->addWikiMsg( 'linksearch-error' ); |
| 191 | + $this->getOutput()->addWikiMsg( 'linksearch-error' ); |
190 | 192 | } else { |
191 | 193 | // For debugging |
192 | 194 | // Generates invalid xhtml with patterns that contain -- |
193 | | - //$wgOut->addHTML( "\n<!-- " . htmlspecialchars( $this->mMungedQuery ) . " -->\n" ); |
| 195 | + //$this->getOutput()->addHTML( "\n<!-- " . htmlspecialchars( $this->mMungedQuery ) . " -->\n" ); |
194 | 196 | parent::doQuery( $offset, $limit ); |
195 | 197 | } |
196 | 198 | } |
Property changes on: branches/wmf/1.18wmf1/includes/specials |
___________________________________________________________________ |
Modified: svn:mergeinfo |
197 | 199 | Merged /trunk/phase3/includes/specials:r96774,98690 |
Property changes on: branches/wmf/1.18wmf1/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
198 | 200 | Merged /trunk/phase3/includes:r96774,98690 |
Index: branches/wmf/1.18wmf1/resources/mediawiki.special/mediawiki.special.upload.js |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | * @return boolean |
27 | 27 | */ |
28 | 28 | function fileIsPreviewable( file ) { |
29 | | - var known = ['image/png', 'image/gif', 'image/jpeg'], |
| 29 | + var known = ['image/png', 'image/gif', 'image/jpeg', 'image/svg+xml'], |
30 | 30 | tooHuge = 10 * 1024 * 1024; |
31 | 31 | return ( $.inArray( file.type, known ) !== -1 ) && file.size > 0 && file.size < tooHuge; |
32 | 32 | } |
— | — | @@ -160,20 +160,33 @@ |
161 | 161 | */ |
162 | 162 | function fetchPreview( file, callback, callbackBinary ) { |
163 | 163 | var reader = new FileReader(); |
164 | | - reader.onload = function() { |
165 | | - if ( callbackBinary ) { |
| 164 | + if ( callbackBinary ) { |
| 165 | + // To fetch JPEG metadata we need a binary string; start there. |
| 166 | + // todo: |
| 167 | + reader.onload = function() { |
166 | 168 | callbackBinary( reader.result ); |
167 | | - reader.onload = function() { |
168 | | - callback( reader.result ); |
169 | | - }; |
170 | | - reader.readAsDataURL( file ); |
171 | | - } else { |
172 | | - callback( reader.result ); |
173 | | - } |
174 | | - }; |
175 | | - if ( callbackBinary ) { |
| 169 | + |
| 170 | + // Now run back through the regular code path. |
| 171 | + fetchPreview(file, callback ); |
| 172 | + }; |
176 | 173 | reader.readAsBinaryString( file ); |
| 174 | + } else if ('URL' in window && 'createObjectURL' in window.URL) { |
| 175 | + // Supported in Firefox 4.0 and above <https://developer.mozilla.org/en/DOM/window.URL.createObjectURL> |
| 176 | + // WebKit has it in a namespace for now but that's ok. ;) |
| 177 | + // |
| 178 | + // Lifetime of this URL is until document close, which is fine |
| 179 | + // for Special:Upload -- if this code gets used on longer-running |
| 180 | + // pages, add a revokeObjectURL() when it's no longer needed. |
| 181 | + // |
| 182 | + // Prefer this over readAsDataURL for Firefox 7 due to bug reading |
| 183 | + // some SVG files from data URIs <https://bugzilla.mozilla.org/show_bug.cgi?id=694165> |
| 184 | + callback(window.URL.createObjectURL(file)); |
177 | 185 | } else { |
| 186 | + // This ends up decoding the file to base-64 and back again, which |
| 187 | + // feels horribly inefficient. |
| 188 | + reader.onload = function() { |
| 189 | + callback( reader.result ); |
| 190 | + }; |
178 | 191 | reader.readAsDataURL( file ); |
179 | 192 | } |
180 | 193 | } |
Property changes on: branches/wmf/1.18wmf1 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
181 | 194 | Merged /trunk/phase3:r96774,98690,99840 |