r97635 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97634‎ | r97635 | r97636 >
Date:15:54, 20 September 2011
Author:catrope
Status:ok
Tags:
Comment:
1.18wmf1: MFT r96760, r96765, r97551, r97552, r97622
Modified paths:
  • /branches/wmf/1.18wmf1/RELEASE-NOTES-1.18 (modified) (history)
  • /branches/wmf/1.18wmf1/includes/AutoLoader.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/Collation.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/DefaultSettings.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/OutputPage.php (modified) (history)
  • /branches/wmf/1.18wmf1/maintenance/deleteBatch.php (modified) (history)
  • /branches/wmf/1.18wmf1/skins/CologneBlue.php (modified) (history)
  • /branches/wmf/1.18wmf1/skins/Simple.php (modified) (history)
  • /branches/wmf/1.18wmf1/skins/Standard.php (modified) (history)
  • /branches/wmf/1.18wmf1/skins/common/shared.css (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/maintenance/deleteBatch.php
@@ -87,8 +87,10 @@
8888 if ( $page->getNamespace() == NS_FILE ) {
8989 $art = new ImagePage( $page );
9090 $img = wfFindFile( $art->mTitle );
91 - if ( !$img || !$img->delete( $reason ) ) {
92 - $this->output( "FAILED to delete image file... " );
 91+ if ( !$img
 92+ || !$img->isLocal()
 93+ || !$img->delete( $reason ) ) {
 94+ $this->output( " FAILED to delete image file... " );
9395 }
9496 } else {
9597 $art = new Article( $page );
@@ -96,7 +98,7 @@
9799 $success = $art->doDeleteArticle( $reason );
98100 $dbw->commit();
99101 if ( $success ) {
100 - $this->output( "\n" );
 102+ $this->output( " Deleted!\n" );
101103 } else {
102104 $this->output( " FAILED to delete article\n" );
103105 }
Index: branches/wmf/1.18wmf1/skins/Simple.php
@@ -42,7 +42,7 @@
4343 $rules[] = "a.stub:after { $underline; }";
4444 }
4545 $style = implode( "\n", $rules );
46 - $out->addInlineStyle( $style, /* flip css if RTL */true );
 46+ $out->addInlineStyle( $style, 'flip' );
4747
4848 }
4949 }
Index: branches/wmf/1.18wmf1/skins/CologneBlue.php
@@ -44,7 +44,7 @@
4545 $rules[] = "/* @noflip */body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto; bottom:4px;}"; # Hides from IE
4646 }
4747 $style = implode( "\n", $rules );
48 - $out->addInlineStyle( $style, /* flip css if RTL */true );
 48+ $out->addInlineStyle( $style, 'flip' );
4949 }
5050
5151 }
Index: branches/wmf/1.18wmf1/skins/Standard.php
@@ -27,20 +27,20 @@
2828
2929 if ( 2 == $qb ) { # Right
3030 $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }";
31 - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-left: 4px; margin-right: 152px; }";
 31+ $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }";
3232 } elseif ( 1 == $qb || 3 == $qb ) {
3333 $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }";
34 - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-left: 152px; margin-right: 4px; }";
 34+ $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }";
3535 if( 3 == $qb ) {
3636 $rules[] = "/* @noflip */#quickbar { position: fixed; padding: 4px; }";
3737 }
3838 } elseif ( 4 == $qb ) {
3939 $rules[] = "/* @noflip */#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}";
4040 $rules[] = "/* @noflip */#quickbar { border-right: 1px solid gray; }";
41 - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-right: 152px; margin-left: 4px; }";
 41+ $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }";
4242 }
4343 $style = implode( "\n", $rules );
44 - $out->addInlineStyle( $style, /* flip css if RTL */true );
 44+ $out->addInlineStyle( $style, 'flip' );
4545 }
4646
4747 }
Index: branches/wmf/1.18wmf1/skins/common/shared.css
@@ -732,6 +732,13 @@
733733 margin: 0 2em 0 0;
734734 }
735735
 736+#toc #toctitle,
 737+.toc #toctitle,
 738+#toc .toctitle,
 739+.toc .toctitle {
 740+ direction: ltr;
 741+}
 742+
736743 /* tooltip styles */
737744 .mw-help-field-hint {
738745 display: none;
Index: branches/wmf/1.18wmf1/RELEASE-NOTES-1.18
@@ -210,6 +210,7 @@
211211 them (i.e. with array_keys) to get a list of all preferences, then
212212 $wgDefaultUserOptions should no longer be used as it will contain those set via
213213 User:getDefaultOptions().
 214+* (bug 30722) Add a new collation that sorts categories in ascii sort order.
214215
215216 === Bug fixes in 1.18 ===
216217 * mw.util.getScript has been implemented (like wfScript in GlobalFunctions.php)
Index: branches/wmf/1.18wmf1/includes/AutoLoader.php
@@ -116,6 +116,7 @@
117117 'HttpRequest' => 'includes/HttpFunctions.old.php',
118118 'IContextSource' => 'includes/RequestContext.php',
119119 'IcuCollation' => 'includes/Collation.php',
 120+ 'IdentityCollation' => 'includes/Collation.php',
120121 'ImageGallery' => 'includes/ImageGallery.php',
121122 'ImageHistoryList' => 'includes/ImagePage.php',
122123 'ImageHistoryPseudoPager' => 'includes/ImagePage.php',
Property changes on: branches/wmf/1.18wmf1/includes/AutoLoader.php
___________________________________________________________________
Modified: svn:mergeinfo
123124 Merged /trunk/phase3/includes/AutoLoader.php:r96760,96765,97551-97552,97622
Index: branches/wmf/1.18wmf1/includes/Collation.php
@@ -23,6 +23,8 @@
2424 switch( $collationName ) {
2525 case 'uppercase':
2626 return new UppercaseCollation;
 27+ case 'identity':
 28+ return new IdentityCollation;
2729 case 'uca-default':
2830 return new IcuCollation( 'root' );
2931 default:
@@ -99,6 +101,30 @@
100102 }
101103 }
102104
 105+/**
 106+ * Collation class that's essentially a no-op.
 107+ *
 108+ * Does sorting based on binary value of the string.
 109+ * Like how things were pre 1.17.
 110+ */
 111+class IdentityCollation extends Collation {
 112+
 113+ function getSortKey( $string ) {
 114+ return $string;
 115+ }
 116+
 117+ function getFirstLetter( $string ) {
 118+ global $wgContLang;
 119+ // Copied from UppercaseCollation.
 120+ // I'm kind of unclear on when this could happen...
 121+ if ( $string[0] == "\0" ) {
 122+ $string = substr( $string, 1 );
 123+ }
 124+ return $wgContLang->firstChar( $string );
 125+ }
 126+}
 127+
 128+
103129 class IcuCollation extends Collation {
104130 var $primaryCollator, $mainCollator, $locale;
105131 var $firstLetterData;
Index: branches/wmf/1.18wmf1/includes/DefaultSettings.php
@@ -4798,6 +4798,8 @@
47994799 *
48004800 * - uppercase: Converts the category name to upper case, and sorts by that.
48014801 *
 4802+ * - identity: Does no conversion. Sorts by binary value of the string.
 4803+ *
48024804 * - uca-default: Provides access to the Unicode Collation Algorithm with
48034805 * the default element table. This is a compromise collation which sorts
48044806 * all languages in a mediocre way. However, it is better than "uppercase".
@@ -4811,7 +4813,7 @@
48124814 * the sort keys in the database.
48134815 *
48144816 * Extensions can define there own collations by subclassing Collation
4815 - * and using the class name as the value of this variable.
 4817+ * and using the Collation::factory hook.
48164818 */
48174819 $wgCategoryCollation = 'uppercase';
48184820
Index: branches/wmf/1.18wmf1/includes/OutputPage.php
@@ -2902,10 +2902,10 @@
29032903 /**
29042904 * Adds inline CSS styles
29052905 * @param $style_css Mixed: inline CSS
2906 - * @param $flip Boolean: Whether to flip the CSS if needed
 2906+ * @param $flip False or String: Set to 'flip' to flip the CSS if needed
29072907 */
29082908 public function addInlineStyle( $style_css, $flip = false ) {
2909 - if( $flip && $this->getLang()->isRTL() ) {
 2909+ if( $flip === 'flip' && $this->getLang()->isRTL() ) {
29102910 # If wanted, and the interface is right-to-left, flip the CSS
29112911 $style_css = CSSJanus::transform( $style_css, true, false );
29122912 }
Property changes on: branches/wmf/1.18wmf1/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
29132913 Merged /trunk/phase3/includes/OutputPage.php:r96760,96765,97551-97552,97622

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96760* Per Aaron on r96261, use string 'flip' instead of boolean...robin23:51, 10 September 2011
r96765(bug 30722) Add an identity collation that sorts things based on what the uni...bawolff01:13, 11 September 2011
r97551Don't try and delete ForeignAPIFile or ForeignDBFile...reedy20:20, 19 September 2011
r97552Followup r97551, use isLocal, more dynamic!reedy20:27, 19 September 2011
r97622As reported in bug 31031, WebKit can mess up the TOC title (which is in user ...robin13:05, 20 September 2011

Status & tagging log