r80897 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80896‎ | r80897 | r80898 >
Date:18:57, 24 January 2011
Author:catrope
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_17/extensions/CodeReview/codereview.css (modified) (history)
  • /branches/REL1_17/extensions/ContactPage/SpecialContact.php (modified) (history)
  • /branches/REL1_17/extensions/Nogomatch (deleted) (history)
  • /branches/REL1_17/phase3/includes/OutputPage.php (modified) (history)
  • /branches/REL1_17/phase3/includes/api/ApiQuery.php (modified) (history)
  • /branches/REL1_17/phase3/includes/parser/Parser.php (modified) (history)
  • /branches/REL1_17/phase3/includes/specials/SpecialSearch.php (modified) (history)
  • /branches/REL1_17/phase3/resources/Resources.php (modified) (history)
  • /branches/REL1_17/phase3/skins/Simple.php (modified) (history)
  • /branches/REL1_17/phase3/skins/common/diff.css (modified) (history)
  • /branches/REL1_17/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/ContactPage/SpecialContact.php
@@ -50,23 +50,10 @@
5151 return;
5252 }
5353
54 - // Blocked users cannot use the contact form.
55 - if ( !$wgUser->isAllowed( 'sendemail' ) ) {
56 - $wgOut->setPageTitle( wfMsg( 'blockedtitle' ) );
57 - $wgOut->setRobotPolicy( 'noindex,nofollow' );
58 - $wgOut->setArticleRelated( false );
 54+ // Blocked users cannot use the contact form if they're disabled from sending email.
 55+ if ( $wgUser->isBlockedFromEmailuser() ) {
 56+ $wgOut->blockedPage();
5957
60 - $ip = wfGetIP();
61 - $blocker = User::whoIs( $wgUser->mBlock->mBy );
62 - $blockReason = $wgUser->mBlock->mReason;
63 -
64 - if ( strval( $blockReason ) === '' ) {
65 - $blockReason = wfMsg( 'blockednoreason' );
66 - }
67 -
68 - $wgOut->addWikiMsg( 'blockedtext', $ip, $blockReason, $blocker );
69 - $wgOut->returnToMain( false );
70 -
7158 return;
7259 }
7360
Index: branches/REL1_17/extensions/CodeReview/codereview.css
@@ -12,6 +12,7 @@
1313 }
1414 .TablePager_col_cr_message {
1515 max-width: 20em;
 16+ overflow: hidden;
1617 }
1718
1819 .TablePager_col_cr_timestamp {
Index: branches/REL1_17/phase3/skins/Simple.php
@@ -21,36 +21,31 @@
2222 var $skinname = 'simple', $stylename = 'simple',
2323 $template = 'MonoBookTemplate', $useHeadElement = true;
2424
25 - function setupSkinUserCss( OutputPage $out ){
 25+ function setupSkinUserCss( OutputPage $out ) {
2626 parent::setupSkinUserCss( $out );
2727
28 - $out->addStyle( 'simple/main.css', 'screen' );
29 - }
 28+ $out->addModuleStyles( 'skins.simple' );
3029
31 - function reallyGenerateUserStylesheet() {
32 - global $wgUser;
33 - $s = '';
34 - if( $wgUser->getOption( 'highlightbroken' ) ) {
35 - $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n";
36 - } else {
37 - $s .= <<<CSS
38 -a.new, #quickbar a.new,
39 -a.stub, #quickbar a.stub {
40 - color: inherit;
41 - text-decoration: inherit;
42 -}
43 -a.new:after, #quickbar a.new:after {
44 - content: "?";
45 - color: #CC2200;
46 - text-decoration: $underline;
47 -}
48 -a.stub:after, #quickbar a.stub:after {
49 - content: "!";
50 - color: #772233;
51 - text-decoration: $underline;
52 -}
53 -CSS;
 30+ /* Add some userprefs specific CSS styling */
 31+ global $wgUser, $wgContLang;
 32+ $rules = array();
 33+ $underline = "";
 34+
 35+ if ( $wgUser->getOption( 'underline' ) < 2 ) {
 36+ $underline = "text-decoration: " . $wgUser->getOption( 'underline' ) ? 'underline' : 'none' . ";";
5437 }
55 - return $s;
 38+
 39+ /* Also inherits from resourceloader */
 40+ if( !$wgUser->getOption( 'highlightbroken' ) ) {
 41+ $rules[] = "a.new, a.stub { color: inherit; text-decoration: inherit;}";
 42+ $rules[] = "a.new:after { color: #CC2200; $underline;}";
 43+ $rules[] = "a.stub:after { $underline; }";
 44+ }
 45+ $style = implode( "\n", $rules );
 46+ if ( $wgContLang->getDir() === 'rtl' ) {
 47+ $style = CSSJanus::transform( $style, true, false );
 48+ }
 49+ $out->addInlineStyle( $style );
 50+
5651 }
5752 }
Index: branches/REL1_17/phase3/skins/common/shared.css
@@ -100,12 +100,9 @@
101101 /**
102102 * Forms
103103 */
104 -body.ltr td.mw-label { text-align: right; }
105 -body.ltr td.mw-input { text-align: left; }
106 -body.ltr td.mw-submit { text-align: left; }
107 -body.rtl td.mw-label { text-align: left; }
108 -body.rtl td.mw-input { text-align: right; }
109 -body.rtl td.mw-submit { text-align: right; }
 104+td.mw-label { text-align: right; }
 105+td.mw-input { text-align: left; }
 106+td.mw-submit { text-align: left; }
110107
111108 td.mw-label { vertical-align: top; }
112109 .prefsection td.mw-label { width: 20%; }
@@ -127,12 +124,9 @@
128125 /**
129126 * Image captions
130127 */
131 -body.rtl .thumbcaption { text-align: right; }
132 -body.rtl .magnify { float: left; }
 128+.thumbcaption { text-align: left; }
 129+.magnify { float: right; }
133130
134 -body.ltr .thumbcaption { text-align: left; }
135 -body.ltr .magnify { float: right; }
136 -
137131 /**
138132 * Hidden categories
139133 */
@@ -189,9 +183,6 @@
190184 float: left;
191185 padding-left: 0.25em;
192186 }
193 -.rtl .mw-search-formheader div.search-types {
194 - float: right;
195 -}
196187 .mw-search-formheader div.search-types ul {
197188 margin: 0 !important;
198189 padding: 0 !important;
@@ -247,15 +238,9 @@
248239 margin: 0;
249240 float: left;
250241 }
251 -.rtl fieldset#mw-searchoptions h4 {
252 - float: right;
253 -}
254242 fieldset#mw-searchoptions div#mw-search-togglebox {
255243 float: right;
256244 }
257 -.rtl fieldset#mw-searchoptions div#mw-search-togglebox {
258 - float: left;
259 -}
260245
261246 fieldset#mw-searchoptions div#mw-search-togglebox label {
262247 margin-right: 0.25em;
@@ -270,15 +255,6 @@
271256 fieldset#mw-searchoptions table td {
272257 padding-right: 1em;
273258 }
274 -.rtl fieldset#mw-searchoptions table td {
275 - padding-left: 1em;
276 - padding-right: 0;
277 -}
278 -body.rtl fieldset#mw-searchoptions table {
279 - margin-right: 0;
280 - margin-left: 3em;
281 - float: right;
282 -}
283259 fieldset#mw-searchoptions div.divider {
284260 clear: both;
285261 border-bottom: 1px solid #DDDDDD;
@@ -300,10 +276,6 @@
301277 margin-top: 2ex;
302278 }
303279
304 -.rtl div#mw-search-interwiki {
305 - float: left;
306 -}
307 -
308280 div#mw-search-interwiki li {
309281 font-size: 95%;
310282 }
@@ -313,10 +285,6 @@
314286 font-size: 90%;
315287 }
316288
317 -.rtl .mw-search-interwiki-more {
318 - float: left;
319 -}
320 -
321289 div#mw-search-interwiki-caption {
322290 text-align: center;
323291 font-weight: bold;
@@ -334,10 +302,6 @@
335303 border-top: 1px solid #BBBBBB;
336304 }
337305
338 -.rtl .mw-search-interwiki-project {
339 - text-align: right;
340 -}
341 -
342306 span.searchalttitle {
343307 font-size: 95%;
344308 }
Property changes on: branches/REL1_17/phase3/skins/common/shared.css
___________________________________________________________________
Modified: svn:mergeinfo
345309 Merged /trunk/phase3/skins/common/shared.css:r80697,80755,80771,80773-80774,80779,80816,80833
Index: branches/REL1_17/phase3/skins/common/diff.css
@@ -11,9 +11,6 @@
1212 td.diff-marker {
1313 text-align: right;
1414 }
15 -.rtl td.diff-marker {
16 - text-align: left;
17 -}
1815 td.diff-lineno {
1916 font-weight: bold;
2017 }
Index: branches/REL1_17/phase3/includes/parser/Parser.php
@@ -4207,7 +4207,6 @@
42084208 */
42094209 public function startExternalParse( &$title, $options, $outputType, $clearState = true ) {
42104210 $this->setTitle( $title );
4211 - $options->resetUsage();
42124211 $this->mOptions = $options;
42134212 $this->setOutputType( $outputType );
42144213 if ( $clearState ) {
@@ -5082,7 +5081,6 @@
50835082 $title = Title::newFromText( $title );
50845083 }
50855084 $this->mTitle = $title;
5086 - $options->resetUsage();
50875085 $this->setOutputType( $outputType );
50885086 $text = $this->replaceVariables( $text );
50895087 $text = $this->mStripState->unstripBoth( $text );
Property changes on: branches/REL1_17/phase3/includes/parser/Parser.php
___________________________________________________________________
Modified: svn:mergeinfo
50905088 Merged /trunk/phase3/includes/parser/Parser.php:r80697,80755,80771,80773-80774,80779,80816,80833
Index: branches/REL1_17/phase3/includes/OutputPage.php
@@ -1368,10 +1368,12 @@
13691369 *
13701370 * @param $header String: header name
13711371 * @param $option either an Array or null
 1372+ * @fixme Document the $option parameter; it appears to be for
 1373+ * X-Vary-Options but what format is acceptable?
13721374 */
13731375 public function addVaryHeader( $header, $option = null ) {
13741376 if ( !array_key_exists( $header, $this->mVaryHeader ) ) {
1375 - $this->mVaryHeader[$header] = $option;
 1377+ $this->mVaryHeader[$header] = (array)$option;
13761378 } elseif( is_array( $option ) ) {
13771379 if( is_array( $this->mVaryHeader[$header] ) ) {
13781380 $this->mVaryHeader[$header] = array_merge( $this->mVaryHeader[$header], $option );
Property changes on: branches/REL1_17/phase3/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
13791381 Merged /trunk/phase3/includes/OutputPage.php:r80697,80755,80771,80773-80774,80779,80816,80833
Index: branches/REL1_17/phase3/includes/api/ApiQuery.php
@@ -424,7 +424,7 @@
425425 ApiQueryBase::addTitleInfo( $vals, $title );
426426 $vals['special'] = '';
427427 if ( $title->getNamespace() == NS_SPECIAL &&
428 - !SpecialPage::exists( $title->getText() ) ) {
 428+ !SpecialPage::exists( $title->getDbKey() ) ) {
429429 $vals['missing'] = '';
430430 } elseif ( $title->getNamespace() == NS_MEDIA &&
431431 !wfFindFile( $title ) ) {
Index: branches/REL1_17/phase3/includes/specials/SpecialSearch.php
@@ -108,6 +108,8 @@
109109 if( !is_null( $t ) ) {
110110 global $wgGoToEdit;
111111 wfRunHooks( 'SpecialSearchNogomatch', array( &$t ) );
 112+ wfDebugLog( 'nogomatch', $t->getText(), false );
 113+
112114 # If the feature is enabled, go straight to the edit page
113115 if( $wgGoToEdit ) {
114116 $wgOut->redirect( $t->getFullURL( array( 'action' => 'edit' ) ) );
Property changes on: branches/REL1_17/phase3/includes/specials/SpecialSearch.php
___________________________________________________________________
Modified: svn:mergeinfo
115117 Merged /trunk/phase3/includes/specials/SpecialSearch.php:r80697,80755,80771,80773-80774,80779,80816,80833
Index: branches/REL1_17/phase3/resources/Resources.php
@@ -14,6 +14,9 @@
1515 'skins.vector' => array(
1616 'styles' => array( 'skins/vector/screen.css' => array( 'media' => 'screen' ) )
1717 ),
 18+ 'skins.simple' => array(
 19+ 'styles' => array( 'skins/simple/main.css' => array( 'media' => 'screen' ) ),
 20+ ),
1821
1922 /* jQuery */
2023

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80697Fold Avars Nogomatch extension into core...reedy19:02, 21 January 2011
r80755* (bug 26861) avoid warning in OutputPage::addVaryHeader when $options param ...brion16:59, 22 January 2011
r80767* (bug 21544) CodeReview commit list: keep long URLs from overflowing out of ...brion20:38, 22 January 2011
r80771Finish porting the Simple skin to resourceloader....hartman21:16, 22 January 2011
r80773Remove RTL definitions from skins/common/shared.css...hartman22:21, 22 January 2011
r80774Follow up to r80773. Repair the thumbcaptions alignment.hartman22:29, 22 January 2011
r80779Fix an rtl issue with diff markers. This rtl specific line is no longer neede...hartman23:21, 22 January 2011
r80816Remove a couple of calls to ParserOptions::resetUsage(), missed on its remova...platonides15:56, 23 January 2011
r80833Follow-up r69233: use getDbKey() instead of getText() for special pages.btongminh20:19, 23 January 2011
r80845ContactPage extension fixes:...brion08:00, 24 January 2011

Status & tagging log