[MediaWiki-CVS] SVN: [75692] trunk/phase3/maintenance/tests/parser/parserTests.txt
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75692 Revision: 75692 Author: philip Date: 2010-10-30 05:42:16 + (Sat, 30 Oct 2010) Log Message: --- Forgot to commit this one. parserTests fix for r75617 (in trunk/phase3/includes/Title.php). Modified Paths: -- trunk/phase3/maintenance/tests/parser/parserTests.txt Modified: trunk/phase3/maintenance/tests/parser/parserTests.txt === --- trunk/phase3/maintenance/tests/parser/parserTests.txt 2010-10-30 00:10:25 UTC (rev 75691) +++ trunk/phase3/maintenance/tests/parser/parserTests.txt 2010-10-30 05:42:16 UTC (rev 75692) @@ -7396,7 +7396,7 @@ !! input -{[[Main Page]]}- !! result -Main Page +Main Page !! end ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75690] trunk/phase3/maintenance/tests/phpunit/includes/ UserIsValidEmailAddrTest.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75690 Revision: 75690 Author: hashar Date: 2010-10-29 22:42:37 + (Fri, 29 Oct 2010) Log Message: --- Follow up r75682 : fix private function naming. Fix cruise control build 2010-10-29T22:18:27 Modified Paths: -- trunk/phase3/maintenance/tests/phpunit/includes/UserIsValidEmailAddrTest.php Modified: trunk/phase3/maintenance/tests/phpunit/includes/UserIsValidEmailAddrTest.php === --- trunk/phase3/maintenance/tests/phpunit/includes/UserIsValidEmailAddrTest.php 2010-10-29 22:42:07 UTC (rev 75689) +++ trunk/phase3/maintenance/tests/phpunit/includes/UserIsValidEmailAddrTest.php 2010-10-29 22:42:37 UTC (rev 75690) @@ -2,7 +2,7 @@ class UserIsValidEmailAddrTest extends PHPUnit_Framework_TestCase { - private function testEmail( $addr, $expected = true, $msg = '') { + private function checkEmail( $addr, $expected = true, $msg = '') { $this->assertEquals( $expected, User::isValidEmailAddr( $addr ), @@ -10,10 +10,10 @@ ); } private function valid( $addr, $msg = '' ) { - $this->testEmail( $addr, true, $msg ); + $this->checkEmail( $addr, true, $msg ); } private function invalid( $addr, $msg = '' ) { - $this->testEmail( $addr, false, $msg ); + $this->checkEmail( $addr, false, $msg ); } function testEmailWellKnownUserAtHostDotTldAreValid() { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75689] trunk/extensions
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75689 Revision: 75689 Author: reedy Date: 2010-10-29 22:42:07 + (Fri, 29 Oct 2010) Log Message: --- Mark a couple of methods static Change a couple of static calls to non static functions to $this-> Modified Paths: -- trunk/extensions/Collection/Collection.suggest.php trunk/extensions/ReaderFeedback/specialpages/RatingHistory_body.php Modified: trunk/extensions/Collection/Collection.suggest.php === --- trunk/extensions/Collection/Collection.suggest.php 2010-10-29 22:38:26 UTC (rev 75688) +++ trunk/extensions/Collection/Collection.suggest.php 2010-10-29 22:42:07 UTC (rev 75689) @@ -51,7 +51,7 @@ *or a number of articles to add or a value (1 - 1.5) all articles with a *higher value will be added to the collection */ - public function run( $mode = '', $param = '' ) { + public static function run( $mode = '', $param = '' ) { global $wgOut; if ( !CollectionSession::hasSession() ) { Modified: trunk/extensions/ReaderFeedback/specialpages/RatingHistory_body.php === --- trunk/extensions/ReaderFeedback/specialpages/RatingHistory_body.php 2010-10-29 22:38:26 UTC (rev 75688) +++ trunk/extensions/ReaderFeedback/specialpages/RatingHistory_body.php 2010-10-29 22:42:07 UTC (rev 75689) @@ -547,7 +547,7 @@ */ public function getFilePath( $tag, $ext='' ) { global $wgUploadDirectory; - $rel = self::getRelPath( $tag, $ext ); + $rel = $this->getRelPath( $tag, $ext ); return "{$wgUploadDirectory}/graphs/{$rel}"; } @@ -559,7 +559,7 @@ */ public function getUrlPath( $tag, $ext='' ) { global $wgUploadPath; - $rel = self::getRelPath( $tag, $ext ); + $rel = $this->getRelPath( $tag, $ext ); return "{$wgUploadPath}/graphs/{$rel}"; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75688] trunk/phase3/languages/messages/MessagesHe.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75688 Revision: 75688 Author: rotem Date: 2010-10-29 22:38:26 + (Fri, 29 Oct 2010) Log Message: --- Localization update for he. Modified Paths: -- trunk/phase3/languages/messages/MessagesHe.php Modified: trunk/phase3/languages/messages/MessagesHe.php === --- trunk/phase3/languages/messages/MessagesHe.php 2010-10-29 22:35:20 UTC (rev 75687) +++ trunk/phase3/languages/messages/MessagesHe.php 2010-10-29 22:38:26 UTC (rev 75688) @@ -151,7 +151,6 @@ 'nse' => array( '0', 'מרחב שם מקודד:', 'NSE:' ), 'localurl' => array( '0', 'כתובת יחסית:', 'LOCALURL:' ), 'localurle' => array( '0', 'כתובת יחסית מקודד:', 'LOCALURLE:' ), - 'linkurl' => array( '0', 'כתובת קישור:', 'LINKURL:' ), 'articlepath' => array( '0', 'נתיב הדפים', 'ARTICLEPATH' ), 'server'=> array( '0', 'כתובת השרת', 'שרת', 'SERVER' ), 'servername'=> array( '0', 'שם השרת', 'SERVERNAME' ), ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75687] trunk/phase3/languages/messages/MessagesHe.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75687 Revision: 75687 Author: rotem Date: 2010-10-29 22:35:20 + (Fri, 29 Oct 2010) Log Message: --- Localization update for he. Modified Paths: -- trunk/phase3/languages/messages/MessagesHe.php Modified: trunk/phase3/languages/messages/MessagesHe.php === --- trunk/phase3/languages/messages/MessagesHe.php 2010-10-29 22:26:25 UTC (rev 75686) +++ trunk/phase3/languages/messages/MessagesHe.php 2010-10-29 22:35:20 UTC (rev 75687) @@ -735,6 +735,7 @@ 'yourpassword' => 'סיסמה:', 'yourpasswordagain' => 'הקש סיסמה שנית:', 'remembermypassword' => 'זכירת הכניסה שלי בדפדפן זה (למשך עד {{PLURAL:$1|יום אחד|$1 ימים|יומיים}})', +'securelogin-stick-https'=> 'המשך שימוש ב־HTTPS אחרי הכניסה', 'yourdomainname' => 'התחום שלך:', 'externaldberror'=> 'הייתה שגיאה בבסיס הנתונים של ההזדהות, או שאינכם רשאים לעדכן את חשבונכם החיצוני.', 'login' => 'כניסה לחשבון', @@ -771,6 +772,7 @@ 'wrongpasswordempty' => 'הסיסמה שהקלדתם ריקה. אנא נסו שוב.', 'passwordtooshort' => 'סיסמאות חייבות להיות באורך {{PLURAL:$1|תו אחד|$1 תווים}} לפחות.', 'password-name-match'=> 'סיסמתכם חייבת להיות שונה משם המשתמש שלכם.', +'password-too-weak' => 'הסיסמה שבחרתם חלשה מדי ולא ניתן להשתמש בה.', 'mailmypassword' => 'שלחו לי סיסמה חדשה', 'passwordremindertitle' => 'סיסמה זמנית חדשה מ{{grammar:תחילית|{{SITENAME', 'passwordremindertext' => 'מישהו (ככל הנראה אתם, מכתובת ה־IP מספר $1) ביקש סיסמה @@ -1837,6 +1839,7 @@ 'listfiles_search_for' => 'חיפוש קובץ מדיה בשם:', 'imgfile' => 'קובץ', 'listfiles' => 'רשימת קבצים', +'listfiles_thumb' => 'תמונה ממוזערת', 'listfiles_date'=> 'תאריך', 'listfiles_name'=> 'שם', 'listfiles_user'=> 'משתמש', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75686] trunk/extensions/ProofreadPage/ProofreadPage_body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75686 Revision: 75686 Author: reedy Date: 2010-10-29 22:26:25 + (Fri, 29 Oct 2010) Log Message: --- Fixup crappily built query (not brilliant, but better) Modified Paths: -- trunk/extensions/ProofreadPage/ProofreadPage_body.php Modified: trunk/extensions/ProofreadPage/ProofreadPage_body.php === --- trunk/extensions/ProofreadPage/ProofreadPage_body.php 2010-10-29 22:24:13 UTC (rev 75685) +++ trunk/extensions/ProofreadPage/ProofreadPage_body.php 2010-10-29 22:26:25 UTC (rev 75686) @@ -471,21 +471,18 @@ $page_namespace = $this->page_namespace; $dbr = wfGetDB( DB_SLAVE ); $catlinks = $dbr->tableName( 'categorylinks' ); + + $values = array(); foreach ( $page_ids as $id => $pdbk ) { // consider only link in page namespace if ( preg_match( "/^$page_namespace:(.*?)$/", $pdbk ) ) { $colours[$pdbk] = 'quality1'; - if ( !isset( $query ) ) { - $query = "SELECT cl_from, cl_to FROM $catlinks WHERE cl_from IN("; - } else { - $query .= ', '; - } - $query .= intval( $id ); + $values[] = intval( $id ); } } - if ( isset( $query ) ) { - $query .= ')'; + if ( count( $values ) ) { + $query .= "SELECT cl_from, cl_to FROM $catlinks WHERE cl_from IN(" . implode( ",", $values ) . ")"; $res = $dbr->query( $query, __METHOD__ ); foreach ( $res as $x ) { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75685] trunk/extensions/ProofreadPage/ProofreadPage.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75685 Revision: 75685 Author: reedy Date: 2010-10-29 22:24:13 + (Fri, 29 Oct 2010) Log Message: --- Revert r75684, as it does something due to sucky code Modified Paths: -- trunk/extensions/ProofreadPage/ProofreadPage.php Modified: trunk/extensions/ProofreadPage/ProofreadPage.php === --- trunk/extensions/ProofreadPage/ProofreadPage.php2010-10-29 22:15:45 UTC (rev 75684) +++ trunk/extensions/ProofreadPage/ProofreadPage.php2010-10-29 22:24:13 UTC (rev 75685) @@ -19,6 +19,8 @@ die( "ProofreadPage extension\n" ); } +$wgExtensionFunctions[] = 'wfProofreadPage'; + $dir = dirname( __FILE__ ) . '/'; $wgExtensionMessagesFiles['ProofreadPage'] = $dir . 'ProofreadPage.i18n.php'; $wgExtensionAliasesFiles['ProofreadPage'] = $dir . 'ProofreadPage.alias.php'; @@ -46,3 +48,8 @@ # Group allowed to modify pagequality $wgGroupPermissions['user']['pagequality'] = true; + +function wfProofreadPage() { + new ProofreadPage; + return true; +} ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75684] trunk/extensions/ProofreadPage/ProofreadPage.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75684 Revision: 75684 Author: reedy Date: 2010-10-29 22:15:45 + (Fri, 29 Oct 2010) Log Message: --- Remove a function that literally does nothingg Modified Paths: -- trunk/extensions/ProofreadPage/ProofreadPage.php Modified: trunk/extensions/ProofreadPage/ProofreadPage.php === --- trunk/extensions/ProofreadPage/ProofreadPage.php2010-10-29 22:15:26 UTC (rev 75683) +++ trunk/extensions/ProofreadPage/ProofreadPage.php2010-10-29 22:15:45 UTC (rev 75684) @@ -19,8 +19,6 @@ die( "ProofreadPage extension\n" ); } -$wgExtensionFunctions[] = 'wfProofreadPage'; - $dir = dirname( __FILE__ ) . '/'; $wgExtensionMessagesFiles['ProofreadPage'] = $dir . 'ProofreadPage.i18n.php'; $wgExtensionAliasesFiles['ProofreadPage'] = $dir . 'ProofreadPage.alias.php'; @@ -48,8 +46,3 @@ # Group allowed to modify pagequality $wgGroupPermissions['user']['pagequality'] = true; - -function wfProofreadPage() { - new ProofreadPage; - return true; -} ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75683] trunk/extensions/ProofreadPage/ProofreadPage_body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75683 Revision: 75683 Author: catrope Date: 2010-10-29 22:15:26 + (Fri, 29 Oct 2010) Log Message: --- Fix undefined $basepath warning reported by Reedy Modified Paths: -- trunk/extensions/ProofreadPage/ProofreadPage_body.php Modified: trunk/extensions/ProofreadPage/ProofreadPage_body.php === --- trunk/extensions/ProofreadPage/ProofreadPage_body.php 2010-10-29 22:03:17 UTC (rev 75682) +++ trunk/extensions/ProofreadPage/ProofreadPage_body.php 2010-10-29 22:15:26 UTC (rev 75683) @@ -101,7 +101,7 @@ 'proofreadpage_quality3_category', 'proofreadpage_quality4_category', ) - ), $basepath, $remotepath + ), $localpath, $remotepath ) ); @@ -110,7 +110,7 @@ new ResourceLoaderFileModule( array( 'scripts' => 'proofread_article.js' - ), $basepath, $remotepath + ), $localpath, $remotepath ) ); @@ -118,7 +118,7 @@ 'ext.proofreadpage.index', new ResourceLoaderFileModule( array( 'scripts' => 'proofread_index.js' ), - $basepath, $remotepath + $localpath, $remotepath ) ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75682] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75682 Revision: 75682 Author: hashar Date: 2010-10-29 22:03:17 + (Fri, 29 Oct 2010) Log Message: --- Follow up r75627. Implements r75670 in PHP to validate emails. * Server side validation of email according to an HTML5 specifications provided by Simetrical : http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state * This is NOT a fix of bug 959 (which wants RFC 2822 validation) * Basic unit tests Modified Paths: -- trunk/phase3/includes/User.php Added Paths: --- trunk/phase3/maintenance/tests/phpunit/includes/UserIsValidEmailAddrTest.php Modified: trunk/phase3/includes/User.php === --- trunk/phase3/includes/User.php 2010-10-29 21:59:45 UTC (rev 75681) +++ trunk/phase3/includes/User.php 2010-10-29 22:03:17 UTC (rev 75682) @@ -648,8 +648,19 @@ if( !wfRunHooks( 'isValidEmailAddr', array( $addr, &$result ) ) ) { return $result; } + $rfc5322_atext = "a-z0-9!#$%&'*+-\/=?^_`{|}—~" ; + $rfc1034_ldh_str = "a-z0-9-" ; - return strpos( $addr, '@' ) !== false; + $HTML5_email_regexp = "/ + ^ # start of string + [$rfc5322_atext\\.]+# user part which is liberal :p + @ # 'apostrophe' + [$rfc1034_ldh_str] # Domain first character + [$rfc1034_ldh_str\\.]+ # Second char and following can include dot + $ # End of string + /ix" ; // case Insensitive, eXtended + + return (bool) preg_match( $HTML5_email_regexp, $addr ); } /** Added: trunk/phase3/maintenance/tests/phpunit/includes/UserIsValidEmailAddrTest.php === --- trunk/phase3/maintenance/tests/phpunit/includes/UserIsValidEmailAddrTest.php (rev 0) +++ trunk/phase3/maintenance/tests/phpunit/includes/UserIsValidEmailAddrTest.php 2010-10-29 22:03:17 UTC (rev 75682) @@ -0,0 +1,63 @@ +assertEquals( + $expected, + User::isValidEmailAddr( $addr ), + $msg + ); + } + private function valid( $addr, $msg = '' ) { + $this->testEmail( $addr, true, $msg ); + } + private function invalid( $addr, $msg = '' ) { + $this->testEmail( $addr, false, $msg ); + } + + function testEmailWellKnownUserAtHostDotTldAreValid() { + $this->valid( 'u...@example.com' ); + $this->valid( 'u...@example.museum' ); + } + function testEmailWithUpperCaseCharactersAreValid() { + $this->valid( 'u...@example.com' ); + $this->valid( 'u...@example.com' ); + $this->valid( 'u...@example.com' ); + $this->valid( 'u...@example.com' ); + } + function testEmailWithAPlusInUserName() { + $this->valid( 'user+...@localdomain' ); + } + function testEmailWithWhiteSpacesBeforeOrAfterAreInvalids() { + $this->invalid( " u...@host" ); + $this->invalid( "u...@host " ); + $this->invalid( "\tu...@host" ); + $this->invalid( "u...@host\t" ); + } + function testEmailWithWhiteSpacesAreInvalids() { + $this->invalid( "User u...@host" ); + $this->invalid( "first l...@mycompany" ); + $this->invalid( "firstl...@my company" ); + } + function testEmailDomainCanNotBeginWithDot() { + $this->invalid( "u...@." ); + $this->invalid( "u...@.localdomain" ); + $this->valid( "u...@localdomain." ); + $this->valid( "us...@localdomain" ); + $this->valid( "@localdomain" ); + $this->valid( "@a" ); + } + function testEmailWithFunnyCharacters() { + $this->valid( "\$user!ex{th...@123.com" ); + } + function testEmailTopLevelDomainCanBeNumerical() { + $this->valid( "u...@example.1234" ); + } + function testEmailWithoutAtSignIsInvalid() { + $this->invalid( 'useràexample.com' ); + } + function testEmailWithOneCharacterDomainIsInvalid() { + $this->invalid( 'u...@a' ); + } +} ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75681] trunk/extensions/MWSearch/MWSearchUpdater.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75681 Revision: 75681 Author: reedy Date: 2010-10-29 21:59:45 + (Fri, 29 Oct 2010) Log Message: --- Make all functions static. Used as static, and commented as such, but not actually static :/ Modified Paths: -- trunk/extensions/MWSearch/MWSearchUpdater.php Modified: trunk/extensions/MWSearch/MWSearchUpdater.php === --- trunk/extensions/MWSearch/MWSearchUpdater.php 2010-10-29 21:55:29 UTC (rev 75680) +++ trunk/extensions/MWSearch/MWSearchUpdater.php 2010-10-29 21:59:45 UTC (rev 75681) @@ -19,7 +19,7 @@ * @return bool * @static */ - function updatePage( $dbname, $title, $text ) { + static function updatePage( $dbname, $title, $text ) { return MWSearchUpdater::sendRPC( 'searchupdater.updatePage', array( $dbname, $title, $text ) ); } @@ -35,7 +35,7 @@ * @return bool * @static */ - function updatePageData( $dbname, $title, $text, $metadata ) { + static function updatePageData( $dbname, $title, $text, $metadata ) { $translated = array(); foreach( $metadata as $pair ) { list( $key, $value ) = explode( '=', $pair, 2 ); @@ -53,7 +53,7 @@ * @return bool * @static */ - function deletePage( $dbname, $title ) { + static function deletePage( $dbname, $title ) { return MWSearchUpdater::sendRPC( 'searchupdater.deletePage', array( $dbname, $title ) ); } @@ -63,7 +63,7 @@ * @return string * @static */ - function getStatus() { + static function getStatus() { return MWSearchUpdater::sendRPC( 'searchupdater.getStatus' ); } @@ -72,7 +72,7 @@ * @return bool * @static */ - function start() { + static function start() { return MWSearchUpdater::sendRPC( 'searchupdater.start' ); } @@ -81,7 +81,7 @@ * @return bool * @static */ - function stop() { + static function stop() { return MWSearchUpdater::sendRPC( 'searchupdater.stop' ); } @@ -90,7 +90,7 @@ * @return bool * @static */ - function quit() { + static function quit() { return MWSearchUpdater::sendRPC( 'searchupdater.quit' ); } @@ -100,7 +100,7 @@ * @return bool * @static */ - function flushAll() { + static function flushAll() { return MWSearchUpdater::sendRPC( 'searchupdater.flushAll' ); } @@ -111,7 +111,7 @@ * @return bool * @static */ - function optimize() { + static function optimize() { return MWSearchUpdater::sendRPC( 'searchupdater.optimize' ); } @@ -121,7 +121,7 @@ * @return bool * @static */ - function flush( $dbname ) { + static function flush( $dbname ) { return MWSearchUpdater::sendRPC( 'searchupdater.flush', array( $dbname ) ); } @@ -130,7 +130,7 @@ * @access private * @static */ - function outParam( $param ) { + static function outParam( $param ) { if( $param instanceof Title ) { return new XML_RPC_Value( array( @@ -158,7 +158,7 @@ * @access private * @static */ - function sendRPC( $method, $params=array() ) { + static function sendRPC( $method, $params=array() ) { global $mwSearchUpdateHost, $mwSearchUpdatePort, $mwSearchUpdateDebug; $client = new XML_RPC_Client( '/SearchUpdater', $mwSearchUpdateHost, $mwSearchUpdatePort ); if( $mwSearchUpdateDebug ) { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75680] trunk/extensions
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75680 Revision: 75680 Author: reedy Date: 2010-10-29 21:55:29 + (Fri, 29 Oct 2010) Log Message: --- Another big cull on unused variables and such Modified Paths: -- trunk/extensions/AbuseFilter/AbuseFilter.class.php trunk/extensions/AbuseFilter/AbuseFilter.parser.php trunk/extensions/AbuseFilter/SpecialAbuseLog.php trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php trunk/extensions/AbuseFilter/Views/AbuseFilterViewHistory.php trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php trunk/extensions/AbuseFilter/Views/AbuseFilterViewRevert.php trunk/extensions/CategoryTree/CategoryTree.php trunk/extensions/CentralAuth/CentralAuthUser.php trunk/extensions/CentralAuth/SpecialCentralAuth.php trunk/extensions/CentralNotice/SpecialCentralNotice.php trunk/extensions/CentralNotice/SpecialNoticeTemplate.php trunk/extensions/CharInsert/CharInsert.php trunk/extensions/CheckUser/CheckUser.php trunk/extensions/Collection/Collection.session.php trunk/extensions/Collection/Collection.suggest.php trunk/extensions/CommunityApplications/SpecialCommunityApplications.php trunk/extensions/CommunityHiring/SpecialCommunityHiring.php trunk/extensions/CommunityVoice/Modules/Ratings.php trunk/extensions/ConfirmEdit/ConfirmEdit_body.php trunk/extensions/ContactPage/SpecialContact.php trunk/extensions/ContributionReporting/ContributionReporting.php trunk/extensions/ContributionReporting/ContributionStatistics_body.php trunk/extensions/ContributionReporting/FundraiserStatistics_body.php trunk/extensions/ContributionScores/ContributionScores.php trunk/extensions/ContributionScores/ContributionScores_body.php trunk/extensions/DoubleWiki/DoubleWiki_body.php trunk/extensions/DynamicPageList/DPL.php trunk/extensions/DynamicPageList/DPLMain.php trunk/extensions/DynamicPageList/DynamicPageListInclude.php trunk/extensions/GlobalBlocking/GlobalBlocking.class.php trunk/extensions/GlobalBlocking/SpecialGlobalBlock.php trunk/extensions/GlobalUsage/GlobalUsageHooks.php trunk/extensions/InputBox/InputBox.classes.php trunk/extensions/LabeledSectionTransclusion/lst.php trunk/extensions/MWSearch/MWSearch_body.php trunk/extensions/MWSearch/luceneUpdate.php trunk/extensions/OAI/OAIHarvest.php trunk/extensions/OggHandler/OggHandler_body.php trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg.php trunk/extensions/Oversight/HideRevision_body.php trunk/extensions/ProofreadPage/ProofreadPage_body.php trunk/extensions/Quiz/Quiz.class.php trunk/extensions/ReaderFeedback/ReaderFeedback.class.php trunk/extensions/ReaderFeedback/ReaderFeedback.hooks.php trunk/extensions/ReaderFeedback/ReaderFeedback.php trunk/extensions/ReaderFeedback/phplot-5.0.5/phplot.php trunk/extensions/ReaderFeedback/specialpages/ReaderFeedback_body.php trunk/extensions/ReaderFeedback/svggraph/svgGraph.php trunk/extensions/SecurePoll/includes/main/Store.php trunk/extensions/TitleBlacklist/TitleBlacklist.list.php trunk/extensions/TitleKey/TitleKey_body.php trunk/extensions/UniversalEditButton/UniversalEditButton.php trunk/extensions/intersection/DynamicPageList.php trunk/extensions/wikihiero/wh_main.php Modified: trunk/extensions/AbuseFilter/AbuseFilter.class.php === --- trunk/extensions/AbuseFilter/AbuseFilter.class.php 2010-10-29 21:38:15 UTC (rev 75679) +++ trunk/extensions/AbuseFilter/AbuseFilter.class.php 2010-10-29 21:55:29 UTC (rev 75680) @@ -1029,7 +1029,6 @@ array( $rule_desc ) ) . "\n"; break; case 'rangeblock': - global $wgUser; $filterUser = AbuseFilter::getFilterUser(); $range = IP::toHex( wfGetIP() ); @@ -1194,8 +1193,6 @@ } public static function throttleKey( $throttleId, $type, $title ) { - $identifier = ''; - $types = explode( ',', $type ); $identifiers = array(); Modified: trunk/extensions/AbuseFilter/AbuseFilter.parser.php === --- trunk/extensions/AbuseFilter/AbuseFilter.parser.php 2010-10-29 21:38:15 UTC (rev 75679) +++ trunk/extensions/AbuseFilter/AbuseFilter.parser.php 2010-10-29 21:55:29 UTC (rev 75680) @@ -301,7 +301,6 @@ throw new AFPUserVisibleException( 'dividebyzero', $pos, array( $a ) ); } - $data = null; if ( $op == '*' ) { $data = $a * $b; } elseif ( $op == '/' ) { Modified: trunk/extensions/AbuseFilter/SpecialAbuseLog.php =
[MediaWiki-CVS] SVN: [75679] trunk/extensions/DynamicPageList
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75679 Revision: 75679 Author: reedy Date: 2010-10-29 21:38:15 + (Fri, 29 Oct 2010) Log Message: --- Case statement was falling through and assigning to the same, remove that case and have explicit fall through Modified Paths: -- trunk/extensions/DynamicPageList/DPLLogger.php trunk/extensions/DynamicPageList/DPLMain.php Modified: trunk/extensions/DynamicPageList/DPLLogger.php === --- trunk/extensions/DynamicPageList/DPLLogger.php 2010-10-29 21:36:49 UTC (rev 75678) +++ trunk/extensions/DynamicPageList/DPLLogger.php 2010-10-29 21:38:15 UTC (rev 75679) @@ -75,7 +75,6 @@ $msgid = DPL_i18n::FATAL_WRONGLINKSTO; break; case 'titlemaxlength': - $msgid = DPL_i18n::WARN_WRONGPARAM_INT; case 'includemaxlength': $msgid = DPL_i18n::WARN_WRONGPARAM_INT; break; Modified: trunk/extensions/DynamicPageList/DPLMain.php === --- trunk/extensions/DynamicPageList/DPLMain.php2010-10-29 21:36:49 UTC (rev 75678) +++ trunk/extensions/DynamicPageList/DPLMain.php2010-10-29 21:38:15 UTC (rev 75679) @@ -47,7 +47,6 @@ // Local parser created. See http://www.mediawiki.org/wiki/Extensions_FAQ#How_do_I_render_wikitext_in_my_extension.3F $localParser = new Parser(); $pOptions = $parser->mOptions; - $pTitle = $parser->mTitle; // check if DPL shall only be executed from protected pages if ( array_key_exists( 'RunFromProtectedPagesOnly', ExtDynamicPageList::$options ) && @@ -3379,7 +3378,7 @@ $aTableRow = array(); $groupNr = - 1; $t = - 1; - foreach ( $aSecLabels as $colgroup => $label ) { + foreach ( $aSecLabels as $label ) { $t++; $groupNr++; $cols = split( '}:', $label ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75678] trunk/extensions/Gadgets/Gadgets.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75678 Revision: 75678 Author: reedy Date: 2010-10-29 21:36:49 + (Fri, 29 Oct 2010) Log Message: --- Can only use continue in a loop Modified Paths: -- trunk/extensions/Gadgets/Gadgets.php Modified: trunk/extensions/Gadgets/Gadgets.php === --- trunk/extensions/Gadgets/Gadgets.php2010-10-29 21:30:20 UTC (rev 75677) +++ trunk/extensions/Gadgets/Gadgets.php2010-10-29 21:36:49 UTC (rev 75678) @@ -48,7 +48,9 @@ function wfLoadGadgets() { static $gadgets = null; - if ( $gadgets !== null ) return $gadgets; + if ( $gadgets !== null ) { + return $gadgets; + } $struct = wfLoadGadgetsStructured(); if ( !$struct ) { @@ -57,7 +59,7 @@ } $gadgets = array(); - foreach ( $struct as $section => $entries ) { + foreach ( $struct as $entries ) { $gadgets = array_merge( $gadgets, $entries ); } @@ -68,7 +70,9 @@ global $wgMemc; static $gadgets = null; - if ( $gadgets !== null && $forceNewText === null ) return $gadgets; + if ( $gadgets !== null && $forceNewText === null ) { + return $gadgets; + } $key = wfMemcKey( 'gadgets-definition' ); @@ -120,7 +124,9 @@ function wfGadgetsGetPreferences( $user, &$preferences ) { $gadgets = wfLoadGadgetsStructured(); - if (!$gadgets) return true; + if (!$gadgets) { + return true; + } $options = array(); foreach( $gadgets as $section => $thisSection ) { @@ -162,7 +168,9 @@ function wfGadgetsBeforePageDisplay( $out ) { global $wgUser; - if ( !$wgUser->isLoggedIn() ) return true; + if ( !$wgUser->isLoggedIn() ) { + return true; + } //disable all gadgets on critical special pages //NOTE: $out->isUserJsAllowed() is tempting, but always fals if $wgAllowUserJs is false. @@ -177,7 +185,9 @@ } $gadgets = wfLoadGadgets(); - if ( !$gadgets ) return true; + if ( !$gadgets ) { + return true; + } $lb = new LinkBatch(); $lb->setCaller( __METHOD__ ); @@ -197,7 +207,9 @@ $done = array(); foreach ( $pages as $page ) { - if ( isset( $done[$page] ) ) continue; + if ( isset( $done[$page] ) ) { + continue; + } $done[$page] = true; wfApplyGadgetCode( $page, $out ); } @@ -212,7 +224,9 @@ // but we'd want it to appear above explicit user stuff, so it can be overwritten. $t = Title::makeTitleSafe( NS_MEDIAWIKI, "Gadget-$page" ); - if ( !$t ) continue; + if ( !$t ) { + return; + } if ( preg_match( '/\.js/', $page ) ) { $u = $t->getLocalURL( 'action=raw&ctype=' . $wgJsMimeType ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75677] trunk/extensions
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75677 Revision: 75677 Author: reedy Date: 2010-10-29 21:30:20 + (Fri, 29 Oct 2010) Log Message: --- Conditionals in loops to foreachs Modified Paths: -- trunk/extensions/AbuseFilter/AbuseFilter.hooks.php trunk/extensions/AbuseFilter/AbuseFilterVariableHolder.php trunk/extensions/AbuseFilter/ApiQueryAbuseFilters.php trunk/extensions/AbuseFilter/ApiQueryAbuseLog.php trunk/extensions/CategoryTree/CategoryTreeFunctions.php trunk/extensions/CentralAuth/CentralAuthUser.php trunk/extensions/CentralAuth/SpecialGlobalGroupPermissions.php trunk/extensions/CentralAuth/SpecialGlobalUsers.php trunk/extensions/CentralAuth/WikiSet.php trunk/extensions/CheckUser/CheckUser_body.php trunk/extensions/Collection/Collection.body.php trunk/extensions/CommunityVoice/Modules/Ratings.php trunk/extensions/ConfirmEdit/ConfirmEdit_body.php trunk/extensions/ContributionReporting/FundraiserStatistics_body.php trunk/extensions/ContributionScores/ContributionScores_body.php trunk/extensions/DynamicPageList/DPLMain.php trunk/extensions/GlobalBlocking/ApiQueryGlobalBlocks.php trunk/extensions/MWSearch/luceneUpdate.php trunk/extensions/Nuke/Nuke_body.php trunk/extensions/Oversight/HideRevision_body.php trunk/extensions/ProofreadPage/ProofreadPage_body.php trunk/extensions/ReaderFeedback/ReaderFeedback.class.php trunk/extensions/ReaderFeedback/specialpages/RatedPages_body.php trunk/extensions/ReaderFeedback/specialpages/RatingHistory_body.php trunk/extensions/Renameuser/Renameuser_body.php trunk/extensions/SpamBlacklist/SpamBlacklist_body.php Modified: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php === --- trunk/extensions/AbuseFilter/AbuseFilter.hooks.php 2010-10-29 21:28:15 UTC (rev 75676) +++ trunk/extensions/AbuseFilter/AbuseFilter.hooks.php 2010-10-29 21:30:20 UTC (rev 75677) @@ -155,7 +155,7 @@ array( 'abuse_filter' => array( 'INNER JOIN', 'afa_filter=af_id' ) ) ); - while ( $row = $res->fetchObject() ) { + foreach ( $res as $row ) { $emptyTags = array_filter( array_merge( explode( "\n", $row->afa_parameters ), $emptyTags ) ); Modified: trunk/extensions/AbuseFilter/AbuseFilterVariableHolder.php === --- trunk/extensions/AbuseFilter/AbuseFilterVariableHolder.php 2010-10-29 21:28:15 UTC (rev 75676) +++ trunk/extensions/AbuseFilter/AbuseFilterVariableHolder.php 2010-10-29 21:30:20 UTC (rev 75677) @@ -330,7 +330,7 @@ ); $users = array(); - while ( $user = $dbr->fetchRow( $res ) ) { + foreach ( $res as $user ) { $users[] = $user[0]; } $result = $users; Modified: trunk/extensions/AbuseFilter/ApiQueryAbuseFilters.php === --- trunk/extensions/AbuseFilter/ApiQueryAbuseFilters.php 2010-10-29 21:28:15 UTC (rev 75676) +++ trunk/extensions/AbuseFilter/ApiQueryAbuseFilters.php 2010-10-29 21:30:20 UTC (rev 75677) @@ -97,7 +97,7 @@ $showhidden = $wgUser->isAllowed( 'abusefilter-modify' ); $count = 0; - while ( $row = $res->fetchObject() ) { + foreach ( $res as $row ) { if ( ++$count > $params['limit'] ) { // We've had enough $this->setContinueEnumParameter( 'startid', $row->af_id ); Modified: trunk/extensions/AbuseFilter/ApiQueryAbuseLog.php === --- trunk/extensions/AbuseFilter/ApiQueryAbuseLog.php 2010-10-29 21:28:15 UTC (rev 75676) +++ trunk/extensions/AbuseFilter/ApiQueryAbuseLog.php 2010-10-29 21:30:20 UTC (rev 75677) @@ -104,7 +104,7 @@ $res = $this->select( __METHOD__ ); $count = 0; - while ( $row = $res->fetchObject() ) { + foreach ( $res as $row ) { if ( ++$count > $params['limit'] ) { // We've had enough $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->afl_timestamp ) ); Modified: trunk/extensions/CategoryTree/CategoryTreeFunctions.php === --- trunk/extensions/CategoryTree/CategoryTreeFunctions.php 2010-10-29 21:28:15 UTC (rev 75676) +++ trunk/extensions/CategoryTree/CategoryTreeFunctions.php 2010-10-29
[MediaWiki-CVS] SVN: [75676] trunk/extensions/ReaderFeedback/phplot-5.0.5/phplot.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75676 Revision: 75676 Author: reedy Date: 2010-10-29 21:28:15 + (Fri, 29 Oct 2010) Log Message: --- Ugh, same as r75442 in another extension... Modified Paths: -- trunk/extensions/ReaderFeedback/phplot-5.0.5/phplot.php Modified: trunk/extensions/ReaderFeedback/phplot-5.0.5/phplot.php === --- trunk/extensions/ReaderFeedback/phplot-5.0.5/phplot.php 2010-10-29 21:16:05 UTC (rev 75675) +++ trunk/extensions/ReaderFeedback/phplot-5.0.5/phplot.php 2010-10-29 21:28:15 UTC (rev 75676) @@ -3296,7 +3296,7 @@ } else if ($mode == 'centeredtile') { $x0 = - floor($tile_width/2); // Make the tile look better $y0 = - floor($tile_height/2); -} else if ($mode = 'tile') { +} else if ($mode == 'tile') { $x0 = 0; $y0 = 0; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75675] trunk/extensions/DonationInterface
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75675 Revision: 75675 Author: reedy Date: 2010-10-29 21:16:05 + (Fri, 29 Oct 2010) Log Message: --- Better tab some of the code, fix some unclear code up Modified Paths: -- trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php trunk/extensions/DonationInterface/donate_interface/donate_interface.php trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/ccfd/HTTPBase.php trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php Modified: trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php === --- trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php 2010-10-29 21:08:48 UTC (rev 75674) +++ trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php 2010-10-29 21:16:05 UTC (rev 75675) @@ -29,25 +29,24 @@ * Create tag to include landing page donation form */ function efStompSetup( &$parser ) { -global $wgParser, ; + global $wgParser; - // redundant and causes Fatal Error -// $parser->disableCache(); + // redundant and causes Fatal Error + // $parser->disableCache(); -$wgParser->setHook( 'stomp', 'efStompTest' ); + $wgParser->setHook( 'stomp', 'efStompTest' ); - return true; + return true; } function efStompTest( $input, $args, &$parser ) { + $parser->disableCache(); -$parser->disableCache(); + $output = "STOMP Test page"; -$output = "STOMP Test page"; + wfRunHooks( 'gwStomp', array( &$transaction ) ); -wfRunHooks( 'gwStomp', array( &$transaction ) ); - -return $output; + return $output; } /** @@ -61,62 +60,62 @@ * Hook to send transaction information to ActiveMQ server */ function sendSTOMP( $transaction ) { -global $wgStompServer, $wgStompQueueName; + global $wgStompServer, $wgStompQueueName; -$queueName = isset ( $wgStompQueueName ) ? $wgStompQueueName : 'test'; + $queueName = isset ( $wgStompQueueName ) ? $wgStompQueueName : 'test'; -// include a library -require_once( "Stomp.php" ); + // include a library + require_once( "Stomp.php" ); -$message = json_encode( createQueueMessage( $transaction ) ); + $message = json_encode( createQueueMessage( $transaction ) ); -// make a connection -$con = new Stomp( $wgStompServer ); + // make a connection + $con = new Stomp( $wgStompServer ); -// connect -$con->connect(); + // connect + $con->connect(); -// send a message to the queue -$result = $con->send( "/queue/$queueName", $message, array( 'persistent' => 'true' ) ); + // send a message to the queue + $result = $con->send( "/queue/$queueName", $message, array( 'persistent' => 'true' ) ); -if ( !$result ) { -wfDebugLog( 'activemq_stomp', 'Send to Q failed for this message: ' . $message ); -} + if ( !$result ) { + wfDebugLog( 'activemq_stomp', 'Send to Q failed for this message: ' . $message ); + } -$con->disconnect(); + $con->disconnect(); -return true; + return true; } /* * Hook to send transaction information to ActiveMQ server */ function sendPendingSTOMP( $transaction ) { -global $wgStompServer, $wgPendingStompQueueName; + global $wgStompServer, $wgPendingStompQueueName; -$queueName = isset ( $wgPendingStompQueueName ) ? $wgPendingStompQueueName : 'pending'; + $queueName = isset ( $wgPendingStompQueueName ) ? $wgPendingStompQueueName : 'pending'; -// include a library -require_once( "Stomp.php" ); + // include a library + require_once( "Stomp.php" ); -$message = json_encode( createQueueMessage( $transaction ) ); + $message = json_encode( createQueueMessage( $transaction ) ); -// make a connection -$con = new Stomp( $wgStompServer ); + // make a connection + $con = new Stomp( $wgStompServer ); -// connect -$con->connect(); + // connect + $con->connect(); -// send a message to the queue -$result = $con->send( "/queue/$queueName", $message, array( 'persistent' => 'true' ) ); + // send a message to the queue + $result = $con->send( "/queue/$queueName", $message, array( 'persistent' => 'true' ) ); -if ( !$result ) { -wfDebugLog( 'activemq_stomp', 'Send to Pending Q failed for this message: ' . $message ); -} + if ( !$result ) { + wfDebugLog( 'activemq_stomp', 'Send to Pending Q failed for this message: ' . $messag
[MediaWiki-CVS] SVN: [75674] trunk/extensions/CentralNotice
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75674 Revision: 75674 Author: reedy Date: 2010-10-29 21:08:48 + (Fri, 29 Oct 2010) Log Message: --- Nuke unused globals Fix a wrong usage of $this->viewPage to $viewPage Modified Paths: -- trunk/extensions/CentralNotice/CentralNotice.php trunk/extensions/CentralNotice/SpecialBannerAllocation.php trunk/extensions/CentralNotice/SpecialBannerController.php trunk/extensions/CentralNotice/SpecialCentralNotice.php trunk/extensions/CentralNotice/SpecialNoticeTemplate.php trunk/extensions/CentralNotice/TemplatePager.php Modified: trunk/extensions/CentralNotice/CentralNotice.php === --- trunk/extensions/CentralNotice/CentralNotice.php2010-10-29 21:00:18 UTC (rev 75673) +++ trunk/extensions/CentralNotice/CentralNotice.php2010-10-29 21:08:48 UTC (rev 75674) @@ -142,7 +142,7 @@ } function efCentralNoticeLoader( $out, $skin ) { - global $wgUser, $wgOut, $wgCentralDBname, $wgScript; + global $wgOut; // Include '.js' to exempt script from squid cache override $centralLoader = SpecialPage::getTitleFor( 'BannerController' )->getLocalUrl( 'cache=/cn.js' ); Modified: trunk/extensions/CentralNotice/SpecialBannerAllocation.php === --- trunk/extensions/CentralNotice/SpecialBannerAllocation.php 2010-10-29 21:00:18 UTC (rev 75673) +++ trunk/extensions/CentralNotice/SpecialBannerAllocation.php 2010-10-29 21:08:48 UTC (rev 75674) @@ -19,7 +19,7 @@ * Handle different types of page requests */ function execute( $sub ) { - global $wgOut, $wgUser, $wgRequest, $wgExtensionAssetsPath, $wgNoticeProjects, $wgLanguageCode; + global $wgOut, $wgRequest, $wgExtensionAssetsPath, $wgNoticeProjects, $wgLanguageCode; if ( $wgRequest->wasPosted() ) { $this->project = $wgRequest->getText( 'project', 'wikipedia' ); Modified: trunk/extensions/CentralNotice/SpecialBannerController.php === --- trunk/extensions/CentralNotice/SpecialBannerController.php 2010-10-29 21:00:18 UTC (rev 75673) +++ trunk/extensions/CentralNotice/SpecialBannerController.php 2010-10-29 21:08:48 UTC (rev 75674) @@ -13,8 +13,7 @@ } function execute( $par ) { - global $wgOut, $wgRequest; - global $wgNoticeLang, $wgNoticeProject; + global $wgOut; $wgOut->disable(); $this->sendHeaders(); @@ -26,7 +25,6 @@ } else { echo $content; } - } /** Modified: trunk/extensions/CentralNotice/SpecialCentralNotice.php === --- trunk/extensions/CentralNotice/SpecialCentralNotice.php 2010-10-29 21:00:18 UTC (rev 75673) +++ trunk/extensions/CentralNotice/SpecialCentralNotice.php 2010-10-29 21:08:48 UTC (rev 75674) @@ -203,7 +203,7 @@ $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'cn_notices', 'not_name', null, __METHOD__ ); $notices = array(); - while ( $row = $dbr->fetchObject( $res ) ) { + foreach ( $res as $row ) { $notices[] = $row->not_name; } return $notices; @@ -350,7 +350,7 @@ $htmlOut .= $this->tableRow( $headers, 'th' ); // Table rows - while ( $row = $dbr->fetchObject( $res ) ) { + foreach ( $res as $row ) { $fields = array(); // Name @@ -362,7 +362,6 @@ $fields[] = htmlspecialchars( $this->getProjectName( $row->not_project ) ); // Languages - $project_langs = array(); $project_langs = $this->getNoticeLanguages( $row->not_name ); $language_count = count( $project_langs ); $languageList = ''; @@ -429,7 +428,7 @@ $htmlOut .= Xml::closeElement( 'table' ); if ( $this->editable ) { - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() ); + $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() ); $htmlOut .= Xml::openElement( 'div', array( 'class' => 'cn-buttons' ) ); $htmlOut .= Xml::submitButton( wfMsg( 'centralnotice-modify' ),
[MediaWiki-CVS] SVN: [75672] trunk/extensions/DonationInterface
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75672 Revision: 75672 Author: reedy Date: 2010-10-29 20:54:45 + (Fri, 29 Oct 2010) Log Message: --- Fixup deprecated stuff, kill unused globals and variables Modified Paths: -- trunk/extensions/DonationInterface/GeoIP/GeoIP.php trunk/extensions/DonationInterface/activemq_stomp/Stomp/Frame.php trunk/extensions/DonationInterface/activemq_stomp/Stomp.php trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php trunk/extensions/DonationInterface/donate_interface/donate_interface.php trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/ccfd/HTTPBase.php trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php trunk/extensions/DonationInterface/payflowpro_gateway/forms/SingleColumn.php trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter2.php trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnPayPal.php trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumnLetter.php trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php trunk/extensions/DonationInterface/paypal_gateway/paypal_gateway.php Modified: trunk/extensions/DonationInterface/GeoIP/GeoIP.php === --- trunk/extensions/DonationInterface/GeoIP/GeoIP.php 2010-10-29 20:45:31 UTC (rev 75671) +++ trunk/extensions/DonationInterface/GeoIP/GeoIP.php 2010-10-29 20:54:45 UTC (rev 75672) @@ -68,8 +68,6 @@ throw new UnsupportedGeoIP( 'Only IPv4 addresses are supported.' ); } - $country_code = null; - $dbr = wfGetDB( DB_SLAVE ); $long_ip = IP::toUnsigned( $ip_address ); $conditions = array( Modified: trunk/extensions/DonationInterface/activemq_stomp/Stomp/Frame.php === --- trunk/extensions/DonationInterface/activemq_stomp/Stomp/Frame.php 2010-10-29 20:45:31 UTC (rev 75671) +++ trunk/extensions/DonationInterface/activemq_stomp/Stomp/Frame.php 2010-10-29 20:54:45 UTC (rev 75672) @@ -74,7 +74,7 @@ $data .= "\n"; $data .= $this->body; -return $data .= "\x00\n"; +return $data . "\x00\n"; } } ?> Modified: trunk/extensions/DonationInterface/activemq_stomp/Stomp.php === --- trunk/extensions/DonationInterface/activemq_stomp/Stomp.php 2010-10-29 20:45:31 UTC (rev 75671) +++ trunk/extensions/DonationInterface/activemq_stomp/Stomp.php 2010-10-29 20:54:45 UTC (rev 75672) @@ -454,8 +454,6 @@ */ public function disconnect () { - $header = array(); - if ($this->clientId != null) { $headers["client-id"] = $this->clientId; } @@ -561,9 +559,9 @@ */ public function hasFrameToRead() { -return TRUE; // http://bugs.php.net/bug.php?id=46024 +return true; // http://bugs.php.net/bug.php?id=46024 -$read = array($this->_socket); +/*$read = array($this->_socket); $write = null; $except = null; @@ -575,7 +573,7 @@ return true; } else { return false; -} +}*/ } /** Modified: trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php === --- trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php 2010-10-29 20:45:31 UTC (rev 75671) +++ trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php 2010-10-29 20:54:45 UTC (rev 75672) @@ -29,9 +29,9 @@ * Create tag to include landing page donation form */ function efStompSetup(&$parser) { -global $wgParser, $wgOut; +global $wgParser, ; - //redundant and causes Fatal Error + //redundant and causes Fatal Error //$parser->disableCache(); $wgParser->setHook( 'stomp', 'efStompTest' ); @@ -57,12 +57,10 @@ $wgHooks['gwStomp'][] = 'sendSTOMP'; $wgHooks['gwPendingStomp'][] = 'sendPendingSTOMP'; - /* * Hook to send transaction information to ActiveMQ server */ function sendSTOMP($transaction) { -global $wgOut; global $wgStompServer, $wgStompQueueName; $queueName = isset ( $wgStompQueueName ) ? $wgStompQueueName : 'test'; @@ -94,7 +92,6 @@ * Hook to send transaction information to ActiveMQ server */ function sendPendingSTOMP($transaction) { -global $wgOut; global
[MediaWiki-CVS] SVN: [75671] trunk/extensions
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75671 Revision: 75671 Author: reedy Date: 2010-10-29 20:45:31 + (Fri, 29 Oct 2010) Log Message: --- Whiles to foreach Remove unused globals and variables Modified Paths: -- trunk/extensions/ContactPageFundraiser/SpecialContact.php trunk/extensions/ContributionReporting/ContributionHistory_body.php trunk/extensions/ContributionReporting/ContributionStatistics_body.php trunk/extensions/ContributionReporting/ContributionTotal_body.php trunk/extensions/ContributionReporting/ContributionTrackingStatistics_body.php trunk/extensions/ContributionReporting/FundraiserStatistics_body.php trunk/extensions/ContributionTracking/ContributionTracking.php trunk/extensions/ContributionTracking/ContributionTracking_body.php Modified: trunk/extensions/ContactPageFundraiser/SpecialContact.php === --- trunk/extensions/ContactPageFundraiser/SpecialContact.php 2010-10-29 20:44:26 UTC (rev 75670) +++ trunk/extensions/ContactPageFundraiser/SpecialContact.php 2010-10-29 20:45:31 UTC (rev 75671) @@ -27,7 +27,6 @@ * Constructor */ function __construct() { - global $wgOut; parent::__construct( 'Contact', '', true ); } @@ -38,7 +37,6 @@ function execute( $par ) { global $wgUser, $wgOut, $wgRequest, $wgEnableEmail, $wgContactUser; - wfLoadExtensionMessages( 'ContactPageFundraiser' ); $fname = "SpecialContact::execute"; if ( $wgRequest->wasPosted() ) { @@ -56,7 +54,7 @@ $form['url'] = $wgRequest->getVal('url'); $form['country'] = $wgRequest->getVal('country'); $form['citytown'] = $wgRequest->getVal('city-town'); - $form['provstat'] = $wgRequest->getVal('prov-state'); + $form['provstat'] = $wgRequest->getVal('prov-state'); $form['story'] = $wgRequest->getVal('story'); $form['followup'] = $wgRequest->getVal('follow-up'); @@ -67,57 +65,53 @@ $f->setText( $text ); $f->doSubmit(); } + if( !$wgEnableEmail || !$wgContactUser ) { + $wgOut->showErrorPage( "nosuchspecialpage", "nospecialpagetext" ); + return; + } - else { - - } - if( !$wgEnableEmail || !$wgContactUser ) { - $wgOut->showErrorPage( "nosuchspecialpage", "nospecialpagetext" ); - return; - } + $action = $wgRequest->getVal( 'action' ); - $action = $wgRequest->getVal( 'action' ); + $nu = User::newFromName( $wgContactUser ); + if( is_null( $nu ) || !$nu->canReceiveEmail() ) { + wfDebug( "Target is invalid user or can't receive.\n" ); + $wgOut->showErrorPage( "noemailtitle", "noemailtext" ); + return; + } - $nu = User::newFromName( $wgContactUser ); - if( is_null( $nu ) || !$nu->canReceiveEmail() ) { - wfDebug( "Target is invalid user or can't receive.\n" ); - $wgOut->showErrorPage( "noemailtitle", "noemailtext" ); - return; - } + $f = new EmailContactForm( $nu ); - $f = new EmailContactForm( $nu ); + if ( "success" == $action ) { + wfDebug( "$fname: success.\n" ); + $f->showSuccess( ); + } else if ( "submit" == $action && $wgRequest->wasPosted() && $f->hasAllInfo() ) { + $token = $wgRequest->getVal( 'wpEditToken' ); - if ( "success" == $action ) { - wfDebug( "$fname: success.\n" ); - $f->showSuccess( ); - } else if ( "submit" == $action && $wgRequest->wasPosted() && $f->hasAllInfo() ) { - $token = $wgRequest->getVal( 'wpEditToken' ); - - if( $wgUser->isAnon() ) { - # Anonymous users may not have a session - # open. Check for suffix anyway. - $tokenOk = ( EDIT_TOKEN_SUFFIX == $token ); - } else { - $tokenOk = $wgUser->matchEditToken( $token ); - } - -
[MediaWiki-CVS] SVN: [75670] trunk/phase3/resources/mediawiki.specials
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75670 Revision: 75670 Author: hashar Date: 2010-10-29 20:44:26 + (Fri, 29 Oct 2010) Log Message: --- Follow up r75627 (code review comments): * Replace background coloring with a label insertion on the right or left of input depending on language direction. * User side validation of email according to an HTML5 specifications provided by Simetrical : http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state Code comments should be self explaining. Possible follows up: - use JQuery Validation plugin - make the validation part a mediawiki validation module - server side validation Modified Paths: -- trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.css trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.js Modified: trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.css === --- trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.css 2010-10-29 20:33:27 UTC (rev 75669) +++ trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.css 2010-10-29 20:44:26 UTC (rev 75670) @@ -1,8 +1,21 @@ -input.valid { +#mw-emailaddress-validity { + padding: 2px 1em; +} +body.ltr #mw-emailaddress-validity { + border-bottom-right-radius:0.8em; + border-top-right-radius:0.8em; +} +body.rtl #mw-emailaddress-validity { + border-bottom-left-radius:0.8em; + border-top-left-radius:0.8em; +} +#mw-emailaddress-validity.valid { + border: 1px solid #80FF80; background-color: #C0FFC0; color: black; } -input.invalid { +#mw-emailaddress-validity.invalid { + border: 1px solid #FF8080; background-color: #FFC0C0; color: black; } Modified: trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.js === --- trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.js 2010-10-29 20:33:27 UTC (rev 75669) +++ trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.js 2010-10-29 20:44:26 UTC (rev 75670) @@ -41,19 +41,87 @@ // Lame tip to let user know if its email is valid. See bug 22449 $( '#mw-input-emailaddress' ) - .keyup( function() { - var mailtxt = $(this).val(); - if( mailtxt == '' ) { - // mail is optional ! - $(this).removeClass( "invalid" ); - $(this).removeClass( "valid" ); - return; + .keyup( function () { + if( $( "#mw-emailaddress-validity" ).length == 0 ) { + $(this).after( '' ); } - if( mailtxt.match( /@.+\..+/ ) ) { - $(this).addClass( "valid" ); - $(this).removeClass( "invalid" ); - } else { - $(this).addClass( "invalid" ); - $(this).removeClass( "valid" ); - } + var isValid = wfValidateEmail( $(this).val() ); + var class_to_add= isValid ? 'valid' : 'invalid'; + var class_to_remove = isValid ? 'invalid' : 'valid'; + $( '#mw-emailaddress-validity' ) + .text( isValid ? 'Looks valid' : 'Valid address required!' ) + .addClass( class_to_add ) + .removeClass( class_to_remove ); } ); + +/** + * Validate a string as representing a valid e-mail address + * according to HTML5 specification. Please note the specification + * does not validate a domain with one character. + * + * FIXME: should be moved to a JavaScript validation module. + */ +wfValidateEmail = function( mailtxt ) { + if( mailtxt == '' ) { return null; } + + /** +* HTML 5 define a string as valid e-mail address if it matches +* the ABNF : +* 1 * ( atext / "." ) "@" ldh-str 1*( "." ldh-str ) +* With: +* - atext : defined in RFC 5322 section 3.2.3 +* - ldh-str : defined in RFC 1034 section 3.5 +* +* (see STD 68 / RFC 5234 http://tools.ietf.org/html/std68): +*/ + + /** +* First, define the RFC 5322 'atext' which is pretty easy : +* atext = ALPHA / DIGIT /; Printable US-ASCII + "!" / "#" /; characters not including + "$" / "%" /; specials. Used for atoms. + "&" / "'" / + "*" / "+" / + "-" / "/" / + "=" / "?" / + "^" / "_" / + "`" / "{" / + "|" / "}" / + "~" + */
[MediaWiki-CVS] SVN: [75669] trunk/phase3/includes/api/ApiRsd.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75669 Revision: 75669 Author: btongminh Date: 2010-10-29 20:33:27 + (Fri, 29 Oct 2010) Log Message: --- r75621 copy-paste fail Modified Paths: -- trunk/phase3/includes/api/ApiRsd.php Modified: trunk/phase3/includes/api/ApiRsd.php === --- trunk/phase3/includes/api/ApiRsd.php2010-10-29 19:35:15 UTC (rev 75668) +++ trunk/phase3/includes/api/ApiRsd.php2010-10-29 20:33:27 UTC (rev 75669) @@ -30,7 +30,7 @@ } /** - * API interface for page purging + * API module for sending out RSD information * @ingroup API */ class ApiRsd extends ApiBase { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75668] trunk/extensions/LandingCheck
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75668 Revision: 75668 Author: kaldari Date: 2010-10-29 19:35:15 + (Fri, 29 Oct 2010) Log Message: --- some working code Modified Paths: -- trunk/extensions/LandingCheck/SpecialLandingCheck.php Added Paths: --- trunk/extensions/LandingCheck/LandingCheck.i18n.php Added: trunk/extensions/LandingCheck/LandingCheck.i18n.php === --- trunk/extensions/LandingCheck/LandingCheck.i18n.php (rev 0) +++ trunk/extensions/LandingCheck/LandingCheck.i18n.php 2010-10-29 19:35:15 UTC (rev 75668) @@ -0,0 +1,17 @@ + 'This extension facilitates the use of geotargeted localized landing pages. It is a replacement for GeoLite.', + 'landingcheck' => 'LandingCheck', +); Modified: trunk/extensions/LandingCheck/SpecialLandingCheck.php === --- trunk/extensions/LandingCheck/SpecialLandingCheck.php 2010-10-29 19:31:07 UTC (rev 75667) +++ trunk/extensions/LandingCheck/SpecialLandingCheck.php 2010-10-29 19:35:15 UTC (rev 75668) @@ -4,14 +4,33 @@ exit( 1 ); } -class LandingCheck extends SpecialPage { +class SpecialLandingCheck extends SpecialPage { function __construct() { // Register special page parent::__construct( 'LandingCheck' ); } + + function execute( $sub ) { + global $wgOut, $wgUser, $wgRequest, $wgLandingPageBase; + + if ( $wgRequest->getVal( 'language' ) ) { + $language = ( preg_match( '/^[A-Za-z-]+$/', $wgRequest->getVal( 'language' ) ) ); + } else { + $language = 'en'; + } + $country = $wgRequest->getVal( 'country' ); + $landingPage = $wgRequest->getVal( 'landing_page' ); + + $tracking = '?' . wfArrayToCGI( array( + 'utm_source' => $wgRequest->getVal( 'utm_source' ), + 'utm_medium' => $wgRequest->getVal( 'utm_medium' ), + 'utm_campaign' => $wgRequest->getVal( 'utm_campaign' ), + 'referrer' => $wgRequest->getHeader( 'referer' ) + ) ); + + if ( 1 ) { + $wgOut->redirect( $wgLandingPageBase . '/' . $language . '/' . $country . $tracking ); + } + } } - -//$wgOut->redirect( $this->getTitle( 'view' )->getLocalUrl( "template=$template" ) ); - -?> ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75667] trunk/extensions/ConfirmEdit/ConfirmEdit_body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75667 Revision: 75667 Author: hartman Date: 2010-10-29 19:31:07 + (Fri, 29 Oct 2010) Log Message: --- Use a minus sign in the simplecaptcha question, instead of a hyphen. Fixes bug 16213. Per suggestion of Christopher Yeleighton, adapted by Derk-Jan Hartman. Modified Paths: -- trunk/extensions/ConfirmEdit/ConfirmEdit_body.php Modified: trunk/extensions/ConfirmEdit/ConfirmEdit_body.php === --- trunk/extensions/ConfirmEdit/ConfirmEdit_body.php 2010-10-29 19:31:02 UTC (rev 75666) +++ trunk/extensions/ConfirmEdit/ConfirmEdit_body.php 2010-10-29 19:31:07 UTC (rev 75667) @@ -76,8 +76,11 @@ function getCaptcha() { $a = mt_rand( 0, 100 ); $b = mt_rand( 0, 10 ); - $op = mt_rand( 0, 1 ) ? '+' : '-'; + /* Minus sign is used in the question. UTF-8, + since the api uses text/plain, not text/html */ + $op = mt_rand( 0, 1 ) ? '+' : '−'; + $test = "$a $op $b"; $answer = ( $op == '+' ) ? ( $a + $b ) : ( $a - $b ); return array( 'question' => $test, 'answer' => $answer ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75664] branches/fundraising/deployment/DonationInterface
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75664 Revision: 75664 Author: awjrichards Date: 2010-10-29 19:00:03 + (Fri, 29 Oct 2010) Log Message: --- Merging from r75657 to r75663 of trunk Modified Paths: -- branches/fundraising/deployment/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php Property Changed: branches/fundraising/deployment/DonationInterface/ Property changes on: branches/fundraising/deployment/DonationInterface ___ Added: svn:mergeinfo + /trunk/extensions/DonationInterface:75657-75663 Modified: branches/fundraising/deployment/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php === --- branches/fundraising/deployment/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php 2010-10-29 18:55:26 UTC (rev 75663) +++ branches/fundraising/deployment/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php 2010-10-29 19:00:03 UTC (rev 75664) @@ -1180,7 +1180,7 @@ $utm_source_parts = explode( ".", $data[ 'utm_source' ] ); $utm_source_parts[2] = 'pp'; $data[ 'utm_source' ] = implode( ".", $utm_source_parts ); - + $data[ 'gateway' ] = 'paypal'; /** * update contribution tracking */ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75663] trunk/extensions/DonationInterface/payflowpro_gateway/ payflowpro_gateway.body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75663 Revision: 75663 Author: awjrichards Date: 2010-10-29 18:55:26 + (Fri, 29 Oct 2010) Log Message: --- Revert r75661 Modified Paths: -- trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php Modified: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php === --- trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php 2010-10-29 18:52:59 UTC (rev 75662) +++ trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php 2010-10-29 18:55:26 UTC (rev 75663) @@ -135,20 +135,20 @@ // Populate form data $data = $this->fnGetFormData( $amount, $numAttempt, $token, $payflow_data['order_id'] ); + /** +* handle PayPal redirection +* +* if paypal redirection is enabled ($wgPayflowGatewayPaypalURL must be defined) +* and the PaypalRedirect form value must be true +*/ + if ( $wgRequest->getBool( 'PaypalRedirect' )) { + $this->paypalRedirect( $data ); + return; + } + // dispatch forms/handling if( $token_match ) { - - /** -* handle PayPal redirection -* -* if paypal redirection is enabled ($wgPayflowGatewayPaypalURL must be defined) -* and the PaypalRedirect form value must be true -*/ - if ( $wgRequest->getBool( 'PaypalRedirect' )) { - $this->paypalRedirect( $data ); - return; - } - + if( $data['payment_method'] == 'processed' ) { //increase the count of attempts ++$data['numAttempt']; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75662] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75662 Revision: 75662 Author: hartman Date: 2010-10-29 18:52:59 + (Fri, 29 Oct 2010) Log Message: --- Switch the hyphen in diff output to actually minus signs. Modified Paths: -- trunk/phase3/RELEASE-NOTES trunk/phase3/includes/diff/DifferenceEngine.php Modified: trunk/phase3/RELEASE-NOTES === --- trunk/phase3/RELEASE-NOTES 2010-10-29 18:45:32 UTC (rev 75661) +++ trunk/phase3/RELEASE-NOTES 2010-10-29 18:52:59 UTC (rev 75662) @@ -374,6 +374,7 @@ requested. * (bug 22308) Search now finds text in default main page immediately after setup * (bug 25697) Make sure empty lines render in diff view. +* Use an actual minus sign in diff views, instead of a hyphen. === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. @@ -462,6 +463,8 @@ and by providing an API module action=rsd. Added hook ApiRsdServiceApis for extensions to add their own service to the services list. +* The HTML of diff output markers has changed. Hyphens are now minus signs, + empty markers are now filled with non-breaking-space characters. === Languages updated in 1.17 === Modified: trunk/phase3/includes/diff/DifferenceEngine.php === --- trunk/phase3/includes/diff/DifferenceEngine.php 2010-10-29 18:45:32 UTC (rev 75661) +++ trunk/phase3/includes/diff/DifferenceEngine.php 2010-10-29 18:52:59 UTC (rev 75662) @@ -1172,7 +1172,7 @@ # HTML-escape parameter before calling this function deletedLine( $line ) { - return $this->wrapLine( '-', 'diff-deletedline', $line ); + return $this->wrapLine( '−', 'diff-deletedline', $line ); } # HTML-escape parameter before calling this ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75661] trunk/extensions/DonationInterface/payflowpro_gateway/ payflowpro_gateway.body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75661 Revision: 75661 Author: awjrichards Date: 2010-10-29 18:45:32 + (Fri, 29 Oct 2010) Log Message: --- Put paypal redirect call after token check due to unexpected behavior of moving it outside of the token check logic Modified Paths: -- trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php Modified: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php === --- trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php 2010-10-29 18:42:55 UTC (rev 75660) +++ trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php 2010-10-29 18:45:32 UTC (rev 75661) @@ -135,20 +135,20 @@ // Populate form data $data = $this->fnGetFormData( $amount, $numAttempt, $token, $payflow_data['order_id'] ); - /** -* handle PayPal redirection -* -* if paypal redirection is enabled ($wgPayflowGatewayPaypalURL must be defined) -* and the PaypalRedirect form value must be true -*/ - if ( $wgRequest->getBool( 'PaypalRedirect' )) { - $this->paypalRedirect( $data ); - return; - } - // dispatch forms/handling if( $token_match ) { - + + /** +* handle PayPal redirection +* +* if paypal redirection is enabled ($wgPayflowGatewayPaypalURL must be defined) +* and the PaypalRedirect form value must be true +*/ + if ( $wgRequest->getBool( 'PaypalRedirect' )) { + $this->paypalRedirect( $data ); + return; + } + if( $data['payment_method'] == 'processed' ) { //increase the count of attempts ++$data['numAttempt']; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75660] trunk/phase3/RELEASE-NOTES
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75660 Revision: 75660 Author: hartman Date: 2010-10-29 18:42:55 + (Fri, 29 Oct 2010) Log Message: --- Add updated release notes for r75658 Modified Paths: -- trunk/phase3/RELEASE-NOTES Modified: trunk/phase3/RELEASE-NOTES === --- trunk/phase3/RELEASE-NOTES 2010-10-29 18:39:03 UTC (rev 75659) +++ trunk/phase3/RELEASE-NOTES 2010-10-29 18:42:55 UTC (rev 75660) @@ -373,6 +373,7 @@ * (bug 23923) Special:Prefixindex no longer shows results if nothing was requested. * (bug 22308) Search now finds text in default main page immediately after setup +* (bug 25697) Make sure empty lines render in diff view. === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75659] trunk/extensions/DonationInterface/payflowpro_gateway/ payflowpro_gateway.body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75659 Revision: 75659 Author: awjrichards Date: 2010-10-29 18:39:03 + (Fri, 29 Oct 2010) Log Message: --- Added explicity gateway definition for paypal redirect Modified Paths: -- trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php Modified: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php === --- trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php 2010-10-29 18:28:44 UTC (rev 75658) +++ trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php 2010-10-29 18:39:03 UTC (rev 75659) @@ -1180,7 +1180,7 @@ $utm_source_parts = explode( ".", $data[ 'utm_source' ] ); $utm_source_parts[2] = 'pp'; $data[ 'utm_source' ] = implode( ".", $utm_source_parts ); - + $data[ 'gateway' ] = 'paypal'; /** * update contribution tracking */ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75658] trunk/phase3/includes/diff/DifferenceEngine.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75658 Revision: 75658 Author: hartman Date: 2010-10-29 18:28:44 + (Fri, 29 Oct 2010) Log Message: --- Add a nbsp to each empty "diff-marker". Fixes Bug 25697 Prevent collapsed table row if both pre and post lines in the diff are totally empty. Modified Paths: -- trunk/phase3/includes/diff/DifferenceEngine.php Modified: trunk/phase3/includes/diff/DifferenceEngine.php === --- trunk/phase3/includes/diff/DifferenceEngine.php 2010-10-29 18:16:54 UTC (rev 75657) +++ trunk/phase3/includes/diff/DifferenceEngine.php 2010-10-29 18:28:44 UTC (rev 75658) @@ -1177,7 +1177,7 @@ # HTML-escape parameter before calling this function contextLine( $line ) { - return $this->wrapLine( ' ', 'diff-context', $line ); + return $this->wrapLine( ' ', 'diff-context', $line ); } private function wrapLine( $marker, $class, $line ) { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75657] branches/fundraising
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75657 Revision: 75657 Author: awjrichards Date: 2010-10-29 18:16:54 + (Fri, 29 Oct 2010) Log Message: --- New deployment branch created from r75636 of trunk Added Paths: --- branches/fundraising/deployment/ branches/fundraising/deployment/DonationInterface/ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75656] branches/fundraising
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75656 Revision: 75656 Author: awjrichards Date: 2010-10-29 18:08:42 + (Fri, 29 Oct 2010) Log Message: --- Moving completely messed up branch out of the way Added Paths: --- branches/fundraising/deployment_fubar/ Removed Paths: - branches/fundraising/deployment/ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75655] trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75655 Revision: 75655 Author: aaron Date: 2010-10-29 17:41:22 + (Fri, 29 Oct 2010) Log Message: --- Make this wmf-depl compatible Modified Paths: -- trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php Modified: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php === --- trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php 2010-10-29 17:26:22 UTC (rev 75654) +++ trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php 2010-10-29 17:41:22 UTC (rev 75655) @@ -1047,7 +1047,7 @@ $defaultSummary = wfMsg( 'revreview-reject-default-summary', $newRev->getUserText(), $oldRev->getId(), $oldRev->getUserText() ); - $form = Html::openElement( 'form', + $form = Xml::openElement( 'form', array( 'method' => 'POST', 'action' => $thisPage->getFullUrl() ) ); $form .= Html::hidden( 'action', 'reject' ); @@ -1062,7 +1062,7 @@ $form .= Html::input( 'wpSubmit', wfMsg( 'revreview-reject-confirm' ), 'submit' ); $form .= Html::input( 'wpCancel', wfMsg( 'revreview-reject-cancel' ), 'button', array( 'onClick' => 'history.back();' ) ); - $form .= Html::closeElement( 'form' ); + $form .= Xml::closeElement( 'form' ); $wgOut->addHtml( $form ); } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75654] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75654 Revision: 75654 Author: demon Date: 2010-10-29 17:26:22 + (Fri, 29 Oct 2010) Log Message: --- (bug 22308) Search should find text in default main page immediately after setup. Based on patch by Josh Lerner Modified Paths: -- trunk/phase3/RELEASE-NOTES trunk/phase3/includes/installer/CoreInstaller.php Modified: trunk/phase3/RELEASE-NOTES === --- trunk/phase3/RELEASE-NOTES 2010-10-29 17:11:22 UTC (rev 75653) +++ trunk/phase3/RELEASE-NOTES 2010-10-29 17:26:22 UTC (rev 75654) @@ -372,6 +372,7 @@ $wgGroupPermissions now appear on Special:ListGroupRights * (bug 23923) Special:Prefixindex no longer shows results if nothing was requested. +* (bug 22308) Search now finds text in default main page immediately after setup === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. Modified: trunk/phase3/includes/installer/CoreInstaller.php === --- trunk/phase3/includes/installer/CoreInstaller.php 2010-10-29 17:11:22 UTC (rev 75653) +++ trunk/phase3/includes/installer/CoreInstaller.php 2010-10-29 17:26:22 UTC (rev 75654) @@ -444,12 +444,13 @@ try { $titleobj = Title::newFromText( wfMsgForContent( "mainpage" ) ); $article = new Article( $titleobj ); - $article->doEdit( wfMsgForContent( 'mainpagetext' ) . "\n\n" . - wfMsgForContent( 'mainpagedocfooter' ), - '', - EDIT_NEW, - false, - User::newFromName( 'MediaWiki Default' ) ); + $text = wfMsgForContent( 'mainpagetext' ) . "\n\n" . + wfMsgForContent( 'mainpagedocfooter' ); + $article->doEdit( $text, '', EDIT_NEW, false, + User::newFromName( 'MediaWiki Default' ) ); + $u = new SearchUpdate( $titleobj->getArticleID(), + $titleobj->getPrefixedDBkey(), $text ); + $u->doUpdate(); } catch (MWException $e) { //using raw, because $wgShowExceptionDetails can not be set yet $status->fatal( 'config-install-mainpage-failed', $e->getMessage() ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75653] trunk/phase3/resources/mediawiki.util
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75653 Revision: 75653 Author: krinkle Date: 2010-10-29 17:11:22 + (Fri, 29 Oct 2010) Log Message: --- $.client has been enhanced and made easier since the initial version, may aswell be used directly (r75593) Modified Paths: -- trunk/phase3/resources/mediawiki.util/mediawiki.util.js trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js Modified: trunk/phase3/resources/mediawiki.util/mediawiki.util.js === --- trunk/phase3/resources/mediawiki.util/mediawiki.util.js 2010-10-29 17:05:24 UTC (rev 75652) +++ trunk/phase3/resources/mediawiki.util/mediawiki.util.js 2010-10-29 17:11:22 UTC (rev 75653) @@ -15,33 +15,33 @@ // Any initialisation after the DOM is ready $(function () { - // Populate clientProfile var - mw.util.clientProfile = $.client.profile(); + // Initiate jQuery.client.profile + $.client.profile(); // Set tooltipAccessKeyPrefix // Opera on any platform - if ( mw.util.isBrowser('opera') ) { + if ( $.client.profile.name == 'opera' ) { this.tooltipAccessKeyPrefix = 'shift-esc-'; // Chrome on any platform - } else if ( mw.util.isBrowser('chrome') ) { + } else if ( $.client.profile.name == 'chrome' ) { // Chrome on Mac or Chrome on other platform ? - this.tooltipAccessKeyPrefix = mw.util.isPlatform('mac') ? 'ctrl-option-' : 'alt-'; + this.tooltipAccessKeyPrefix = $.client.profile.platform == 'mac' ? 'ctrl-option-' : 'alt-'; // Non-Windows Safari with webkit_version > 526 - } else if ( !mw.util.isPlatform('win') && mw.util.isBrowser('safari') && webkit_version > 526 ) { + } else if ( $.client.profile.platform !== 'win' && $.client.profile.name == 'safari' && $.client.profile.layoutVersion > 526 ) { this.tooltipAccessKeyPrefix = 'ctrl-alt-'; // Safari/Konqueror on any platform, or any browser on Mac (but not Safari on Windows) - } else if ( !( mw.util.isPlatform('win') && mw.util.isBrowser('safari') ) - && ( mw.util.isBrowser('safari') - || mw.util.isPlatform('mac') - || mw.util.isBrowser('konqueror') ) ) { + } else if ( !( $.client.profile.platform == 'win' && $.client.profile.name == 'safari' ) + && ( $.client.profile.name == 'safari' + || $.client.profile.platform == 'mac' + || $.client.profile.name == 'konqueror' ) ) { this.tooltipAccessKeyPrefix = 'ctrl-'; // Firefox 2.x - } else if ( mw.util.isBrowser('firefox') && mw.util.isBrowserVersion('2') ) { + } else if ( $.client.profile.name == 'firefox' && $.client.profile.versionBase == '2' ) { this.tooltipAccessKeyPrefix = 'alt-shift-'; } @@ -66,69 +66,7 @@ /* Main body */ - // Holds result of $.client.profile() - // Populated by init() - 'clientProfile' : {}, - /** - * Checks if the current browser matches - * - * @example mw.util.isBrowser( 'safari' ); - * @paramString str name of a browser (case insensitive). Check jquery.client.js for possible values - * @return Boolean true if the browsername matches the clients browser - */ - 'isBrowser' : function( str ) { - str = (str + '').toLowerCase(); -
[MediaWiki-CVS] SVN: [75652] branches/REL1_16/phase3/RELEASE-NOTES
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75652 Revision: 75652 Author: maxsem Date: 2010-10-29 17:05:24 + (Fri, 29 Oct 2010) Log Message: --- Release notes for r75651 Modified Paths: -- branches/REL1_16/phase3/RELEASE-NOTES Modified: branches/REL1_16/phase3/RELEASE-NOTES === --- branches/REL1_16/phase3/RELEASE-NOTES 2010-10-29 16:41:21 UTC (rev 75651) +++ branches/REL1_16/phase3/RELEASE-NOTES 2010-10-29 17:05:24 UTC (rev 75652) @@ -54,6 +54,7 @@ * (bug 25248) API: paraminfo errors with certain modules * Installer now handles situations when safe_mode is active or exec() and similar functions are disabled better. +* (bug 19593) Specifying --server in now works for all maintenance scripts. == Changes since 1.16 beta 3 == ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75651] branches/REL1_16/phase3/maintenance
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75651 Revision: 75651 Author: demon Date: 2010-10-29 16:41:21 + (Fri, 29 Oct 2010) Log Message: --- MFT r75650 Modified Paths: -- branches/REL1_16/phase3/maintenance/Maintenance.php branches/REL1_16/phase3/maintenance/generateSitemap.php Property Changed: branches/REL1_16/phase3/maintenance/ branches/REL1_16/phase3/maintenance/Maintenance.php Property changes on: branches/REL1_16/phase3/maintenance ___ Added: svn:mergeinfo + /trunk/phase3/maintenance:63545-63546,63549,63643,63764,63897-63901,64876,75650 Modified: branches/REL1_16/phase3/maintenance/Maintenance.php === --- branches/REL1_16/phase3/maintenance/Maintenance.php 2010-10-29 16:28:50 UTC (rev 75650) +++ branches/REL1_16/phase3/maintenance/Maintenance.php 2010-10-29 16:41:21 UTC (rev 75651) @@ -312,6 +312,9 @@ $this->addOption( 'conf', "Location of LocalSettings.php, if not default", false, true ); $this->addOption( 'wiki', "For specifying the wiki ID", false, true ); $this->addOption( 'globals', "Output globals at the end of processing for debugging" ); + $this->addOption( 'server', "The protocol and server name to use in URLs, e.g.\n" . + "\t\thttp://en.wikipedia.org. This is sometimes necessary because\n" . + "\t\tserver name detection may fail in command line scripts.", false, true ); // If we support a DB, show the options if( $this->getDbType() > 0 ) { $this->addOption( 'dbuser', "The DB user to use for this script", false, true ); @@ -612,7 +615,7 @@ * Handle some last-minute setup here. */ public function finalSetup() { - global $wgCommandLineMode, $wgShowSQLErrors; + global $wgCommandLineMode, $wgShowSQLErrors, $wgServer; global $wgTitle, $wgProfiling, $IP, $wgDBadminuser, $wgDBadminpassword; global $wgDBuser, $wgDBpassword, $wgDBservers, $wgLBFactoryConf; @@ -623,6 +626,11 @@ # Same with these $wgCommandLineMode = true; + # Override $wgServer + if( $this->hasOption( 'server') ) { + $wgServer = $this->getOption( 'server', $wgServer ); + } + # If these were passed, use them if( $this->mDbUser ) $wgDBadminuser = $this->mDbUser; Property changes on: branches/REL1_16/phase3/maintenance/Maintenance.php ___ Modified: svn:mergeinfo - /trunk/phase3/maintenance/Maintenance.php:63545-63546,63549,63643,63764,63897-63901,64876,67320 + /trunk/phase3/maintenance/Maintenance.php:63545-63546,63549,63643,63764,63897-63901,64876,67320,75650 Modified: branches/REL1_16/phase3/maintenance/generateSitemap.php === --- branches/REL1_16/phase3/maintenance/generateSitemap.php 2010-10-29 16:28:50 UTC (rev 75650) +++ branches/REL1_16/phase3/maintenance/generateSitemap.php 2010-10-29 16:41:21 UTC (rev 75651) @@ -131,9 +131,6 @@ $this->mDescription = "Creates a sitemap for the site"; $this->addOption( 'fspath', 'The file system path to save to, e.g. /tmp/sitemap' . "\n\t\tdefaults to current directory", false, true ); - $this->addOption( 'server', "The protocol and server name to use in URLs, e.g.\n" . - "\t\thttp://en.wikipedia.org. This is sometimes necessary because\n" . - "\t\tserver name detection may fail in command line scripts.", false, true ); $this->addOption( 'compress', 'Compress the sitemap files, can take value yes|no, default yes', false, true ); } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75650] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75650 Revision: 75650 Author: demon Date: 2010-10-29 16:28:50 + (Fri, 29 Oct 2010) Log Message: --- (bug 19593) $wgServer can't be set properly with --server attribute in command line tools. Also fixes regression in generateSitemap.php from maintenance rewrite. Also possible workaround for bug 18274. Modified Paths: -- trunk/phase3/RELEASE-NOTES trunk/phase3/maintenance/Maintenance.php trunk/phase3/maintenance/generateSitemap.php Modified: trunk/phase3/RELEASE-NOTES === --- trunk/phase3/RELEASE-NOTES 2010-10-29 16:22:43 UTC (rev 75649) +++ trunk/phase3/RELEASE-NOTES 2010-10-29 16:28:50 UTC (rev 75650) @@ -188,6 +188,7 @@ * (bug 23194) Special:ListFiles now has thumbnails * Use hreflang to specify canonical and alternate links, search engine friendly when a wiki has multiple variant languages. +* (bug 19593) Specifying --server in now works for all maintenance scripts === Bug fixes in 1.17 === * (bug 17560) Half-broken deletion moved image files to deletion archive Modified: trunk/phase3/maintenance/Maintenance.php === --- trunk/phase3/maintenance/Maintenance.php2010-10-29 16:22:43 UTC (rev 75649) +++ trunk/phase3/maintenance/Maintenance.php2010-10-29 16:28:50 UTC (rev 75650) @@ -351,6 +351,9 @@ $this->addOption( 'wiki', 'For specifying the wiki ID', false, true ); $this->addOption( 'globals', 'Output globals at the end of processing for debugging' ); $this->addOption( 'memory-limit', 'Set a specific memory limit for the script, "max" for no limit or "default" to avoid changing it' ); + $this->addOption( 'server', "The protocol and server name to use in URLs, e.g.\n" . + "\t\thttp://en.wikipedia.org. This is sometimes necessary because\n" . + "\t\tserver name detection may fail in command line scripts.", false, true ); // If we support a DB, show the options if ( $this->getDbType() > 0 ) { $this->addOption( 'dbuser', 'The DB user to use for this script', false, true ); @@ -693,7 +696,7 @@ * Handle some last-minute setup here. */ public function finalSetup() { - global $wgCommandLineMode, $wgShowSQLErrors; + global $wgCommandLineMode, $wgShowSQLErrors, $wgServer; global $wgProfiling, $wgDBadminuser, $wgDBadminpassword; global $wgDBuser, $wgDBpassword, $wgDBservers, $wgLBFactoryConf; @@ -704,6 +707,11 @@ # Same with these $wgCommandLineMode = true; + # Override $wgServer + if( $this->hasOption( 'server') ) { + $wgServer = $this->getOption( 'server', $wgServer ); + } + # If these were passed, use them if ( $this->mDbUser ) { $wgDBadminuser = $this->mDbUser; Modified: trunk/phase3/maintenance/generateSitemap.php === --- trunk/phase3/maintenance/generateSitemap.php2010-10-29 16:22:43 UTC (rev 75649) +++ trunk/phase3/maintenance/generateSitemap.php2010-10-29 16:28:50 UTC (rev 75650) @@ -128,9 +128,6 @@ $this->mDescription = "Creates a sitemap for the site"; $this->addOption( 'fspath', 'The file system path to save to, e.g. /tmp/sitemap' . "\n\t\tdefaults to current directory", false, true ); - $this->addOption( 'server', "The protocol and server name to use in URLs, e.g.\n" . - "\t\thttp://en.wikipedia.org. This is sometimes necessary because\n" . - "\t\tserver name detection may fail in command line scripts.", false, true ); $this->addOption( 'compress', 'Compress the sitemap files, can take value yes|no, default yes', false, true ); } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75649] trunk/phase3/languages/messages
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75649 Revision: 75649 Author: shinjiman Date: 2010-10-29 16:22:43 + (Fri, 29 Oct 2010) Log Message: --- Localisation updates Cantonese, Chinese and Literary Chinese Modified Paths: -- trunk/phase3/languages/messages/MessagesLzh.php trunk/phase3/languages/messages/MessagesYue.php trunk/phase3/languages/messages/MessagesZh_hans.php trunk/phase3/languages/messages/MessagesZh_hant.php Modified: trunk/phase3/languages/messages/MessagesLzh.php === --- trunk/phase3/languages/messages/MessagesLzh.php 2010-10-29 16:19:35 UTC (rev 75648) +++ trunk/phase3/languages/messages/MessagesLzh.php 2010-10-29 16:22:43 UTC (rev 75649) @@ -452,6 +452,7 @@ 'yourpassword' => '符節', 'yourpasswordagain' => '復核節', 'remembermypassword' => '吾之簿通越(達至$1日)', +'securelogin-stick-https'=> '登後仍以HTTPS通接', 'externaldberror'=> '認庫之錯或禁更爾之外簿。', 'login' => '登簿', 'nav-login-createaccount'=> '登簿、增簿', @@ -485,6 +486,7 @@ 'wrongpasswordempty' => '缺符節,惠補之。', 'passwordtooshort' => '符節莫逾$1字。', 'password-name-match'=> '符節與簿名異也。', +'password-too-weak' => '符節弱乃無用也。', 'mailmypassword' => '遣吾符節', 'passwordremindertitle' => '新臨符節自{{SITENAME}}', 'passwordremindertext' => '$1求遣{{SITENAME}}($4):"$2"之臨符節為"$3"。日到有$5。 @@ -1427,6 +1429,7 @@ 'listfiles_search_for' => '以媒名尋:', 'imgfile' => '檔', 'listfiles' => '見檔', +'listfiles_thumb' => '縮', 'listfiles_date'=> '時', 'listfiles_name'=> '名', 'listfiles_user'=> '簿', @@ -2189,7 +2192,8 @@ 'immobile-target-namespace-iw' => '無移至垮維基,此乃無效也。', 'immobile-source-page' => '此頁無動也。', 'immobile-target-page' => '無動至標之標題。', -'imagenocrossnamespace'=> '非動非檔至檔名間', +'imagenocrossnamespace'=> '非動檔至非檔名間', +'nonfile-cannot-move-to-file' => '非動非檔至檔名間', 'imagetypemismatch'=> '其新副檔名非配其類也', 'imageinvalidfilename' => '標之檔名乃無效也', 'fix-double-redirects' => '更指原題之任渡', Modified: trunk/phase3/languages/messages/MessagesYue.php === --- trunk/phase3/languages/messages/MessagesYue.php 2010-10-29 16:19:35 UTC (rev 75648) +++ trunk/phase3/languages/messages/MessagesYue.php 2010-10-29 16:22:43 UTC (rev 75649) @@ -1,5 +1,5 @@ http://translatewiki.net @@ -541,6 +541,7 @@ 'yourpassword' => '密碼:', 'yourpasswordagain' => '再輸入密碼:', 'remembermypassword' => '響呢個瀏覽器度記住我嘅登入資料 (最高維持$1{{PLURAL:$1|日|日}})', +'securelogin-stick-https'=> '登入後繼續以HTTPS連接', 'yourdomainname' => '你嘅網域:', 'externaldberror'=> '驗證資料庫出錯,或者唔允許你更新你嘅外部帳戶。', 'login' => '登入', @@ -577,6 +578,7 @@ 'wrongpasswordempty' => '你都未入密碼,唔該再試多次啦。', 'passwordtooshort' => '你嘅密碼最少要有$1個半形字元。', 'password-name-match'=> '你嘅密碼一定要同你嘅用戶名唔一樣。', +'password-too-weak' => '所提供嘅密碼太弱唔用得。', 'mailmypassword' => '寄個新密碼', 'passwordremindertitle' => '{{SITENAME}}嘅新臨時密碼', 'passwordremindertext' => '有人(可能係你,IP 位置 $1) @@ -1614,6 +1616,7 @@ 'listfiles_search_for' => '搵媒體名:', 'imgfile' => '檔案', 'listfiles' => '檔案清單', +'listfiles_thumb' => '縮圖', 'listfiles_date'=> '日期', 'listfiles_name'=> '名', 'listfiles_user'=> '用戶', Modified: trunk/phase3/languages/messages/MessagesZh_hans.php === --- trunk/phase3/languages/messages/MessagesZh_hans.php 2010-10-29 16:19:35 UTC (rev 75648) +++ trunk/phase3/languages/messages/MessagesZh_hans.php 2010-10-29 16:22:43 UTC (rev 75649) @@ -1,5 +1,5 @@ http://translatewiki.net @@ -604,6 +604,7 @@ 'yourpassword' => '密码:', 'yourpasswordagain' => '再次输入密码:', 'remembermypassword' => '在这个浏览器上记住我的登入信息(可维持$1{{PLURAL:$1|日|日}})', +'securelogin-stick-https'=> '登入后继续以HTTPS连接', 'yourdomainname' => '您的域名:', 'externaldberror'=> '这可能是由于验证数据库错误或您被禁止更新您的外部账号。', 'login' => '登录', @@ -638,6 +639,7 @@ 'wrongpasswordempty' => '您没有输入密码,请重试!', 'passwordtooshort' => '您的密码至少需要$1个字符。', 'password-name-match'=> '您的密码必须和您的用户名不相同。', +'password-too-weak' => '所提供的密码过弱不能使用。', 'mailmypassword' => '将新密码寄给我', 'passwordremindertitle' => '{{SITENAME}}的新临时密码', 'passwordremindertext' => '有人(可能是您,来自IP地址$1)已请求{{SITENAME}}的新密码($4)。 @@ -1661,6 +1663,7 @@ 'listfiles_search_for' => '按媒体名称搜索:', 'imgfile' => '文件', 'listfiles' => '文件列表', +'listfiles_thumb' => '缩图', 'listfiles_date'=> '日期', 'listfiles_name'=> '名称', 'listfiles_user'=> '用户', Modified: trunk/phase3/langu
[MediaWiki-CVS] SVN: [75648] trunk/phase3/includes/Skin.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75648 Revision: 75648 Author: btongminh Date: 2010-10-29 16:19:35 + (Fri, 29 Oct 2010) Log Message: --- Follow-up r75621: Check for $wgEnableAPI before adding the RSD link to the head Modified Paths: -- trunk/phase3/includes/Skin.php Modified: trunk/phase3/includes/Skin.php === --- trunk/phase3/includes/Skin.php 2010-10-29 16:06:20 UTC (rev 75647) +++ trunk/phase3/includes/Skin.php 2010-10-29 16:19:35 UTC (rev 75648) @@ -192,7 +192,7 @@ } function initPage( OutputPage $out ) { - global $wgFavicon, $wgAppleTouchIcon; + global $wgFavicon, $wgAppleTouchIcon, $wgEnableAPI; wfProfileIn( __METHOD__ ); @@ -216,15 +216,17 @@ 'title' => wfMsgForContent( 'opensearch-desc' ), ) ); - # Real Simple Discovery link, provides auto-discovery information - # for the MediaWiki API (and potentially additional custom API - # support such as WordPress or Twitter-compatible APIs for a - # blogging extension, etc) - $out->addLink( array( - 'rel' => 'EditURI', - 'type' => 'application/rsd+xml', - 'href' => wfExpandUrl( wfAppendQuery( wfScript( 'api' ), array( 'action' => 'rsd' ) ) ), - ) ); + if ( $wgEnableAPI ) { + # Real Simple Discovery link, provides auto-discovery information + # for the MediaWiki API (and potentially additional custom API + # support such as WordPress or Twitter-compatible APIs for a + # blogging extension, etc) + $out->addLink( array( + 'rel' => 'EditURI', + 'type' => 'application/rsd+xml', + 'href' => wfExpandUrl( wfAppendQuery( wfScript( 'api' ), array( 'action' => 'rsd' ) ) ), + ) ); + } $this->addMetadataLinks( $out ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [75647] trunk/extensions
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75647 Revision: 75647 Author: reedy Date: 2010-10-29 16:06:20 + (Fri, 29 Oct 2010) Log Message: --- Fixup some while to foreach. Remove an unused global Modified Paths: -- trunk/extensions/AntiSpoof/SpoofUser.php trunk/extensions/AntiSpoof/batchAntiSpoof.php trunk/extensions/CentralAuth/migratePass0.php trunk/extensions/CentralAuth/migratePass1.php trunk/extensions/CentralAuth/migrateStewards.php trunk/extensions/CheckUser/install.inc trunk/extensions/CommunityVoice/Modules/Ratings.php trunk/extensions/ProofreadPage/SpecialPagesWithoutScans.php Modified: trunk/extensions/AntiSpoof/SpoofUser.php === --- trunk/extensions/AntiSpoof/SpoofUser.php2010-10-29 15:32:44 UTC (rev 75646) +++ trunk/extensions/AntiSpoof/SpoofUser.php2010-10-29 16:06:20 UTC (rev 75647) @@ -59,7 +59,7 @@ ) ); $spoofs = array(); - while ( $row = $dbr->fetchObject( $spoofedUsers ) ) { + foreach ( $spoofedUsers as $row ) { array_push( $spoofs, $row->user_name ); } return $spoofs; Modified: trunk/extensions/AntiSpoof/batchAntiSpoof.php === --- trunk/extensions/AntiSpoof/batchAntiSpoof.php 2010-10-29 15:32:44 UTC (rev 75646) +++ trunk/extensions/AntiSpoof/batchAntiSpoof.php 2010-10-29 16:06:20 UTC (rev 75647) @@ -12,7 +12,7 @@ $result = $dbw->select( 'user', 'user_name', null, 'batchAntiSpoof.php' ); $n = 0; -while ( $row = $dbw->fetchObject( $result ) ) { +foreach( $res as $row ) { if ( $n++ % $batchSize == 0 ) { echo "$wgDBname $n\n"; } Modified: trunk/extensions/CentralAuth/migratePass0.php === --- trunk/extensions/CentralAuth/migratePass0.php 2010-10-29 15:32:44 UTC (rev 75646) +++ trunk/extensions/CentralAuth/migratePass0.php 2010-10-29 16:06:20 UTC (rev 75647) @@ -29,7 +29,7 @@ "user_id BETWEEN $min AND $max", __FUNCTION__ ); - while ( $row = $dbr->fetchObject( $result ) ) { + foreach( $result as $row ) { $users[intval( $row->user_id )] = $row->user_name; ++$migrated; } Modified: trunk/extensions/CentralAuth/migratePass1.php === --- trunk/extensions/CentralAuth/migratePass1.php 2010-10-29 15:32:44 UTC (rev 75646) +++ trunk/extensions/CentralAuth/migratePass1.php 2010-10-29 16:06:20 UTC (rev 75647) @@ -18,7 +18,7 @@ array( 'gn_name' ), '', __METHOD__ ); - while ( $row = $dbBackground->fetchObject( $result ) ) { + foreach( $result as $row ) { $name = $row->gn_name; $central = new CentralAuthUser( $name ); if ( $central->storeAndMigrate() ) { Modified: trunk/extensions/CentralAuth/migrateStewards.php === --- trunk/extensions/CentralAuth/migrateStewards.php2010-10-29 15:32:44 UTC (rev 75646) +++ trunk/extensions/CentralAuth/migrateStewards.php2010-10-29 16:06:20 UTC (rev 75647) @@ -16,7 +16,7 @@ 'migrateStewards.php' ); $localStewards = array(); -while ( $row = $dbl->fetchObject( $result ) ) { +foreach ( $result as $row ) { $localStewards[] = $row->user_name; } @@ -33,7 +33,7 @@ ), 'migrateStewards.php' ); -while ( $row = $dbl->fetchObject( $result ) ) { +foreach ( $result as $row ) { $globalStewards[$row->gu_name] = $row->gu_id; } Modified: trunk/extensions/CheckUser/install.inc === --- trunk/extensions/CheckUser/install.inc 2010-10-29 15:32:44 UTC (rev 75646) +++ trunk/extensions/CheckUser/install.inc 2010-10-29 16:06:20 UTC (rev 75647) @@ -43,7 +43,7 @@ $cond = "rc_id BETWEEN $blockStart AND $blockEnd $cutoffCond"; $res = $db->select( 'recentchanges', '*', $cond, __FUNCTION__ ); $batch = array(); - while ( $row = $db->fetchObject( $res ) ) { + foreach ( $res as $row ) { $batch[] = array( 'cuc_timestamp' => $row->rc_timestamp, 'cuc_user' => $row->rc_user, Modified: trunk/extensions/CommunityVoice/Modules/Ratings.php === --- trunk/extensions/CommunityVoice/Modules/Ratings.php 2010-10-29 15:32:44 UTC (rev 75646) +++ trunk/extensions/CommunityVoice/Modules/Ratings.php 2010-10-29 16:06:20 UTC (
[MediaWiki-CVS] SVN: [75646] trunk/extensions
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75646 Revision: 75646 Author: reedy Date: 2010-10-29 15:32:44 + (Fri, 29 Oct 2010) Log Message: --- More deprecated method call removals and updates Modified Paths: -- trunk/extensions/AbuseFilter/AbuseFilter.class.php trunk/extensions/AbuseFilter/AbuseFilter.hooks.php trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php trunk/extensions/AntiSpoof/AntiSpoof.php trunk/extensions/AntiSpoof/AntiSpoof_body.php trunk/extensions/CategoryTree/CategoryTreePage.php trunk/extensions/CentralAuth/CentralAuth.php trunk/extensions/CentralAuth/CentralAuthHooks.php trunk/extensions/CentralAuth/SpecialCentralAuth.php trunk/extensions/CentralAuth/SpecialGlobalGroupPermissions.php trunk/extensions/CentralAuth/SpecialMergeAccount.php trunk/extensions/CentralAuth/SpecialWikiSets.php trunk/extensions/CentralNotice/SpecialCentralNotice.php trunk/extensions/CentralNotice/SpecialNoticeTemplate.php trunk/extensions/CentralNotice/TemplatePager.php trunk/extensions/CheckUser/CheckUser.php trunk/extensions/Cite/Cite_body.php trunk/extensions/Collection/Collection.body.php trunk/extensions/Collection/Collection.hooks.php trunk/extensions/Collection/Collection.php trunk/extensions/ContactPage/SpecialContact.php trunk/extensions/CrossNamespaceLinks/CrossNamespaceLinks_body.php trunk/extensions/Gadgets/Gadgets.php trunk/extensions/GlobalBlocking/GlobalBlocking.class.php trunk/extensions/GlobalBlocking/SpecialGlobalBlock.php trunk/extensions/GlobalBlocking/SpecialGlobalBlockList.php trunk/extensions/GlobalBlocking/SpecialGlobalBlockStatus.php trunk/extensions/GlobalBlocking/SpecialRemoveGlobalBlock.php trunk/extensions/InputBox/InputBox.classes.php trunk/extensions/NewUserMessage/NewUserMessage.class.php trunk/extensions/OggHandler/OggHandler_body.php trunk/extensions/Oversight/HideRevision_body.php trunk/extensions/ParserFunctions/ParserFunctions_body.php trunk/extensions/ReaderFeedback/ReaderFeedback.hooks.php trunk/extensions/ReaderFeedback/specialpages/ReaderFeedback_body.php trunk/extensions/Renameuser/Renameuser_body.php trunk/extensions/SecurePoll/includes/pages/VotePage.php trunk/extensions/SiteMatrix/SiteMatrix_body.php trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php trunk/extensions/TorBlock/TorBlock.class.php Modified: trunk/extensions/AbuseFilter/AbuseFilter.class.php === --- trunk/extensions/AbuseFilter/AbuseFilter.class.php 2010-10-29 15:30:54 UTC (rev 75645) +++ trunk/extensions/AbuseFilter/AbuseFilter.class.php 2010-10-29 15:32:44 UTC (rev 75646) @@ -197,8 +197,6 @@ } public static function ajaxCheckSyntax( $filter ) { - wfLoadExtensionMessages( 'AbuseFilter' ); - global $wgUser; if ( !$wgUser->isAllowed( 'abusefilter-modify' ) ) { return false; @@ -323,7 +321,6 @@ } public static function evaluateExpression( $expr, $vars = array() ) { - wfLoadExtensionMessages( 'AbuseFilter' ); global $wgAbuseFilterParserClass; if ( self::checkSyntax( $expr ) !== true ) { @@ -339,7 +336,6 @@ public static function ajaxReAutoconfirm( $username ) { global $wgUser; - wfLoadExtensionMessages( 'AbuseFilter' ); if ( !$wgUser->isAllowed( 'abusefilter-modify' ) ) { // Don't allow it. @@ -631,8 +627,6 @@ $actionsByFilter = self::getConsequencesForFilters( $filters ); $actionsTaken = array_fill_keys( $filters, array() ); - wfLoadExtensionMessages( 'AbuseFilter' ); - $messages = array(); foreach ( $actionsByFilter as $filter => $actions ) { Modified: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php === --- trunk/extensions/AbuseFilter/AbuseFilter.hooks.php 2010-10-29 15:30:54 UTC (rev 75645) +++ trunk/extensions/AbuseFilter/AbuseFilter.hooks.php 2010-10-29 15:32:44 UTC (rev 75646) @@ -100,7 +100,6 @@ } public static function onAbortNewAccount( $user, &$message ) { - wfLoadExtensionMessages( 'AbuseFilter' ); if ( $user->getName() == wfMsgForContent( 'abusefilter-blocker' ) ) { $message = wfMsg( 'abusefilter-accountreserved' ); return false; @@ -221,7 +220,6 @@ public static function onContributionsToolLinks( $id, $nt, &$tools ) { global $wgUser; - wfLoadExtensionMessages( 'AbuseFilter' ); if ( $wgUser->isAllowed( 'abusefilter-log' ) ) { $sk = $wgUser->getSkin(
[MediaWiki-CVS] SVN: [75645] trunk/phase3/resources
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75645 Revision: 75645 Author: krinkle Date: 2010-10-29 15:30:54 + (Fri, 29 Oct 2010) Log Message: --- white-space cleanup throughout $.client and mw.util and mw.util.test (r75593) Modified Paths: -- trunk/phase3/resources/jquery/jquery.client.js trunk/phase3/resources/mediawiki.util/mediawiki.util.js Modified: trunk/phase3/resources/jquery/jquery.client.js === --- trunk/phase3/resources/jquery/jquery.client.js 2010-10-29 15:27:53 UTC (rev 75644) +++ trunk/phase3/resources/jquery/jquery.client.js 2010-10-29 15:30:54 UTC (rev 75645) @@ -1,17 +1,17 @@ /* - * User-agent detection + * User-agent detection */ jQuery.client = new ( function() { - + /* Private Members */ - + var profile; - + /* Public Functions */ - + /** * Returns an object containing information about the browser -* +* * The resulting client object will be in the following format: * { * 'name': 'firefox', @@ -26,9 +26,9 @@ this.profile = function() { // Use the cached version if possible if ( typeof profile === 'undefined' ) { - + /* Configuration */ - + // Name of browsers or layout engines we don't recognize var uk = 'unknown'; // Generic version digit @@ -75,9 +75,9 @@ var platforms = ['win', 'mac', 'linux', 'sunos', 'solaris', 'iphone']; // Translations for conforming operating system names var platformTranslations = [['sunos', 'solaris']]; - + /* Methods */ - + // Performs multiple replacements on a string function translate( source, translations ) { for ( var i = 0; i < translations.length; i++ ) { @@ -85,9 +85,9 @@ } return source; }; - + /* Pre-processing */ - + var userAgent = navigator.userAgent, match, name = uk, layout = uk, layoutversion = uk, platform = uk, version = x; if ( match = new RegExp( '(' + wildUserAgents.join( '|' ) + ')' ).exec( userAgent ) ) { // Takes a userAgent string and translates given text into something we can more easily work with @@ -95,9 +95,9 @@ } // Everything will be in lowercase from now on userAgent = userAgent.toLowerCase(); - + /* Extraction */ - + if ( match = new RegExp( '(' + names.join( '|' ) + ')' ).exec( userAgent ) ) { name = translate( match[1], nameTranslations ); } @@ -113,9 +113,9 @@ if ( match = new RegExp( '(' + versionPrefixes.join( '|' ) + ')' + versionSuffix ).exec( userAgent ) ) { version = match[3]; } - + /* Edge Cases -- did I mention about how user agent string lie? */ - + // Decode Safari's crazy 400+ version numbers if ( name.match( /safari/ ) && version > 400 ) { version = '2.0'; @@ -124,9 +124,9 @@ if ( name === 'opera' && version >= 9.8) { version = userAgent.match( /version\/([0-9\.]*)/i )[1] || 10; } - + /* Caching */ - + profile = { 'name': name, 'layout': layout, @@ -139,12 +139,12 @@ } return profile; }; - + /** * Checks the current browser against a support map object to determine if the browser has been black-listed or * not. If the browser was not configured specifically it is assumed to work. It is assumed that the body * element is classified as either "ltr" or "rtl". If neither is set, "ltr" is assumed. -* +* * A browser map is in the following format: * { * 'ltr': { @@ -160,9 +160,9 @@ * 'iphone': false * } * } -* +* *
[MediaWiki-CVS] SVN: [75644] trunk/phase3/resources
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75644 Revision: 75644 Author: krinkle Date: 2010-10-29 15:27:53 + (Fri, 29 Oct 2010) Log Message: --- adding layoutversion to $.client and isLayoutVersion to mw.util. Follow-up of r75593 Modified Paths: -- trunk/phase3/resources/jquery/jquery.client.js trunk/phase3/resources/mediawiki.util/mediawiki.util.js Modified: trunk/phase3/resources/jquery/jquery.client.js === --- trunk/phase3/resources/jquery/jquery.client.js 2010-10-29 15:14:44 UTC (rev 75643) +++ trunk/phase3/resources/jquery/jquery.client.js 2010-10-29 15:27:53 UTC (rev 75644) @@ -16,6 +16,7 @@ * { * 'name': 'firefox', * 'layout': 'gecko', +* 'layoutVersion': '20101026', * 'platform': 'linux' * 'version': '3.5.1', * 'versionBase': '3', @@ -68,6 +69,8 @@ var layouts = ['gecko', 'konqueror', 'msie', 'opera', 'webkit']; // Translations for conforming layout names var layoutTranslations = [['konqueror', 'khtml'], ['msie', 'trident'], ['opera', 'presto']]; + // Names of supported layout engines for version number + var layoutVersions = ['applewebkit', 'gecko']; // Names of known operating systems var platforms = ['win', 'mac', 'linux', 'sunos', 'solaris', 'iphone']; // Translations for conforming operating system names @@ -85,7 +88,7 @@ /* Pre-processing */ - var userAgent = navigator.userAgent, match, name = uk, layout = uk, platform = uk, version = x; + var userAgent = navigator.userAgent, match, name = uk, layout = uk, layoutversion = uk, platform = uk, version = x; if ( match = new RegExp( '(' + wildUserAgents.join( '|' ) + ')' ).exec( userAgent ) ) { // Takes a userAgent string and translates given text into something we can more easily work with userAgent = translate( userAgent, userAgentTranslations ); @@ -101,6 +104,9 @@ if ( match = new RegExp( '(' + layouts.join( '|' ) + ')' ).exec( userAgent ) ) { layout = translate( match[1], layoutTranslations ); } + if ( match = new RegExp( '(' + layoutVersions.join( '|' ) + ')\\\/(\\d+)').exec( navigator.userAgent.toLowerCase() ) ) { + layoutversion = parseInt(match[2]); + } if ( match = new RegExp( '(' + platforms.join( '|' ) + ')' ).exec( navigator.platform.toLowerCase() ) ) { platform = translate( match[1], platformTranslations ); } @@ -124,6 +130,7 @@ profile = { 'name': name, 'layout': layout, + 'layoutVersion': layoutversion, 'platform': platform, 'version': version, 'versionBase': ( version !== x ? new String( version ).substr( 0, 1 ) : x ), Modified: trunk/phase3/resources/mediawiki.util/mediawiki.util.js === --- trunk/phase3/resources/mediawiki.util/mediawiki.util.js 2010-10-29 15:14:44 UTC (rev 75643) +++ trunk/phase3/resources/mediawiki.util/mediawiki.util.js 2010-10-29 15:27:53 UTC (rev 75644) @@ -17,33 +17,34 @@ // Populate clientProfile var mw.util.clientProfile = $.client.profile(); + var webkit = navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); // Set tooltipAccessKeyPrefix - // Opera on any platform - if ( mw.util.isBrowser('opera') ) { - this.tooltipAccessKeyPrefix = 'shift-esc-'; - - // Chrome on any platform - } else if ( mw.util.isBrowser('chrome') ) { - // Chrome on Mac or Chrome on other platform ? - this.tooltipAcce
[MediaWiki-CVS] SVN: [75642] trunk/phase3/resources/mediawiki.util
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75642 Revision: 75642 Author: krinkle Date: 2010-10-29 14:44:18 + (Fri, 29 Oct 2010) Log Message: --- Follow-up r75577 Modified Paths: -- trunk/phase3/resources/mediawiki.util/mediawiki.util.js trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js Modified: trunk/phase3/resources/mediawiki.util/mediawiki.util.js === --- trunk/phase3/resources/mediawiki.util/mediawiki.util.js 2010-10-29 12:20:11 UTC (rev 75641) +++ trunk/phase3/resources/mediawiki.util/mediawiki.util.js 2010-10-29 14:44:18 UTC (rev 75642) @@ -74,8 +74,8 @@ * Checks if the current browser matches * * @example mw.util.isBrowser( 'safari' ); - * @paramString str name of a browser (case insensitive). Check jquery.client.js for possible values - * @return Boolean true of the browsername matches the clients browser + * @paramString str name of a browser (case insensitive). Check jquery.client.js for possible values + * @return Boolean true of the browsername matches the clients browser */ 'isBrowser' : function( str ) { str = (str + '').toLowerCase(); @@ -86,8 +86,8 @@ * Checks if the current layout matches * * @example mw.util.isLayout( 'webkit' ); - * @paramString str name of a layout engine (case insensitive). Check jquery.client.js for possible values - * @return Boolean true of the layout engine matches the clients browser + * @paramString str name of a layout engine (case insensitive). Check jquery.client.js for possible values + * @return Boolean true of the layout engine matches the clients browser */ 'isLayout' : function( str ) { str = (str + '').toLowerCase(); @@ -98,8 +98,8 @@ * Checks if the current layout matches * * @example mw.util.isPlatform( 'mac' ); - * @paramString str name of a platform (case insensitive). Check jquery.client.js for possible values - * @return Boolean true of the platform matches the clients platform + * @paramString str name of a platform (case insensitive). Check jquery.client.js for possible values + * @return Boolean true of the platform matches the clients platform */ 'isPlatform' : function( str ) { str = (str + '').toLowerCase(); @@ -110,8 +110,8 @@ * Checks if the current browser version matches * * @example mw.util.isBrowserVersion( '5' ); - * @paramString str version number without decimals - * @return Boolean true of the version number matches the clients browser + * @paramString str version number without decimals + * @return Boolean true of the version number matches the clients browser */ 'isBrowserVersion' : function( str ) { return this.clientProfile.versionBase === str; @@ -135,24 +135,24 @@ * * @param String str string to be encoded */ - 'wfUrlencode' : function( str ) { + 'wikiUrlencode' : function( str ) { return this.rawurlencode( str ).replace( /%20/g, '_' ).replace( /%3A/g, ':' ).replace( /%2F/g, '/' ); }, /** * Get the full url to a pagename * - * @param String str pagename to link to + * @param String str pagename to link to */ - 'wfGetlink' : function( str ) { - return wgServer + wgArticlePath.replace( '$1', this.wfUrlencode( str ) ); + 'wikiGetlink' : function( str ) { + return wgServer + wgArticlePath.replace( '$1', this.wikiUrlencode( str ) ); }, /** * Check is a variable is empty. Support for strings, booleans, arrays and objects. * String "0" is considered empty. String containing only whitespace (ie. " ") is considered not empty. * - * @param Mixed vthe variable to check for empty ness + * @param Mixed v the variable to check for
[MediaWiki-CVS] SVN: [75641] trunk/phase3/includes/api
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75641 Revision: 75641 Author: reedy Date: 2010-10-29 12:20:11 + (Fri, 29 Oct 2010) Log Message: --- Followup r75554, functionise Export code, allows for return to be used "non scarily" Remove some extra blank comment lines Modified Paths: -- trunk/phase3/includes/api/ApiQuery.php trunk/phase3/includes/api/ApiRsd.php Modified: trunk/phase3/includes/api/ApiQuery.php === --- trunk/phase3/includes/api/ApiQuery.php 2010-10-29 05:52:38 UTC (rev 75640) +++ trunk/phase3/includes/api/ApiQuery.php 2010-10-29 12:20:11 UTC (rev 75641) @@ -383,9 +383,7 @@ $result->addValue( 'query', 'redirects', $redirValues ); } - // // Missing revision elements - // $missingRevIDs = $pageSet->getMissingRevisionIDs(); if ( count( $missingRevIDs ) ) { $revids = array(); @@ -398,9 +396,7 @@ $result->addValue( 'query', 'badrevids', $revids ); } - // // Page elements - // $pages = array(); // Report any missing titles @@ -457,48 +453,57 @@ $result->addValue( 'query', 'pages', $pages ); } if ( $this->params['export'] ) { - $exportTitles = array(); - $titles = $pageSet->getGoodTitles(); - if( count( $titles ) ) { - foreach ( $titles as $title ) { - if ( $title->userCanRead() ) { - $exportTitles[] = $title; - } + $this->doExport( $pageSet, $result ); + } + } + + /** +* @param $pageSet ApiPageSet +* @param $result ApiResult +* @return +*/ + private function doExport( $pageSet, $result ) { + $exportTitles = array(); + $titles = $pageSet->getGoodTitles(); + if( count( $titles ) ) { + foreach ( $titles as $title ) { + if ( $title->userCanRead() ) { + $exportTitles[] = $title; } } - //export, when there are titles - if ( !count( $exportTitles ) ) { - return; - } + } + // only export when there are titles + if ( !count( $exportTitles ) ) { + return; + } - $exporter = new WikiExporter( $this->getDB() ); - // WikiExporter writes to stdout, so catch its - // output with an ob - ob_start(); - $exporter->openStream(); - foreach ( $exportTitles as $title ) { - $exporter->pageByTitle( $title ); - } - $exporter->closeStream(); - $exportxml = ob_get_contents(); - ob_end_clean(); + $exporter = new WikiExporter( $this->getDB() ); + // WikiExporter writes to stdout, so catch its + // output with an ob + ob_start(); + $exporter->openStream(); + foreach ( $exportTitles as $title ) { + $exporter->pageByTitle( $title ); + } + $exporter->closeStream(); + $exportxml = ob_get_contents(); + ob_end_clean(); - // Don't check the size of exported stuff - // It's not continuable, so it would cause more - // problems than it'd solve - $result->disableSizeCheck(); - if ( $this->params['exportnowrap'] ) { - $result->reset(); - // Raw formatter will handle this - $result->addValue( null, 'text', $exportxml ); - $result->addValue( null, 'mime', 'text/xml' ); - } else { - $r = array(); - ApiResult::setContent( $r, $exportxml ); - $result->addValue( 'query', 'export', $r ); - } - $result->enableSizeCheck(); + // Don't check the size of exported stuff + // It's not continuable, so it would cause more + // problems