r79373 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79372‎ | r79373 | r79374 >
Date:21:09, 31 December 2010
Author:catrope
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_17/extensions/TrustedXFF/trusted-hosts.txt (modified) (history)
  • /branches/REL1_17/phase3/includes/Article.php (modified) (history)
  • /branches/REL1_17/phase3/includes/GlobalFunctions.php (modified) (history)
  • /branches/REL1_17/phase3/includes/api/ApiQueryPageProps.php (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/WebInstallerPage.php (modified) (history)
  • /branches/REL1_17/phase3/maintenance/Maintenance.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/TrustedXFF/trusted-hosts.txt
@@ -1272,3 +1272,14 @@
12731273 s-lb-a01.isp.t-ipnet.de
12741274 do-lb-a01.isp.t-ipnet.de
12751275
 1276+# websense.net security proxy service
 1277+# Source: email, reverse DNS
 1278+85.115.52.180
 1279+85.115.54.180
 1280+85.115.60.180
 1281+85.115.58.180
 1282+208.87.233.180
 1283+208.87.234.180
 1284+116.50.57.180
 1285+116.50.58.180
 1286+
Property changes on: branches/REL1_17/extensions/TrustedXFF/trusted-hosts.txt
___________________________________________________________________
Modified: svn:mergeinfo
12761287 Merged /trunk/extensions/TrustedXFF/trusted-hosts.txt:r78622
Index: branches/REL1_17/phase3/maintenance/Maintenance.php
@@ -102,10 +102,16 @@
103103 protected static $mCoreScripts = null;
104104
105105 /**
106 - * Default constructor. Children should call this if implementing
 106+ * Default constructor. Children should call this *first* if implementing
107107 * their own constructors
108108 */
109109 public function __construct() {
 110+ // Setup $IP, using MW_INSTALL_PATH if it exists
 111+ global $IP;
 112+ $IP = strval( getenv( 'MW_INSTALL_PATH' ) ) !== ''
 113+ ? getenv( 'MW_INSTALL_PATH' )
 114+ : realpath( dirname( __FILE__ ) . '/..' );
 115+
110116 $this->addDefaultParams();
111117 register_shutdown_function( array( $this, 'outputChanneled' ), false );
112118 }
@@ -415,7 +421,7 @@
416422 * Do some sanity checking and basic setup
417423 */
418424 public function setup() {
419 - global $IP, $wgCommandLineMode, $wgRequestTime;
 425+ global $wgCommandLineMode, $wgRequestTime;
420426
421427 # Abort if called from a web server
422428 if ( isset( $_SERVER ) && isset( $_SERVER['REQUEST_METHOD'] ) ) {
@@ -459,11 +465,6 @@
460466 # Define us as being in MediaWiki
461467 define( 'MEDIAWIKI', true );
462468
463 - # Setup $IP, using MW_INSTALL_PATH if it exists
464 - $IP = strval( getenv( 'MW_INSTALL_PATH' ) ) !== ''
465 - ? getenv( 'MW_INSTALL_PATH' )
466 - : realpath( dirname( __FILE__ ) . '/..' );
467 -
468469 $wgCommandLineMode = true;
469470 # Turn off output buffering if it's on
470471 @ob_end_flush();
Index: branches/REL1_17/phase3/includes/installer/WebInstallerPage.php
@@ -597,11 +597,16 @@
598598 'label' => 'config-admin-email',
599599 'help' => $this->parent->getHelpBox( 'config-admin-email-help' )
600600 ) ) .
601 - $this->parent->getCheckBox( array(
 601+ /**
 602+ * Uncomment this feature once we've got some sort of API to mailman
 603+ * to handle these subscriptions. Some dummy wrapper script on the
 604+ * mailman box that shell's out to mailman/bin/add_members would do
 605+ $this->parent->getCheckBox( array(
602606 'var' => '_Subscribe',
603607 'label' => 'config-subscribe',
604608 'help' => $this->parent->getHelpBox( 'config-subscribe-help' )
605609 ) ) .
 610+ */
606611 $this->getFieldSetEnd() .
607612 $this->parent->getInfoBox( wfMsg( 'config-almost-done' ) ) .
608613 $this->parent->getRadioSet( array(
Property changes on: branches/REL1_17/phase3/includes/installer/WebInstallerPage.php
___________________________________________________________________
Added: svn:mergeinfo
609614 Merged /branches/REL1_15/phase3/includes/installer/WebInstallerPage.php:r51646
610615 Merged /branches/sqlite/includes/installer/WebInstallerPage.php:r58211-58321
611616 Merged /trunk/phase3/includes/installer/WebInstallerPage.php:r79089
612617 Merged /branches/new-installer/phase3/includes/installer/WebInstallerPage.php:r43664-66004
613618 Merged /branches/wmf-deployment/includes/installer/WebInstallerPage.php:r53381
Index: branches/REL1_17/phase3/includes/Article.php
@@ -1478,7 +1478,7 @@
14791479 $parserOptions->setIsPrintable( $wgOut->isPrintable() );
14801480
14811481 # Don't show section-edit links on old revisions... this way lies madness.
1482 - if ( !$this->isCurrent() || $wgOut->isPrintable() ) {
 1482+ if ( !$this->isCurrent() || $wgOut->isPrintable() || !$this->mTitle->quickUserCan( 'edit' ) ) {
14831483 $parserOptions->setEditSection( false );
14841484 }
14851485
Property changes on: branches/REL1_17/phase3/includes/Article.php
___________________________________________________________________
Added: svn:mergeinfo
14861486 Merged /branches/sqlite/includes/Article.php:r58211-58321
14871487 Merged /trunk/phase3/includes/Article.php:r79185
14881488 Merged /branches/new-installer/phase3/includes/Article.php:r43664-66004
14891489 Merged /branches/wmf-deployment/includes/Article.php:r53381
14901490 Merged /branches/REL1_15/phase3/includes/Article.php:r51646
Index: branches/REL1_17/phase3/includes/GlobalFunctions.php
@@ -1988,7 +1988,7 @@
19891989 $da = array();
19901990 $strtime = '';
19911991
1992 - if ( $ts === 0 ) {
 1992+ if ( !$ts ) { // We want to catch 0, '', null... but not date strings starting with a letter.
19931993 $uts = time();
19941994 $strtime = "@$uts";
19951995 } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {
@@ -2028,7 +2028,7 @@
20292029 # asctime
20302030 $strtime = $ts;
20312031 } else {
2032 - # Bogus value; fall back to the epoch...
 2032+ # Bogus value...
20332033 wfDebug("wfTimestamp() fed bogus time value: $outputtype; $ts\n");
20342034
20352035 return false;
Property changes on: branches/REL1_17/phase3/includes/GlobalFunctions.php
___________________________________________________________________
Modified: svn:mergeinfo
20362036 Merged /trunk/phase3/includes/GlobalFunctions.php:r79213-79214,79253
Index: branches/REL1_17/phase3/includes/api/ApiQueryPageProps.php
@@ -47,6 +47,10 @@
4848
4949 # Only operate on existing pages
5050 $pages = $this->getPageSet()->getGoodTitles();
 51+ if ( !count( $pages ) ) {
 52+ # Nothing to do
 53+ return;
 54+ }
5155
5256 $this->addTables( 'page_props' );
5357 $this->addFields( array( 'pp_page', 'pp_propname', 'pp_value' ) );
Property changes on: branches/REL1_17/phase3/includes/api/ApiQueryPageProps.php
___________________________________________________________________
Added: svn:mergeinfo
5458 Merged /branches/wmf-deployment/includes/api/ApiQueryPageProps.php:r53381,59952
5559 Merged /branches/REL1_15/phase3/includes/api/ApiQueryPageProps.php:r51646
5660 Merged /branches/REL1_16/phase3/includes/api/ApiQueryPageProps.php:r63621-63636,69357
5761 Merged /branches/wmf/1.16wmf4/includes/api/ApiQueryPageProps.php:r69521
5862 Merged /branches/sqlite/includes/api/ApiQueryPageProps.php:r58211-58321
5963 Merged /trunk/phase3/includes/api/ApiQueryPageProps.php:r79199

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78308Fix for r75858: Move $IP detection further up so it can be used in child cons...demon15:30, 13 December 2010
r78622Added Websensetstarling13:10, 20 December 2010
r79089Comment out "subscribe to mediawiki-l" feature until we actually implement it...demon23:02, 27 December 2010
r79185(Bug 26458) Section edit links appear on pages that user does not have right ...platonides16:42, 29 December 2010
r79199Follow-up to r75282: don't query if there are no pages to querybtongminh20:32, 29 December 2010
r79213Followup r71751: change strict comparison to loose per CR, and add a comment ...catrope22:28, 29 December 2010
r79214Fix r79213: and $ts === null too, per CRcatrope22:30, 29 December 2010
r79253Fix r71751 problems with textual parameters....platonides16:10, 30 December 2010

Status & tagging log