r90118 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90117‎ | r90118 | r90119 >
Date:17:03, 15 June 2011
Author:aaron
Status:ok
Tags:
Comment:
Broke some long lines
Modified paths:
  • /trunk/phase3/includes/LinksUpdate.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LinksUpdate.php
@@ -110,7 +110,8 @@
111111 $existing = $this->getExistingImages();
112112
113113 $imageDeletes = $this->getImageDeletions( $existing );
114 - $this->incrTableUpdate( 'imagelinks', 'il', $imageDeletes, $this->getImageInsertions( $existing ) );
 114+ $this->incrTableUpdate( 'imagelinks', 'il', $imageDeletes,
 115+ $this->getImageInsertions( $existing ) );
115116
116117 # Invalidate all image description pages which had links added or removed
117118 $imageUpdates = $imageDeletes + array_diff_key( $this->mImages, $existing );
@@ -141,7 +142,8 @@
142143
143144 $categoryDeletes = $this->getCategoryDeletions( $existing );
144145
145 - $this->incrTableUpdate( 'categorylinks', 'cl', $categoryDeletes, $this->getCategoryInsertions( $existing ) );
 146+ $this->incrTableUpdate( 'categorylinks', 'cl', $categoryDeletes,
 147+ $this->getCategoryInsertions( $existing ) );
146148
147149 # Invalidate all categories which were added, deleted or changed (set symmetric difference)
148150 $categoryInserts = array_diff_assoc( $this->mCategories, $existing );
@@ -154,7 +156,8 @@
155157
156158 $propertiesDeletes = $this->getPropertyDeletions( $existing );
157159
158 - $this->incrTableUpdate( 'page_props', 'pp', $propertiesDeletes, $this->getPropertyInsertions( $existing ) );
 160+ $this->incrTableUpdate( 'page_props', 'pp', $propertiesDeletes,
 161+ $this->getPropertyInsertions( $existing ) );
159162
160163 # Invalidate the necessary pages
161164 $changed = $propertiesDeletes + array_diff_assoc( $this->mProperties, $existing );
@@ -362,7 +365,9 @@
363366 function getLinkInsertions( $existing = array() ) {
364367 $arr = array();
365368 foreach( $this->mLinks as $ns => $dbkeys ) {
366 - $diffs = isset( $existing[$ns] ) ? array_diff_key( $dbkeys, $existing[$ns] ) : $dbkeys;
 369+ $diffs = isset( $existing[$ns] )
 370+ ? array_diff_key( $dbkeys, $existing[$ns] )
 371+ : $dbkeys;
367372 foreach ( $diffs as $dbk => $id ) {
368373 $arr[] = array(
369374 'pl_from' => $this->mId,
Index: trunk/phase3/includes/SkinTemplate.php
@@ -674,7 +674,8 @@
675675 # @todo FIXME: Class depends on skin
676676 $login_url['class'] = 'link-https';
677677 if ( isset($createaccount_url) ) {
678 - $https_url = preg_replace( '/^http:/', 'https:', $title->getFullURL("type=signup") );
 678+ $https_url = preg_replace( '/^http:/', 'https:',
 679+ $title->getFullURL("type=signup") );
679680 $createaccount_url['href'] = $https_url;
680681 # @todo FIXME: Class depends on skin
681682 $createaccount_url['class'] = 'link-https';
@@ -742,7 +743,8 @@
743744 $text = $msg->text();
744745 } else {
745746 global $wgContLang;
746 - $text = $wgContLang->getFormattedNsText( MWNamespace::getSubject( $title->getNamespace() ) );
 747+ $text = $wgContLang->getFormattedNsText(
 748+ MWNamespace::getSubject( $title->getNamespace() ) );
747749 }
748750
749751 $result = array();
@@ -1033,7 +1035,8 @@
10341036 'context' => 'subject'
10351037 );
10361038
1037 - wfRunHooks( 'SkinTemplateNavigation::SpecialPage', array( &$this, &$content_navigation ) );
 1039+ wfRunHooks( 'SkinTemplateNavigation::SpecialPage',
 1040+ array( &$this, &$content_navigation ) );
10381041 }
10391042
10401043 // Gets list of language variants
@@ -1184,7 +1187,8 @@
11851188 if ( !$out->isPrintable() ) {
11861189 $nav_urls['print'] = array(
11871190 'text' => wfMsg( 'printableversion' ),
1188 - 'href' => $this->getTitle()->getLocalURL( $wgRequest->appendQueryValue( 'printable', 'yes', true ) )
 1191+ 'href' => $this->getTitle()->getLocalURL(
 1192+ $wgRequest->appendQueryValue( 'printable', 'yes', true ) )
11891193 );
11901194 }
11911195
@@ -1198,7 +1202,8 @@
11991203 }
12001204
12011205 // Use the copy of revision ID in case this undocumented, shady hook tries to mess with internals
1202 - wfRunHooks( 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink', array( &$this, &$nav_urls, &$revid, &$revid ) );
 1206+ wfRunHooks( 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink',
 1207+ array( &$this, &$nav_urls, &$revid, &$revid ) );
12031208 }
12041209
12051210 if( $this->getTitle()->getNamespace() != NS_SPECIAL ) {
@@ -1663,7 +1668,8 @@
16641669 $realAttrs = array(
16651670 'type' => 'submit',
16661671 'name' => $mode,
1667 - 'value' => $this->translator->translate( $mode == 'go' ? 'searcharticle' : 'searchbutton' ),
 1672+ 'value' => $this->translator->translate(
 1673+ $mode == 'go' ? 'searcharticle' : 'searchbutton' ),
16681674 );
16691675 $realAttrs = array_merge(
16701676 $realAttrs,
@@ -1685,7 +1691,9 @@
16861692 unset( $buttonAttrs['alt'] );
16871693 $imgAttrs = array(
16881694 'src' => $attrs['src'],
1689 - 'alt' => isset( $attrs['alt'] ) ? $attrs['alt'] : $this->translator->translate( 'searchbutton' ),
 1695+ 'alt' => isset( $attrs['alt'] )
 1696+ ? $attrs['alt']
 1697+ : $this->translator->translate( 'searchbutton' ),
16901698 );
16911699 return Html::rawElement( 'button', $buttonAttrs, Html::element( 'img', $imgAttrs ) );
16921700 default:

Status & tagging log