[MediaWiki-CVS] SVN: [62866] trunk/phase3/maintenance/tests/ApiSetup.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62866 Revision: 62866 Author: mah Date: 2010-02-23 06:55:16 + (Tue, 23 Feb 2010) Log Message: --- set password the correct way for apitests Modified Paths: -- trunk/phase3/maintenance/tests/ApiSetup.php Modified: trunk/phase3/maintenance/tests/ApiSetup.php === --- trunk/phase3/maintenance/tests/ApiSetup.php 2010-02-23 05:14:42 UTC (rev 62865) +++ trunk/phase3/maintenance/tests/ApiSetup.php 2010-02-23 06:55:16 UTC (rev 62866) @@ -27,12 +27,10 @@ self::$user = User::newFromName(self::$userName); if ( !self::$user->getID() ) { self::$user = User::createNew(self::$userName, array( - "password" => self::$passWord, "email" => "t...@example.com", "real_name" => "Test User")); - } else { - self::$user->setPassword(self::$passWord); } + self::$user->setPassword(self::$passWord); self::$user->saveSettings(); } } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62865] trunk/phase3/maintenance/tests/ApiTest.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62865 Revision: 62865 Author: mah Date: 2010-02-23 05:14:42 + (Tue, 23 Feb 2010) Log Message: --- Use globals correctly to make tests work again. Modified Paths: -- trunk/phase3/maintenance/tests/ApiTest.php Modified: trunk/phase3/maintenance/tests/ApiTest.php === --- trunk/phase3/maintenance/tests/ApiTest.php 2010-02-23 02:58:24 UTC (rev 62864) +++ trunk/phase3/maintenance/tests/ApiTest.php 2010-02-23 05:14:42 UTC (rev 62865) @@ -57,7 +57,9 @@ } function testApi() { - if(!isset($wgServername) || !isset($wgServer)) { + global $wgServerName, $wgServer; + + if(!isset($wgServerName) || !isset($wgServer)) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); } @@ -71,7 +73,9 @@ } function testApiLoginNoName() { - if(!isset($wgServername) || !isset($wgServer)) { + global $wgServerName, $wgServer; + + if(!isset($wgServerName) || !isset($wgServer)) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); } @@ -88,7 +92,9 @@ } function testApiLoginBadPass() { - if(!isset($wgServername) || !isset($wgServer)) { + global $wgServerName, $wgServer; + + if(!isset($wgServerName) || !isset($wgServer)) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); } @@ -105,7 +111,9 @@ } function testApiLoginGoodPass() { - if(!isset($wgServername) || !isset($wgServer)) { + global $wgServerName, $wgServer; + + if(!isset($wgServerName) || !isset($wgServer)) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); } @@ -122,9 +130,9 @@ } function testApiGotCookie() { - global $wgScriptPath, $wgServerName; + global $wgServerName, $wgServer, $wgScriptPath; - if(!isset($wgServername) || !isset($wgServer)) { + if(!isset($wgServerName) || !isset($wgServer)) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. 'be set in LocalSettings.php'); } @@ -146,6 +154,7 @@ */ function testApiListPages(CookieJar $cj) { $this->markTestIncomplete("Not done with this yet"); + global $wgServerName, $wgServer; if($wgServerName == "localhost" || $wgServer == "http://localhost";) { $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '. ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62864] branches/conrad/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62864 Revision: 62864 Author: conrad Date: 2010-02-23 02:58:24 + (Tue, 23 Feb 2010) Log Message: --- Improve changes to ?preload= thanks to feedback from Tim. getTransclusionText -> getPreloadText remove usage of FakeTitle pass text not title to parser (so can be, and is now, tested) merge the new OT_SECTIONS and OT_EXTRACT into OT_PLAIN - they are both no-ops atm. Modified Paths: -- branches/conrad/phase3/includes/Defines.php branches/conrad/phase3/includes/EditPage.php branches/conrad/phase3/includes/parser/Parser.php branches/conrad/phase3/maintenance/parserTests.inc branches/conrad/phase3/maintenance/parserTests.txt Modified: branches/conrad/phase3/includes/Defines.php === --- branches/conrad/phase3/includes/Defines.php 2010-02-23 01:21:18 UTC (rev 62863) +++ branches/conrad/phase3/includes/Defines.php 2010-02-23 02:58:24 UTC (rev 62864) @@ -209,8 +209,7 @@ define( 'OT_WIKI', 2 ); define( 'OT_PREPROCESS', 3 ); define( 'OT_MSG' , 3 ); // b/c alias for OT_PREPROCESS -define( 'OT_INCLUDES', 4); -define( 'OT_EXTRACT', 5); +define( 'OT_PLAIN', 4); # Flags for Parser::setFunctionHook define( 'SFH_NO_HASH', 1 ); Modified: branches/conrad/phase3/includes/EditPage.php === --- branches/conrad/phase3/includes/EditPage.php2010-02-23 01:21:18 UTC (rev 62863) +++ branches/conrad/phase3/includes/EditPage.php2010-02-23 02:58:24 UTC (rev 62864) @@ -231,11 +231,22 @@ if ( !empty( $this->mPreloadText ) ) { return $this->mPreloadText; } else { - $preloadTitle = Title::newFromText( $preload ); - if ( isset( $preloadTitle ) && $preloadTitle->userCanRead() ) { - return $wgParser->getTransclusionText( $preloadTitle, ParserOptions::newFromUser( $wgUser ) ); + $title = Title::newFromText( $preload ); + # Check for existence to avoid getting MediaWiki:Noarticletext + if ( isset( $title ) && $title->exists() && $title->userCanRead() ) { + $article = new Article( $title ); + + if ( $article->isRedirect() ) { + $title = Title::newFromRedirectRecurse( $article->getContent() ); + if ( $title->exists() && $title->userCanRead() ) { + $article = new Article( $title ); + } + } + $parserOptions = ParserOptions::newFromUser( $wgUser ); + return $wgParser->getPreloadText( $article->getContent(), $title, $parserOptions ); } } + return ""; } /** Modified: branches/conrad/phase3/includes/parser/Parser.php === --- branches/conrad/phase3/includes/parser/Parser.php 2010-02-23 01:21:18 UTC (rev 62863) +++ branches/conrad/phase3/includes/parser/Parser.php 2010-02-23 02:58:24 UTC (rev 62864) @@ -26,8 +26,8 @@ * Cleans a signature before saving it to preferences * extractSections() * Extracts sections from an article for section editing - * getTransclusionText() - * Extracts the text of a template with only , etc., parsed + * getPreloadText() + * Removes sections, and tags. * * Globals used: *objects: $wgLang, $wgContLang @@ -84,10 +84,8 @@ const OT_WIKI = 2; // like preSaveTransform() const OT_PREPROCESS = 3; // like preprocess() const OT_MSG = 3; + const OT_PLAIN = 4; // like extractSections() - portions of the original are returned unchanged. - const OT_INCLUDES = 4; // like getTransclusionText() - actually a NO-OP all features use the preprocessor flags - const OT_EXTRACT = 5; // like extractSections() - should behaviour be needed later on, these flags will then work. - // Marker Suffix needs to be accessible staticly. const MARKER_SUFFIX = "-QINU\x7f"; @@ -254,8 +252,7 @@ 'html' => $ot == self::OT_HTML, 'wiki' => $ot == self::OT_WIKI, 'pre' => $ot == self::OT_PREPROCESS, - 'includes' => $ot == self::OT_INCLUDES, - 'extract' => $ot == self::OT_EXTRACT, + 'plain' => $ot == self::OT_PLAIN, ); } @@ -502,23 +499,21 @@ } /** -* Get the wikitext of a page as though it was transcluded. +* Process the wikitext for the ?preload= feature. (bug 5210)
[MediaWiki-CVS] SVN: [62861] branches/conrad/phase3/includes/parser/Parser.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62861 Revision: 62861 Author: conrad Date: 2010-02-23 00:49:46 + (Tue, 23 Feb 2010) Log Message: --- Add new output types to ->ot[] for consistency. Modified Paths: -- branches/conrad/phase3/includes/parser/Parser.php Modified: branches/conrad/phase3/includes/parser/Parser.php === --- branches/conrad/phase3/includes/parser/Parser.php 2010-02-23 00:28:11 UTC (rev 62860) +++ branches/conrad/phase3/includes/parser/Parser.php 2010-02-23 00:49:46 UTC (rev 62861) @@ -254,6 +254,8 @@ 'html' => $ot == self::OT_HTML, 'wiki' => $ot == self::OT_WIKI, 'pre' => $ot == self::OT_PREPROCESS, + 'includes' => $ot == self::OT_INCLUDES, + 'extract' => $ot == self::OT_EXTRACT, ); } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62859] trunk/extensions/LiquidThreads/classes/NewMessagesController. php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62859 Revision: 62859 Author: siebrand Date: 2010-02-23 00:08:15 + (Tue, 23 Feb 2010) Log Message: --- Fix database error (hopefully). Needs review (also because NewMessages::writeMessageStateForUpdatedThread() could contain a similar issue. Executed query was the below, even though the database table prefix is "bw_". SELECT `bw_user`.*, tc_prop.up_value as timecorrection, l_prop.up_value as language FROM `bw_user` left join user_properties as tc_prop ON ((up_user=user_id) AND up_property = 'timecorrection') left join user_properties as l_prop ON ((up_user=user_id) AND up_property = 'language') WHERE user_id = '3165' Modified Paths: -- trunk/extensions/LiquidThreads/classes/NewMessagesController.php Modified: trunk/extensions/LiquidThreads/classes/NewMessagesController.php === --- trunk/extensions/LiquidThreads/classes/NewMessagesController.php 2010-02-22 23:41:51 UTC (rev 62858) +++ trunk/extensions/LiquidThreads/classes/NewMessagesController.php 2010-02-23 00:08:15 UTC (rev 62859) @@ -267,10 +267,12 @@ if ( version_compare( $wgVersion, '1.16', '<' ) ) { $oldPreferenceFormat = true; } else { - $tables[] = 'user_properties as tc_prop'; + $tableNameUserProperties = $dbr->tableName( 'user_properties' ); + + $tables[] = $tableNameUserProperties . ' as tc_prop'; $fields[] = 'tc_prop.up_value as timecorrection'; - $join_conds['user_properties as tc_prop'] = array( + $join_conds[$tableNameUserProperties . ' as tc_prop'] = array( 'left join', array( 'up_user=user_id', @@ -278,10 +280,10 @@ ) ); - $tables[] = 'user_properties as l_prop'; + $tables[] = $tableNameUserProperties . ' as l_prop'; $fields[] = 'l_prop.up_value as language'; - $join_conds['user_properties as l_prop'] = array( + $join_conds[$tableNameUserProperties . ' as l_prop'] = array( 'left join', array( 'up_user=user_id', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62860] branches/conrad/phase3/includes
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62860 Revision: 62860 Author: conrad Date: 2010-02-23 00:28:11 + (Tue, 23 Feb 2010) Log Message: --- Tidy the state initialization in Parser::extractSections() to make it clearer what is actually happening. Fixes bug 22602 - stops overloading OT_WIKI. Modified Paths: -- branches/conrad/phase3/includes/Defines.php branches/conrad/phase3/includes/parser/Parser.php Modified: branches/conrad/phase3/includes/Defines.php === --- branches/conrad/phase3/includes/Defines.php 2010-02-23 00:08:15 UTC (rev 62859) +++ branches/conrad/phase3/includes/Defines.php 2010-02-23 00:28:11 UTC (rev 62860) @@ -209,6 +209,8 @@ define( 'OT_WIKI', 2 ); define( 'OT_PREPROCESS', 3 ); define( 'OT_MSG' , 3 ); // b/c alias for OT_PREPROCESS +define( 'OT_INCLUDES', 4); +define( 'OT_EXTRACT', 5); # Flags for Parser::setFunctionHook define( 'SFH_NO_HASH', 1 ); Modified: branches/conrad/phase3/includes/parser/Parser.php === --- branches/conrad/phase3/includes/parser/Parser.php 2010-02-23 00:08:15 UTC (rev 62859) +++ branches/conrad/phase3/includes/parser/Parser.php 2010-02-23 00:28:11 UTC (rev 62860) @@ -80,12 +80,14 @@ // Allowed values for $this->mOutputType // Parameter to startExternalParse(). - const OT_HTML = 1; - const OT_WIKI = 2; - const OT_PREPROCESS = 3; + const OT_HTML = 1; // like parse() + const OT_WIKI = 2; // like preSaveTransform() + const OT_PREPROCESS = 3; // like preprocess() const OT_MSG = 3; - const OT_INCLUDES = 4; + const OT_INCLUDES = 4; // like getTransclusionText() - actually a NO-OP all features use the preprocessor flags + const OT_EXTRACT = 5; // like extractSections() - should behaviour be needed later on, these flags will then work. + // Marker Suffix needs to be accessible staticly. const MARKER_SUFFIX = "-QINU\x7f"; @@ -4804,11 +4806,10 @@ *for "replace", the whole page with the section replaced. */ private function extractSections( $text, $section, $mode, $newText='' ) { - global $wgTitle; $this->clearState(); - $this->setTitle( $wgTitle ); // not generally used but removes an ugly failure mode + $this->setTitle( new FakeTitle ); $this->mOptions = new ParserOptions; - $this->setOutputType( self::OT_WIKI ); + $this->setOutputType( self::OT_EXTRACT ); $outText = ''; $frame = $this->getPreprocessor()->newFrame(); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62857] trunk/extensions
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62857 Revision: 62857 Author: siebrand Date: 2010-02-22 22:51:48 + (Mon, 22 Feb 2010) Log Message: --- Remove extensions obsolete after branching 1.16 from trunk Removed Paths: - trunk/extensions/BoardVote/ trunk/extensions/Lockout/ trunk/extensions/Makebot/ trunk/extensions/Makesysop/ trunk/extensions/Mibbit/ trunk/extensions/Review/ trunk/extensions/UsernameBlacklist/ trunk/extensions/freenodeChat/ trunk/extensions/wikiwyg/ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62856] trunk
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62856 Revision: 62856 Author: reedy Date: 2010-02-22 22:44:41 + (Mon, 22 Feb 2010) Log Message: --- Fixup whitespace Modified Paths: -- trunk/extensions/AssertEdit/AssertEditApi.php trunk/phase3/includes/api/ApiHelp.php Modified: trunk/extensions/AssertEdit/AssertEditApi.php === --- trunk/extensions/AssertEdit/AssertEditApi.php 2010-02-22 22:37:37 UTC (rev 62855) +++ trunk/extensions/AssertEdit/AssertEditApi.php 2010-02-22 22:44:41 UTC (rev 62856) @@ -1,13 +1,13 @@ https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62855] trunk/extensions/Storyboard/Storyboard.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62855 Revision: 62855 Author: demon Date: 2010-02-22 22:37:37 + (Mon, 22 Feb 2010) Log Message: --- Fix r62853, can't use wfMsg() there, just copy English description like all other extensions do Modified Paths: -- trunk/extensions/Storyboard/Storyboard.php Modified: trunk/extensions/Storyboard/Storyboard.php === --- trunk/extensions/Storyboard/Storyboard.php 2010-02-22 22:30:28 UTC (rev 62854) +++ trunk/extensions/Storyboard/Storyboard.php 2010-02-22 22:37:37 UTC (rev 62855) @@ -65,7 +65,7 @@ 'version' => Storyboard_VERSION, 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ), 'url' => 'http://www.mediawiki.org/wiki/Extension:Storyboard', - 'description' => wfMsg( 'storyboard-desc' ), + 'description' => 'Provides a landing page for donors, a page where stories can be submitted, and a story moderation interface', 'descriptionmsg' => 'storyboard-desc', ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62854] trunk/extensions/Storyboard/specials/StoryReview/ StoryReview_body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62854 Revision: 62854 Author: demon Date: 2010-02-22 22:30:28 + (Mon, 22 Feb 2010) Log Message: --- Cleanup r62802, r62835 use __METHOD__ for wfProfileIn() calls. Also drop no-op wfLoadExtensionMessages() Modified Paths: -- trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php Modified: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php === --- trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php 2010-02-22 22:23:22 UTC (rev 62853) +++ trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php 2010-02-22 22:30:28 UTC (rev 62854) @@ -17,12 +17,10 @@ public function __construct() { parent::__construct( 'StoryReview' ); - - wfLoadExtensionMessages( 'Storyboard' ); } public function execute( $language ) { - wfProfileIn( 'StoryReview-special-page' ); + wfProfileIn( __METHOD__ ); global $wgUser; if ( $wgUser->isAllowed( 'storyreview' ) && !$wgUser->isBlocked() ) { @@ -34,7 +32,7 @@ $wgOut->permissionRequired( 'storyreview' ); } - wfProfileOut( 'StoryReview-special-page' ); + wfProfileOut( __METHOD__ ); } private function addOutput() { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62853] trunk/extensions/Storyboard/Storyboard.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62853 Revision: 62853 Author: demon Date: 2010-02-22 22:23:22 + (Mon, 22 Feb 2010) Log Message: --- Cleanup to initialization to Storyboard: * Only use one call to ParserFirstCallInit, drop ancient 1.12 and below compat * Take $wgExtensionCredits out of $wgExtensionFunctions, not needed * Group class loading, hooks, etc all together Modified Paths: -- trunk/extensions/Storyboard/Storyboard.php Modified: trunk/extensions/Storyboard/Storyboard.php === --- trunk/extensions/Storyboard/Storyboard.php 2010-02-22 22:17:26 UTC (rev 62852) +++ trunk/extensions/Storyboard/Storyboard.php 2010-02-22 22:23:22 UTC (rev 62853) @@ -33,33 +33,21 @@ // Include the settings file. require_once( $egStoryboardDir . 'Storyboard_Settings.php' ); -// Register the initialization function of Storyboard. -$wgExtensionFunctions[] = 'efStoryboardSetup'; +// Load classes +$wgAutoloadClasses['SpecialStoryReview'] = $egStoryboardDir . 'specials/StoryReview/StoryReview_body.php'; +$wgAutoloadClasses['TagStoryboard'] = $egStoryboardDir . 'tags/Storyboard/Storyboard_body.php'; +$wgAutoloadClasses['TagStorysubmission'] = $egStoryboardDir . 'tags/Storysubmission/Storysubmission_body.php'; // Register the initernationalization and aliasing files of Storyboard. $wgExtensionMessagesFiles['Storyboard'] = $egStoryboardDir . 'Storyboard.i18n.php'; $wgExtensionAliasesFiles['Storyboard'] = $egStoryboardDir . 'Storyboard.alias.php'; // Load and register the StoryReview special page and register it's group. -$wgAutoloadClasses['SpecialStoryReview'] = $egStoryboardDir . 'specials/StoryReview/StoryReview_body.php'; $wgSpecialPages['StoryReview'] = 'SpecialStoryReview'; $wgSpecialPageGroups['StoryReview'] = 'contribution'; -// Load the tag extension classes. -$wgAutoloadClasses['TagStoryboard'] = $egStoryboardDir . 'tags/Storyboard/Storyboard_body.php'; -$wgAutoloadClasses['TagStorysubmission'] = $egStoryboardDir . 'tags/Storysubmission/Storysubmission_body.php'; - -// Register the tag extensions. -// Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980. -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'efStoryboardStoryboardSetup'; - $wgHooks['ParserFirstCallInit'][] = 'efStoryboardStorysubmissionSetup'; -} else { // Otherwise do things the old fashioned way. - $wgExtensionFunctions[] = 'efStoryboardStoryboardSetup'; - $wgExtensionFunctions[] = 'efStoryboardStorysubmissionSetup'; -} - -// Hook for db updates. +// Hooks +$wgHooks['ParserFirstCallInit'][] = 'efStoryboardParserFirstCallInit'; $wgHooks['LoadExtensionSchemaUpdates'][] = 'efStoryboardSchemaUpdate'; /** @@ -71,25 +59,16 @@ $wgAvailableRights[] = 'storyreview'; $wgGroupPermissions['sysop']['storyreview'] = true; -/** - * Initialization function for the Storyboard extension. - */ -function efStoryboardSetup() { - global $wgExtensionCredits; +$wgExtensionCredits['parserhook'][] = array( + 'path' => __FILE__, + 'name' => wfMsg( 'storyboard-name' ), + 'version' => Storyboard_VERSION, + 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ), + 'url' => 'http://www.mediawiki.org/wiki/Extension:Storyboard', + 'description' => wfMsg( 'storyboard-desc' ), + 'descriptionmsg' => 'storyboard-desc', +); - wfLoadExtensionMessages( 'Storyboard' ); - - $wgExtensionCredits['parserhook'][] = array( - 'path' => __FILE__, - 'name' => wfMsg( 'storyboard-name' ), - 'version' => Storyboard_VERSION, - 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ), - 'url' => 'http://www.mediawiki.org/wiki/Extension:Storyboard', - 'description' => wfMsg( 'storyboard-desc' ), - 'descriptionmsg' => 'storyboard-desc', - ); -} - function efStoryboardSchemaUpdate() { global $wgExtNewTables, $egStoryboardDir; @@ -101,14 +80,8 @@ return true; } -function efStoryboardStoryboardSetup() { - global $wgParser; - $wgParser->setHook( 'storyboard', array('TagStoryboard', 'render') ); +function efStoryboardParserFirstCallInit( &$parser ) { + $parser->setHook( 'storyboard', array('TagStoryboard', 'render') ); + $parser->setHook( 'storysubmission', array('TagStorysubmission', 'render') ); return true; } - -function efStoryboardStorysubmissionSetup() { - global $wgParser; - $wgParser->setHook( 'storysubmission', array('TagStorysubmission', 'render') ); -return true; -} ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediaw
[MediaWiki-CVS] SVN: [62852] trunk/WikiWord/WikiWord/src/main/php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62852 Revision: 62852 Author: daniel Date: 2010-02-22 22:17:26 + (Mon, 22 Feb 2010) Log Message: --- concept info cache queries Modified Paths: -- trunk/WikiWord/WikiWord/src/main/php/concept-info.sql trunk/WikiWord/WikiWord/src/main/php/wwthesaurus.php Added Paths: --- trunk/WikiWord/WikiWord/src/main/php/build-concept-info.sh trunk/WikiWord/WikiWord/src/main/php/concept-info-local.sql Added: trunk/WikiWord/WikiWord/src/main/php/build-concept-info.sh === --- trunk/WikiWord/WikiWord/src/main/php/build-concept-info.sh (rev 0) +++ trunk/WikiWord/WikiWord/src/main/php/build-concept-info.sh 2010-02-22 22:17:26 UTC (rev 62852) @@ -0,0 +1,15 @@ +#!/bin/bash +set -e + +db="$1" +collection="$2" +thesaurus="$3" +languages="en de fr nl it es pt pl" + +echo "preparing concept info" +replace '{collection}' "$collection" '{thesaurus}' "$thesaurus" < concept-info.sql | mysql "$db" + +for n in $languages; do +echo "collection concept info: $n" +replace '{collection}' "$collection" '{thesaurus}' "$thesaurus" '{lang}' "$n" < concept-info-local.sql | mysql "$db" +done Copied: trunk/WikiWord/WikiWord/src/main/php/concept-info-local.sql (from rev 62699, trunk/WikiWord/WikiWord/src/main/php/concept-info.sql) === --- trunk/WikiWord/WikiWord/src/main/php/concept-info-local.sql (rev 0) +++ trunk/WikiWord/WikiWord/src/main/php/concept-info-local.sql 2010-02-22 22:17:26 UTC (rev 62852) @@ -0,0 +1,57 @@ +SET SESSION group_concat_max_len = 262144; -- 1024*256 + +-- collect definitions +update {collection}_{thesaurus}_concept_info as I +join {collection}_{thesaurus}_origin as O on I.lang = O.lang and I.concept = O.global_concept +join {collection}_{lang}_definition as D on O.local_concept = D.concept and O.lang = "{lang}" +set I.definition = D.definition +where I.lang = "{lang}"; + +-- collect wiki pages +update {collection}_{thesaurus}_concept_info as I +join ( select O.global_concept as concept, O.lang as lang, + group_concat( concat(R.type, ":", R.name) separator "|" ) as pages + from {collection}_{thesaurus}_origin as O + join {collection}_{lang}_about as A on A.concept = O.local_concept and O.lang = "{lang}" + join {collection}_{lang}_resource as R on R.id = A.resource + where O.lang = "{lang}" and R.type IN (10, 50) + group by O.global_concept, O.lang +) as X +on I.concept = X.concept and I.lang = X.lang +set I.pages = X.pages +where I.lang = "{lang}"; + +-- collect broader concepts +update {collection}_{thesaurus}_concept_info as I +join ( select narrow as concept, group_concat(concat(broad, ":", local_concept_name) separator "|") as broader from {collection}_{thesaurus}_broader + join {collection}_{thesaurus}_origin as O on O.global_concept = broad and O.lang = "{lang}" + group by narrow ) as X +on X.concept = I.concept and I.lang = "{lang}" +set I.broader = X.broader; + +-- collect narrower concepts +update {collection}_{thesaurus}_concept_info as I +join ( select broad as concept, group_concat(concat(narrow, ":", local_concept_name) separator "|") as narrower from {collection}_{thesaurus}_broader + join {collection}_{thesaurus}_origin as O on O.global_concept = narrow and O.lang = "{lang}" + group by broad ) as X +on X.concept = I.concept and I.lang = "{lang}" +set I.narrower = X.narrower; + +-- collect similar concepts +update {collection}_{thesaurus}_concept_info as I +join ( select concept1 as concept, group_concat(concat(concept2, ":", local_concept_name) separator "|") as similar from {collection}_{thesaurus}_relation + join {collection}_{thesaurus}_origin as O on O.global_concept = concept2 and O.lang = "{lang}" + where langmatch >= 1 or langref >= 1 + group by concept1 ) as X +on X.concept = I.concept and I.lang = "{lang}" +set I.similar = X.similar; + +-- collect related concepts +update {collection}_{thesaurus}_concept_info as I +join ( select concept1 as concept, group_concat(concat(concept2, ":", local_concept_name) separator "|") as related from {collection}_{thesaurus}_relation + join {collection}_{thesaurus}_origin as O on O.global_concept = concept2 and O.lang = "{lang}" + where bilink >= 1 + group by concept1 ) as X +on X.concept = I.concept and I.lang = "{lang}" +set I.related = X.related; + Property changes on: trunk/WikiWord/WikiWord/src/main/php/concept-info-local.sql ___ Added: svn:mergeinfo + Modified: trunk/WikiWord/WikiWord/src/main/php/concept-info.sql === --- trunk/WikiWord/WikiWord/src/main/php/concept-info.sql 2010-02-22 22:09:10 UTC (
[MediaWiki-CVS] SVN: [62851] trunk/extensions/AssertEdit/AssertEditApi.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62851 Revision: 62851 Author: reedy Date: 2010-02-22 22:09:10 + (Mon, 22 Feb 2010) Log Message: --- Followup to r62840 svn:keywords=Id Modified Paths: -- trunk/extensions/AssertEdit/AssertEditApi.php Property Changed: trunk/extensions/AssertEdit/AssertEditApi.php Modified: trunk/extensions/AssertEdit/AssertEditApi.php === --- trunk/extensions/AssertEdit/AssertEditApi.php 2010-02-22 21:49:36 UTC (rev 62850) +++ trunk/extensions/AssertEdit/AssertEditApi.php 2010-02-22 22:09:10 UTC (rev 62851) @@ -53,6 +53,6 @@ } public function getVersion() { - return __CLASS__ . ': $Id: $'; + return __CLASS__ . ': $Id$'; } } Property changes on: trunk/extensions/AssertEdit/AssertEditApi.php ___ Added: svn:keywords + Id ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62850] trunk/extensions/Storyboard/tags/Storyboard
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62850 Revision: 62850 Author: jeroendedauw Date: 2010-02-22 21:49:36 + (Mon, 22 Feb 2010) Log Message: --- File name case fixes Added Paths: --- trunk/extensions/Storyboard/tags/Storyboard/storyboard.css trunk/extensions/Storyboard/tags/Storyboard/storyboard.js Added: trunk/extensions/Storyboard/tags/Storyboard/storyboard.css === --- trunk/extensions/Storyboard/tags/Storyboard/storyboard.css (rev 0) +++ trunk/extensions/Storyboard/tags/Storyboard/storyboard.css 2010-02-22 21:49:36 UTC (rev 62850) @@ -0,0 +1,93 @@ +/** + * Storyboard tag css. + * + * @file Storyboard.css + * @ingroup Storyboard + * + * @author Jeroen De Dauw + * @author Tha Devil (helpmij.nl) + */ + +#storyboard +{ + margin-left: 31px; + width: 50%; + height: 300px; + overflow-y: scroll; + overflow-x: hidden; + font-family: Verdana; + font-size: 10px; +} + +#storyboard-results +{ + background: url(extensions/Storyboard/images/storyboard-background.png) repeat-y; +} + +.storyboard-result +{ + padding-bottom: 6px; + background: url(extensions/Storyboard/images/storyboard-result-spacer.png) no-repeat bottom; +} + +.storyboard-result .storyboard-header +{ + margin: 10px 0px 10px 15px; +} + +.storyboard-result .storyboard-header .storyboard-title +{ + font: 16px "Lucida Sans", Verdana; + font-weight: bold; + width: 100px; + height: 21px; + overflow: hidden; + float: left; +} + +.storyboard-result +{ + margin-left: 12px; + margin-right: 15px; +} + +.storyboard-result +{ + float: left; + width: 146px; + height: 112px; + margin-left: 3px; + margin-right: 3px; + margin-top: 10px; + overflow: hidden; + text-align: center; +} + +.storyboard-result +{ + display: none; +} + +#storyboard-loading +{ + background-image: url(extensions/Storyboard/images/storyboard-loader.gif); + width:31px; + height:31px; + margin:0 auto; + margin-top: 10px; +} + +.storyboard-footer +{ + height: 40px; + padding-top: 20px; + margin-left: 15px; +} + +.storyboard-sharing +{ + margin-left: 750px; + height: 30px; + width: 110px; + float: left; +} Property changes on: trunk/extensions/Storyboard/tags/Storyboard/storyboard.css ___ Added: svn:eol-style + native Added: trunk/extensions/Storyboard/tags/Storyboard/storyboard.js === --- trunk/extensions/Storyboard/tags/Storyboard/storyboard.js (rev 0) +++ trunk/extensions/Storyboard/tags/Storyboard/storyboard.js 2010-02-22 21:49:36 UTC (rev 62850) @@ -0,0 +1,87 @@ + /** + * Storyboard object. + * + * @file Storyboard.js + * @ingroup Storyboard + * + * @author Jeroen De Dauw + * @author Tha Devil (helpmij.nl) + */ + +/** + * Constructor for the Storyboard object. + */ +function Storyboard() { + this.stories = []; + + this.pageNumber = 0; + this.pageAmount = -1; + + this.isLoading = false; +} + +/** + * Scroll method. + * Checks if new stories should be loaded, and calls loadAjax when this is the case. + */ +Storyboard.prototype.scroll = function(event) { + var board = event.data[0]; + var documentHeight = jQuery(document).height(); + var top = jQuery("#storyboard").scrollTop(); + + var resultsHeight = 0; + jQuery("#storyboard .storyboard-result").each(function() { + resultsHeight += $(this).height(); + }); + + var threshold = ( ( top / 2 ) + ( 0.01 * Math.pow(documentHeight, 2) ) ) / resultsHeight; + if (threshold > 0.6) threshold = 0.6; + + if( top / resultsHeight >= threshold && !board.isLoading && board.pageNumber < board.pageAmount ) + { + board.loadAjax(); + } +}; + +/** + * LoadAjax method. + * Requests and loads new stories into the storyboard. + */ +Storyboard.prototype.loadAjax = function() { + alert('load'); + var t = this; + + this.isLoading = true; + + jQuery("#storyboard").append(jQuery("").attr("id","storyboard-loading")); + + jQuery.getJSON(storyboardPath + '/tags/Storyboard/Stories.php?&number=' + t.currentPage + '', function(json) { + + t.pageAmount = json.pageAmount; + t.stories.push(json); + t.isLoading = false; + + jQuery("#storyboard-loading").remove(); + + t.display(); + }); +}; + +/** + * Display method. + * Creates the storyboard layout. + */ +Storyboard.prototype.display = function() { + alert('display');
[MediaWiki-CVS] SVN: [62849] trunk/extensions/Storyboard
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62849 Revision: 62849 Author: jeroendedauw Date: 2010-02-22 21:48:11 + (Mon, 22 Feb 2010) Log Message: --- File name case fixes Modified Paths: -- trunk/extensions/Storyboard/tags/Storyboard/Storyboard_body.php Added Paths: --- trunk/extensions/Storyboard/images/storyboard-background.png trunk/extensions/Storyboard/images/storyboard-delicious.png trunk/extensions/Storyboard/images/storyboard-facebook.png trunk/extensions/Storyboard/images/storyboard-loader.gif trunk/extensions/Storyboard/images/storyboard-result-spacer.png trunk/extensions/Storyboard/images/storyboard-twitter.png Removed Paths: - trunk/extensions/Storyboard/images/Background.png trunk/extensions/Storyboard/images/Delicious.png trunk/extensions/Storyboard/images/Facebook.png trunk/extensions/Storyboard/images/Twitter.png trunk/extensions/Storyboard/images/ajax_loader.gif trunk/extensions/Storyboard/images/spacer_result.png trunk/extensions/Storyboard/tags/Storyboard/Storyboard.css trunk/extensions/Storyboard/tags/Storyboard/Storyboard.js Deleted: trunk/extensions/Storyboard/images/Background.png === (Binary files differ) Deleted: trunk/extensions/Storyboard/images/Delicious.png === (Binary files differ) Deleted: trunk/extensions/Storyboard/images/Facebook.png === (Binary files differ) Deleted: trunk/extensions/Storyboard/images/Twitter.png === (Binary files differ) Deleted: trunk/extensions/Storyboard/images/ajax_loader.gif === (Binary files differ) Deleted: trunk/extensions/Storyboard/images/spacer_result.png === (Binary files differ) Added: trunk/extensions/Storyboard/images/storyboard-background.png === (Binary files differ) Property changes on: trunk/extensions/Storyboard/images/storyboard-background.png ___ Added: svn:mime-type + image/png Added: trunk/extensions/Storyboard/images/storyboard-delicious.png === (Binary files differ) Property changes on: trunk/extensions/Storyboard/images/storyboard-delicious.png ___ Added: svn:mime-type + image/png Added: trunk/extensions/Storyboard/images/storyboard-facebook.png === (Binary files differ) Property changes on: trunk/extensions/Storyboard/images/storyboard-facebook.png ___ Added: svn:mime-type + image/png Added: trunk/extensions/Storyboard/images/storyboard-loader.gif === (Binary files differ) Property changes on: trunk/extensions/Storyboard/images/storyboard-loader.gif ___ Added: svn:mime-type + application/octet-stream Added: trunk/extensions/Storyboard/images/storyboard-result-spacer.png === (Binary files differ) Property changes on: trunk/extensions/Storyboard/images/storyboard-result-spacer.png ___ Added: svn:mime-type + image/png Added: trunk/extensions/Storyboard/images/storyboard-twitter.png === (Binary files differ) Property changes on: trunk/extensions/Storyboard/images/storyboard-twitter.png ___ Added: svn:mime-type + image/png Deleted: trunk/extensions/Storyboard/tags/Storyboard/Storyboard.css === --- trunk/extensions/Storyboard/tags/Storyboard/Storyboard.css 2010-02-22 21:38:39 UTC (rev 62848) +++ trunk/extensions/Storyboard/tags/Storyboard/Storyboard.css 2010-02-22 21:48:11 UTC (rev 62849) @@ -1,93 +0,0 @@ -/** - * Storyboard tag css. - * - * @file Storyboard.css - * @ingroup Storyboard - * - * @author Jeroen De Dauw - * @author Tha Devil (helpmij.nl) - */ - -#storyboard -{ - margin-left: 31px; - width: 50%; - height: 300px; - overflow-y: scroll; - overflow-x: hidden; - font-family: Verdana; - font-size: 10px; -} - -#storyboard-results -{ - background: url(extensions/Storyboard/images/Background.png) repeat-y; -} - -
[MediaWiki-CVS] SVN: [62848] trunk/extensions/UsabilityInitiative
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62848 Revision: 62848 Author: adam Date: 2010-02-22 21:38:39 + (Mon, 22 Feb 2010) Log Message: --- WikiEditor templateEditor: Followup to r62839. Forgot the importance of the mousedown handler on the template name Modified Paths: -- trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js trunk/extensions/UsabilityInitiative/js/plugins.combined.js trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js Modified: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php === --- trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php 2010-02-22 21:37:11 UTC (rev 62847) +++ trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php 2010-02-22 21:38:39 UTC (rev 62848) @@ -78,14 +78,14 @@ array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 18 ), array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 93 ), array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ), - array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 23 ), + array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 24 ), array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ), ), 'combined' => array( - array( 'src' => 'js/plugins.combined.js', 'version' => 275 ), + array( 'src' => 'js/plugins.combined.js', 'version' => 276 ), ), 'minified' => array( - array( 'src' => 'js/plugins.combined.min.js', 'version' => 275 ), + array( 'src' => 'js/plugins.combined.min.js', 'version' => 276 ), ), ), ); Modified: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js === --- trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js 2010-02-22 21:37:11 UTC (rev 62847) +++ trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js 2010-02-22 21:38:39 UTC (rev 62848) @@ -140,6 +140,7 @@ var $templateName = $( '' ) .addClass( 'wikiEditor-template-name wikiEditor-noinclude' ) .text( model.getName() ) + .mousedown( toggleWikiTextEditor ) .prependTo( $template ); var $templateExpand = $( '' ) Modified: trunk/extensions/UsabilityInitiative/js/plugins.combined.js === --- trunk/extensions/UsabilityInitiative/js/plugins.combined.js 2010-02-22 21:37:11 UTC (rev 62847) +++ trunk/extensions/UsabilityInitiative/js/plugins.combined.js 2010-02-22 21:38:39 UTC (rev 62848) @@ -9078,6 +9078,7 @@ var $templateName = $( '' ) .addClass( 'wikiEditor-template-name wikiEditor-noinclude' ) .text( model.getName() ) + .mousedown( toggleWikiTextEditor ) .prependTo( $template ); var $templateExpand = $( '' ) Modified: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js === --- trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js 2010-02-22 21:37:11 UTC (rev 62847) +++ trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js 2010-02-22 21:38:39 UTC (rev 62848) @@ -627,7 +627,7 @@ if(tokenIndex').addClass('wikiEditor-template-text wikiEditor-nodisplay').parent().addClass('wikiEditor-template-collapsed').data('model',model);var $templateName=$('').addClass('wikiEditor-template-name wikiEditor-noinclude').text(model.getName()).prependTo($template);var $templateExpand=$('').addClass('wikiEditor-template-expand wikiEditor-noinclude').append('').append('').mousedown(toggleWikiTextEditor).prependTo($template);var $templateDialog=$('').addClass('wikiEditor-template-dialog wikiEditor-noinclude').append('').append('').mousedown(function(){createDialog($template);return false;}).insertAfter($templateName);$(this).data('setupDone',true);function toggleWikiTextEditor(){var $template=$(this).closest('.wikiEditor-tem
[MediaWiki-CVS] SVN: [62847] trunk/extensions/Storyboard
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62847 Revision: 62847 Author: jeroendedauw Date: 2010-02-22 21:37:11 + (Mon, 22 Feb 2010) Log Message: --- File name case fix Added Paths: --- trunk/extensions/Storyboard/storyboard.pg.sql trunk/extensions/Storyboard/storyboard.sql Added: trunk/extensions/Storyboard/storyboard.pg.sql === --- trunk/extensions/Storyboard/storyboard.pg.sql (rev 0) +++ trunk/extensions/Storyboard/storyboard.pg.sql 2010-02-22 21:37:11 UTC (rev 62847) @@ -0,0 +1,18 @@ +-- Postgres version of the database schema for the Storyboard extension. + +BEGIN; + +CREATE SEQUENCE story_id_seq; + +CREATE TABLE `storyboard` ( + story_id INTEGER PRIMARY KEY DEFAULT nextval('story_id_seq'), + story_author_idINTEGER NULL, + story_author_name TEXT NULL, + story_hit_countINTEGER NOT NULL, + story_titleTEXT NOT NULL, + story_text TEXT NULL, + story_modified TIMESTAMPTZ NULL DEFAULT now(), + story_created TIMESTAMPTZ NULL DEFAULT now(), +); + +COMMIT; \ No newline at end of file Property changes on: trunk/extensions/Storyboard/storyboard.pg.sql ___ Added: svn:eol-style + native Added: trunk/extensions/Storyboard/storyboard.sql === --- trunk/extensions/Storyboard/storyboard.sql (rev 0) +++ trunk/extensions/Storyboard/storyboard.sql 2010-02-22 21:37:11 UTC (rev 62847) @@ -0,0 +1,14 @@ +-- MySQL version of the database schema for the Storyboard extension. + +CREATE TABLE /*$wgDBprefix*/storyboard ( + story_id INT(8) unsigned NOT NULL auto_increment PRIMARY KEY, + story_author_idINT unsigned NULL, + story_author_name VARCHAR(255) NULL, + story_hit_countINT(8) unsigned NOT NULL, + story_titleVARCHAR(255) NOT NULL, + story_text MEDIUMBLOBNULL, + story_modified CHAR(14) binary NOT NULL default '', + story_created CHAR(14) binary NOT NULL default '', + story_is_published TINYINT NOT NULL default '0', + story_is_hiddenTINYINT NOT NULL default '0' +) /*$wgDBTableOptions*/; \ No newline at end of file Property changes on: trunk/extensions/Storyboard/storyboard.sql ___ Added: svn:eol-style + native ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62846] trunk/extensions/Storyboard
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62846 Revision: 62846 Author: jeroendedauw Date: 2010-02-22 21:34:21 + (Mon, 22 Feb 2010) Log Message: --- File name case fix Modified Paths: -- trunk/extensions/Storyboard/Storyboard.php Removed Paths: - trunk/extensions/Storyboard/Storyboard.pg.sql trunk/extensions/Storyboard/Storyboard.sql Deleted: trunk/extensions/Storyboard/Storyboard.pg.sql === --- trunk/extensions/Storyboard/Storyboard.pg.sql 2010-02-22 21:34:19 UTC (rev 62845) +++ trunk/extensions/Storyboard/Storyboard.pg.sql 2010-02-22 21:34:21 UTC (rev 62846) @@ -1,18 +0,0 @@ --- Postgres version of the database schema for the Storyboard extension. - -BEGIN; - -CREATE SEQUENCE story_id_seq; - -CREATE TABLE `storyboard` ( - story_id INTEGER PRIMARY KEY DEFAULT nextval('story_id_seq'), - story_author_idINTEGER NULL, - story_author_name TEXT NULL, - story_hit_countINTEGER NOT NULL, - story_titleTEXT NOT NULL, - story_text TEXT NULL, - story_modified TIMESTAMPTZ NULL DEFAULT now(), - story_created TIMESTAMPTZ NULL DEFAULT now(), -); - -COMMIT; \ No newline at end of file Modified: trunk/extensions/Storyboard/Storyboard.php === --- trunk/extensions/Storyboard/Storyboard.php 2010-02-22 21:34:19 UTC (rev 62845) +++ trunk/extensions/Storyboard/Storyboard.php 2010-02-22 21:34:21 UTC (rev 62846) @@ -95,7 +95,7 @@ $wgExtNewTables[] = array( 'storyboard', - $egStoryboardDir . 'Storyboard.sql' + $egStoryboardDir . 'storyboard.sql' ); return true; Deleted: trunk/extensions/Storyboard/Storyboard.sql === --- trunk/extensions/Storyboard/Storyboard.sql 2010-02-22 21:34:19 UTC (rev 62845) +++ trunk/extensions/Storyboard/Storyboard.sql 2010-02-22 21:34:21 UTC (rev 62846) @@ -1,14 +0,0 @@ --- MySQL version of the database schema for the Storyboard extension. - -CREATE TABLE /*$wgDBprefix*/storyboard ( - story_id INT(8) unsigned NOT NULL auto_increment PRIMARY KEY, - story_author_idINT unsigned NULL, - story_author_name VARCHAR(255) NULL, - story_hit_countINT(8) unsigned NOT NULL, - story_titleVARCHAR(255) NOT NULL, - story_text MEDIUMBLOBNULL, - story_modified CHAR(14) binary NOT NULL default '', - story_created CHAR(14) binary NOT NULL default '', - story_is_published TINYINT NOT NULL default '0', - story_is_hiddenTINYINT NOT NULL default '0' -) /*$wgDBTableOptions*/; \ No newline at end of file ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62845] trunk/phase3/languages
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62845 Revision: 62845 Author: ialex Date: 2010-02-22 21:34:19 + (Mon, 22 Feb 2010) Log Message: --- Fixed some doxygen warnings Modified Paths: -- trunk/phase3/languages/Language.php trunk/phase3/languages/LanguageConverter.php Modified: trunk/phase3/languages/Language.php === --- trunk/phase3/languages/Language.php 2010-02-22 21:31:00 UTC (rev 62844) +++ trunk/phase3/languages/Language.php 2010-02-22 21:34:19 UTC (rev 62845) @@ -1198,8 +1198,9 @@ * http://en.wikipedia.org/wiki/Minguo_calendar * http://en.wikipedia.org/wiki/Japanese_era_name * -* @param $ts String: 14-character timestamp, calender name -* @return array converted year, month, day +* @param $ts String: 14-character timestamp +* @param $cName String: calender name +* @return Array: converted year, month, day */ private static function tsToYear( $ts, $cName ) { $gy = substr( $ts, 0, 4 ); @@ -2372,7 +2373,7 @@ * * @param $link String: the name of the link * @param $nt Mixed: the title object of the link -* @param boolean $ignoreOtherCond: to disable other conditions when +* @param $ignoreOtherCond Boolean: to disable other conditions when * we need to transclude a template or update a category's link * @return null the input parameters may be modified upon return */ Modified: trunk/phase3/languages/LanguageConverter.php === --- trunk/phase3/languages/LanguageConverter.php2010-02-22 21:31:00 UTC (rev 62844) +++ trunk/phase3/languages/LanguageConverter.php2010-02-22 21:34:19 UTC (rev 62845) @@ -106,12 +106,11 @@ * when zh-sg is preferred but not defined, we will pick zh-hans * in this case. Right now this is only used by zh. * -* @param string $v The language code of the variant +* @param $v String: the language code of the variant * @return string array The code of the fallback language or false if there * is no fallback -* @public */ - function getVariantFallbacks( $v ) { + public function getVariantFallbacks( $v ) { if ( isset( $this->mVariantFallbacks[$v] ) ) { return $this->mVariantFallbacks[$v]; } @@ -120,7 +119,7 @@ /** * Get the title produced by the conversion rule. -* @returns string +* @returns String */ function getConvRuleTitle() { return $this->mConvRuleTitle; @@ -128,12 +127,11 @@ /** * Get preferred language variants. -* @param boolean $fromUser Get it from $wgUser's preferences -* @param boolean $fromHeader Get it from Accept-Language -* @return string the preferred language code -* @public +* @param $fromUser Boolean: get it from $wgUser's preferences +* @param $fromHeader Boolean: get it from Accept-Language +* @return String: the preferred language code */ - function getPreferredVariant( $fromUser = true, $fromHeader = false ) { + public function getPreferredVariant( $fromUser = true, $fromHeader = false ) { global $wgDefaultLanguageVariant; $req = $this->getURLVariant(); @@ -162,8 +160,8 @@ /** * Validate the variant -* @param string $v the variant to validate -* @returns mixed returns the variant if it is valid, null otherwise +* @param $v String: the variant to validate +* @return Mixed: returns the variant if it is valid, null otherwise */ function validateVariant( $v = null ) { if ( $v !== null && in_array( $v, $this->mVariants ) ) { @@ -175,7 +173,7 @@ /** * Get the variant specified in the URL * -* @returns mixed variant if one found, false otherwise. +* @return Mixed: variant if one found, false otherwise. */ function getURLVariant() { global $wgRequest; @@ -198,7 +196,7 @@ /** * Determine if the user has a variant set. * -* @returns mixed variant if one found, false otherwise. +* @return Mixed: variant if one found, false otherwise. */ function getUserVariant() { global $wgUser; @@ -228,7 +226,7 @@ /** * Determine the language variant from the Accept-Language header. * -* @returns mixed variant if one found, false otherwise. +* @return Mixed: variant if one found, false otherwise. */ function getHeaderVariant() { global $wgRequest; @@
[MediaWiki-CVS] SVN: [62844] trunk/extensions/Storyboard/specials/StoryReview/ StoryReview_body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62844 Revision: 62844 Author: jeroendedauw Date: 2010-02-22 21:31:00 + (Mon, 22 Feb 2010) Log Message: --- Coding conventions fixes Modified Paths: -- trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php Modified: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php === --- trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php 2010-02-22 21:25:55 UTC (rev 62843) +++ trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php 2010-02-22 21:31:00 UTC (rev 62844) @@ -22,7 +22,7 @@ } public function execute( $language ) { - wfProfileIn('StoryReview-special-page'); + wfProfileIn( 'StoryReview-special-page' ); global $wgUser; if ( $wgUser->isAllowed( 'storyreview' ) && !$wgUser->isBlocked() ) { @@ -34,13 +34,13 @@ $wgOut->permissionRequired( 'storyreview' ); } - wfProfileOut('StoryReview-special-page'); + wfProfileOut( 'StoryReview-special-page' ); } private function addOutput() { global $wgOut; - $wgOut->setPageTitle(wfMsg('storyboard-storyreview')); + $wgOut->setPageTitle( wfMsg( 'storyboard-storyreview' ) ); $wgOut->includeJQuery(); @@ -57,7 +57,7 @@ 'story_text', 'story_is_published' ), - 'story_is_hidden = 0' + array( 'story_is_hidden' => 0 ) ); // Arrays to hold the html segments for both the unreviewed and reviewed stories. @@ -65,28 +65,28 @@ $reviewed = array(); // Loop through all stories, get their html segments, and store in the appropriate array. - while ($story = $dbr->fetchObject($stories)) { - if ($story->story_is_published) { - $reviewed = array_merge($reviewed, $this->getStorySegments($story)); + while ( $story = $dbr->fetchObject( $stories ) ) { + if ( $story->story_is_published ) { + $reviewed = array_merge( $reviewed, $this->getStorySegments( $story ) ); } else { - $unreviewed = array_merge($unreviewed, $this->getStorySegments($story)); + $unreviewed = array_merge( $unreviewed, $this->getStorySegments( $story ) ); } } // Create the page layout, and add the stories. $htmlSegments = array(); - $htmlSegments[] = '' . wfMsg('storyboard-unreviewed') . ''; + $htmlSegments[] = '' . wfMsg( 'storyboard-unreviewed' ) . ''; $htmlSegments[] = ''; - $htmlSegments = array_merge($htmlSegments, $unreviewed); + $htmlSegments = array_merge( $htmlSegments, $unreviewed ); $htmlSegments[] = ''; - $htmlSegments[] = '' . wfMsg('storyboard-reviewed') . ''; + $htmlSegments[] = '' . wfMsg( 'storyboard-reviewed' ) . ''; $htmlSegments[] = ''; - $htmlSegments = array_merge($htmlSegments, $reviewed); + $htmlSegments = array_merge( $htmlSegments, $reviewed ); $htmlSegments[] = ''; // Join all the html segments and add the resulting string to the page. - $wgOut->addHTML(implode('', $htmlSegments)); + $wgOut->addHTML( implode( '', $htmlSegments ) ); } /** @@ -97,21 +97,21 @@ * @param $story * @return array */ - private function getStorySegments($story) { + private function getStorySegments( $story ) { $segments = array(); $segments[] = ''; $segments[] = 'http://upload.wikimedia.org/wikipedia/mediawiki/9/99/SemanticMaps.png";>'; // TODO: get cropped image here $segments[] = ''; - $segments[] = htmlspecialchars($story->story_title); + $segments[] = htmlspecialchars( $story->story_title ); $segments[] = ''; - $segments[] = htmlspecialchars($story->story_text); + $segments[] = htmlspecialchars( $story->story_text ); $segments[] = ''; $segments[] = ''; // TODO: figure out how to best update db info (page submit with form or onclick with ajax call?) -
[MediaWiki-CVS] SVN: [62843] USERINFO/russblau
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62843 Revision: 62843 Author: russblau Date: 2010-02-22 21:25:55 + (Mon, 22 Feb 2010) Log Message: --- Updating userinfo file Modified Paths: -- USERINFO/russblau Modified: USERINFO/russblau === --- USERINFO/russblau 2010-02-22 21:21:43 UTC (rev 62842) +++ USERINFO/russblau 2010-02-22 21:25:55 UTC (rev 62843) @@ -1 +1,4 @@ name: Russell Blau +email: russb...@hotmail.com +url: + ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62842] trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62842 Revision: 62842 Author: jeroendedauw Date: 2010-02-22 21:21:43 + (Mon, 22 Feb 2010) Log Message: --- << <
[MediaWiki-CVS] SVN: [62841] trunk/extensions/Maps
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62841 Revision: 62841 Author: jeroendedauw Date: 2010-02-22 21:21:35 + (Mon, 22 Feb 2010) Log Message: --- << <output, $this->mapName, $this->overlays, $this->controls); - $this->output .=<
[MediaWiki-CVS] SVN: [62840] trunk/extensions/AssertEdit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62840 Revision: 62840 Author: reedy Date: 2010-02-22 20:54:39 + (Mon, 22 Feb 2010) Log Message: --- Add a simple Api Module to display the possible parameters (ie an API help) for AssertEdit Useful for users to tell whether it's enabled on the the target wiki Modified Paths: -- trunk/extensions/AssertEdit/AssertEdit.php Added Paths: --- trunk/extensions/AssertEdit/AssertEditApi.php Modified: trunk/extensions/AssertEdit/AssertEdit.php === --- trunk/extensions/AssertEdit/AssertEdit.php 2010-02-22 20:37:35 UTC (rev 62839) +++ trunk/extensions/AssertEdit/AssertEdit.php 2010-02-22 20:54:39 UTC (rev 62840) @@ -32,6 +32,9 @@ $wgHooks['AlternateEdit'][] = 'efAssertEditHook'; $wgHooks['APIEditBeforeSave'][] = 'efAssertApiEditHook'; +$wgAutoloadClasses['AssertEditApi'] = $dir . "AssertEditApi.php"; +$wgAPIModules['assertedit'] = 'AssertEditApi'; + function efAssertEditHook( $editpage ) { global $wgOut, $wgRequest; Added: trunk/extensions/AssertEdit/AssertEditApi.php === --- trunk/extensions/AssertEdit/AssertEditApi.php (rev 0) +++ trunk/extensions/AssertEdit/AssertEditApi.php 2010-02-22 20:54:39 UTC (rev 62840) @@ -0,0 +1,58 @@ +dieUsage( '', 'assertedit' ); + } + + public function getDescription() { + return 'Allows bots to make assertions. Can only be used during of editing'; + } + + public function isReadMode() { + return false; + } + + public function shouldCheckMaxlag() { + return false; + } + + public function getParamDescription() { + return array( + 'user' => 'Verify that bot is logged in, to prevent anonymous edits.', + 'bot' => 'Verify that bot is logged in and has a bot flag.', + 'true' => 'Always true; nassert=true will fail if the extension is installed.', + 'false' => 'Always false; assert=false will fail if the extension is installed.', + 'exists' => 'Verify that page exists. Could be useful from other extensions, i.e. adding nassert=exists to the inputbox extension.', + 'test' => 'Verify that this wiki allows random testing. Defaults to false, but can be overridden in LocalSettings.php.' + ); + } + + public function getPossibleErrors() { + return array(); + } + + public function getAllowedParams() { + return array( + 'user' => null, + 'bot' => null, + 'true' => null, + 'false' => null, + 'exists' => null, + 'test' => null + ); + } + + public function getVersion() { + return __CLASS__ . ': $Id: $'; + } +} Property changes on: trunk/extensions/AssertEdit/AssertEditApi.php ___ Added: svn:eol-style + native ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62839] trunk/extensions/UsabilityInitiative
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62839 Revision: 62839 Author: adam Date: 2010-02-22 20:37:35 + (Mon, 22 Feb 2010) Log Message: --- WikiEditor Template Editor: adding some style Modified Paths: -- trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/expand.png trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.html trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js trunk/extensions/UsabilityInitiative/js/plugins.combined.js trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js Added Paths: --- trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/collapse.png trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/dialog-collapsed.png trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/dialog-expanded.png trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/name-bg.png Modified: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php === --- trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php 2010-02-22 20:27:06 UTC (rev 62838) +++ trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php 2010-02-22 20:37:35 UTC (rev 62839) @@ -78,14 +78,14 @@ array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 18 ), array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 93 ), array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ), - array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 22 ), + array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 23 ), array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ), ), 'combined' => array( - array( 'src' => 'js/plugins.combined.js', 'version' => 274 ), + array( 'src' => 'js/plugins.combined.js', 'version' => 275 ), ), 'minified' => array( - array( 'src' => 'js/plugins.combined.min.js', 'version' => 274 ), + array( 'src' => 'js/plugins.combined.min.js', 'version' => 275 ), ), ), ); Added: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/collapse.png === (Binary files differ) Property changes on: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/collapse.png ___ Added: svn:mime-type + application/octet-stream Added: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/dialog-collapsed.png === (Binary files differ) Property changes on: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/dialog-collapsed.png ___ Added: svn:mime-type + application/octet-stream Added: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/dialog-expanded.png === (Binary files differ) Property changes on: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/dialog-expanded.png ___ Added: svn:mime-type + application/octet-stream Modified: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/expand.png === (Binary files differ) Added: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/name-bg.png === (Binary files differ) Property changes on: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/name-bg.png ___ Added: svn:mime-type + application/octet-stream Modified: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.html === --- trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.html 2010-02-22 20:27:06 UTC (rev 62838) +++ trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.html 2010-02-22 20:37:35 UTC (rev 62839) @@ -45,29 +45,27 @@
[MediaWiki-CVS] SVN: [62838] trunk/phase3/includes/api/ApiExpandTemplates.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62838 Revision: 62838 Author: ashley Date: 2010-02-22 20:27:06 + (Mon, 22 Feb 2010) Log Message: --- ApiExpandTemplates.php: fix copyright symbol, coding style tweaks, more braces Modified Paths: -- trunk/phase3/includes/api/ApiExpandTemplates.php Modified: trunk/phase3/includes/api/ApiExpandTemplates.php === --- trunk/phase3/includes/api/ApiExpandTemplates.php2010-02-22 20:24:42 UTC (rev 62837) +++ trunk/phase3/includes/api/ApiExpandTemplates.php2010-02-22 20:27:06 UTC (rev 62838) @@ -1,11 +1,11 @@ @gmail.com + * Copyright © 2007 Yuri Astrakhan @gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { // Eclipse helper - will be ignored in production - require_once ( "ApiBase.php" ); + require_once( "ApiBase.php" ); } /** @@ -38,7 +38,7 @@ class ApiExpandTemplates extends ApiBase { public function __construct( $main, $action ) { - parent :: __construct( $main, $action ); + parent::__construct( $main, $action ); } public function execute() { @@ -46,18 +46,18 @@ $params = $this->extractRequestParams(); // Create title for parser - $title_obj = Title :: newFromText( $params['title'] ); - if ( !$title_obj ) - $title_obj = Title :: newFromText( "API" ); // default + $title_obj = Title::newFromText( $params['title'] ); + if ( !$title_obj ) { + $title_obj = Title::newFromText( 'API' ); // default + } $result = $this->getResult(); // Parse text global $wgParser; $options = new ParserOptions(); - - if ( $params['generatexml'] ) - { + + if ( $params['generatexml'] ) { $wgParser->startExternalParse( $title_obj, $options, OT_PREPROCESS ); $dom = $wgParser->preprocessToDom( $params['text'] ); if ( is_callable( array( $dom, 'saveXML' ) ) ) { @@ -78,9 +78,9 @@ } public function getAllowedParams() { - return array ( + return array( 'title' => array( - ApiBase :: PARAM_DFLT => 'API', + ApiBase::PARAM_DFLT => 'API', ), 'text' => null, 'generatexml' => false, @@ -88,7 +88,7 @@ } public function getParamDescription() { - return array ( + return array( 'text' => 'Wikitext to convert', 'title' => 'Title of page', 'generatexml' => 'Generate XML parse tree', @@ -100,7 +100,7 @@ } protected function getExamples() { - return array ( + return array( 'api.php?action=expandtemplates&text={{Project:Sandbox}}' ); } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62836] trunk/extensions
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62836 Revision: 62836 Author: ialex Date: 2010-02-22 20:01:20 + (Mon, 22 Feb 2010) Log Message: --- svn:eol-style native Modified Paths: -- trunk/extensions/EditConflict/tables.src Property Changed: trunk/extensions/EditConflict/COPYING trunk/extensions/EditConflict/INSTALL trunk/extensions/EditConflict/README trunk/extensions/EditConflict/tables.src trunk/extensions/LiquidThreads/jquery/plugins.js trunk/extensions/Wikilog/TODO Property changes on: trunk/extensions/EditConflict/COPYING ___ Added: svn:eol-style + native Property changes on: trunk/extensions/EditConflict/INSTALL ___ Added: svn:eol-style + native Property changes on: trunk/extensions/EditConflict/README ___ Added: svn:eol-style + native Modified: trunk/extensions/EditConflict/tables.src === --- trunk/extensions/EditConflict/tables.src2010-02-22 19:29:30 UTC (rev 62835) +++ trunk/extensions/EditConflict/tables.src2010-02-22 20:01:20 UTC (rev 62836) @@ -1,48 +1,48 @@ - -- make sure exactly same tables are defined in maintenance/tables.sql if you want to use mediawiki config/index.php -CREATE TABLE /*$wgDBprefix*/ec_edit_conflict ( - -- revision id of destination article (also used in UI as unique ID) - -- it is required because the same page can have more than one conflict caused by the same user - ns_user_rev_id int unsigned NOT NULL, - - -- A source page which content was copied - page_namespace int NOT NULL, - -- The rest of the title, as text. - -- Spaces are transformed into underscores in title storage. - page_title varchar(255) binary NOT NULL, - - -- Timestamp of destination revision - page_touched binary(14) NOT NULL default '', - - -- user whose editing has caused an conflict - user_name varchar(255) binary NOT NULL default '', - - PRIMARY KEY ns_user_rev_id (ns_user_rev_id), - INDEX page (page_namespace, page_title), - INDEX page_touched (page_touched), - INDEX user_name (user_name) -) /*$wgDBTableOptions*/; - -CREATE TABLE /*$wgDBprefix*/ec_current_edits ( - -- unique edit id for ajax operations - edit_id int unsigned NOT NULL auto_increment, - -- edited page namespace - page_namespace int NOT NULL, - -- The rest of the title, as text. - -- Spaces are transformed into underscores in title storage. - page_title varchar(255) binary NOT NULL, - - -- timestamp of start of the edit (used to timeout the edit) - start_time binary(14) NOT NULL default '', - -- timestamp of last ajax check of the edit (used to timeout the edit) - edit_time binary(14) NOT NULL default '', - - -- the user who edits the page - user_name varchar(255) binary NOT NULL default '', - - PRIMARY KEY edit_id (edit_id), - UNIQUE INDEX user_page (user_name(50), page_namespace, page_title(150)), - INDEX page (page_namespace, page_title(200)), - INDEX start_time (start_time), - INDEX edit_time (edit_time), - INDEX user_name (user_name) -) /*$wgDBTableOptions*/; + -- make sure exactly same tables are defined in maintenance/tables.sql if you want to use mediawiki config/index.php +CREATE TABLE /*$wgDBprefix*/ec_edit_conflict ( + -- revision id of destination article (also used in UI as unique ID) + -- it is required because the same page can have more than one conflict caused by the same user + ns_user_rev_id int unsigned NOT NULL, + + -- A source page which content was copied + page_namespace int NOT NULL, + -- The rest of the title, as text. + -- Spaces are transformed into underscores in title storage. + page_title varchar(255) binary NOT NULL, + + -- Timestamp of destination revision + page_touched binary(14) NOT NULL default '', + + -- user whose editing has caused an conflict + user_name varchar(255) binary NOT NULL default '', + + PRIMARY KEY ns_user_rev_id (ns_user_rev_id), + INDEX page (page_namespace, page_title), + INDEX page_touched (page_touched), + INDEX user_name (user_name) +) /*$wgDBTableOptions*/; + +CREATE TABLE /*$wgDBprefix*/ec_current_edits ( + -- unique edit id for ajax operations + edit_id int unsigned NOT NULL auto_increment, + -- edited page namespace + page_namespace int NOT NULL, + -- The rest of the title, as text. + -- Spaces are transformed into underscores in title storage. + page_title varchar(255) binary NOT NULL, + + -- timestamp of start of the edit (used to timeout the edit) + start_time binary(14) NOT NULL default '', + -- timestamp of last ajax check of the edit (used to timeout the edit) + edit_time binary(14) NOT NULL default '', + + -- the user who edits the page + user_name varchar(255) binary NOT NULL default '', + + PRIMARY KEY edit_id (edit_id),
[MediaWiki-CVS] SVN: [62835] trunk/extensions/Storyboard/specials/StoryReview/ StoryReview_body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62835 Revision: 62835 Author: jeroendedauw Date: 2010-02-22 19:29:30 + (Mon, 22 Feb 2010) Log Message: --- replaced spaces in profiling key name Modified Paths: -- trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php Modified: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php === --- trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php 2010-02-22 19:28:32 UTC (rev 62834) +++ trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php 2010-02-22 19:29:30 UTC (rev 62835) @@ -22,7 +22,7 @@ } public function execute( $language ) { - wfProfileIn('StoryReview special page'); + wfProfileIn('StoryReview-special-page'); global $wgUser; if ( $wgUser->isAllowed( 'storyreview' ) && !$wgUser->isBlocked() ) { @@ -34,7 +34,7 @@ $wgOut->permissionRequired( 'storyreview' ); } - wfProfileOut('StoryReview special page'); + wfProfileOut('StoryReview-special-page'); } private function addOutput() { @@ -102,9 +102,9 @@ $segments[] = ''; $segments[] = 'http://upload.wikimedia.org/wikipedia/mediawiki/9/99/SemanticMaps.png";>'; // TODO: get cropped image here $segments[] = ''; - $segments[] = $story->story_title; + $segments[] = htmlspecialchars($story->story_title); $segments[] = ''; - $segments[] = $story->story_text; + $segments[] = htmlspecialchars($story->story_text); $segments[] = ''; $segments[] = ''; // TODO: figure out how to best update db info (page submit with form or onclick with ajax call?) $segments[] = wfMsg('storyboard-publish'); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62834] trunk/extensions/SemanticMaps
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62834 Revision: 62834 Author: jeroendedauw Date: 2010-02-22 19:28:32 + (Mon, 22 Feb 2010) Log Message: --- Changes for 0.5.4 * Small security fixes * Use of $wgExtensionAssetsPath Modified Paths: -- trunk/extensions/SemanticMaps/FormInputs/SM_FormInput.php trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php trunk/extensions/SemanticMaps/QueryPrinters/SM_MapPrinter.php trunk/extensions/SemanticMaps/SemanticMaps.php Modified: trunk/extensions/SemanticMaps/FormInputs/SM_FormInput.php === --- trunk/extensions/SemanticMaps/FormInputs/SM_FormInput.php 2010-02-22 19:28:20 UTC (rev 62833) +++ trunk/extensions/SemanticMaps/FormInputs/SM_FormInput.php 2010-02-22 19:28:32 UTC (rev 62834) @@ -151,8 +151,8 @@ $centre = MapsGeocodeUtils::attemptToGeocode($this->centre, $this->geoservice, $this->serviceName); $centre = MapsUtils::getLatLon($centre); - $this->centre_lat = $centre['lat']; - $this->centre_lon = $centre['lon']; + $this->centre_lat = Xml::escapeJsString( $centre['lat'] ); + $this->centre_lon = Xml::escapeJsString( $centre['lon'] ); } } Modified: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php === --- trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php 2010-02-22 19:28:20 UTC (rev 62833) +++ trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php 2010-02-22 19:28:32 UTC (rev 62834) @@ -79,7 +79,7 @@ } $this->output .= " - +
[MediaWiki-CVS] SVN: [62833] trunk/extensions/Maps
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62833 Revision: 62833 Author: jeroendedauw Date: 2010-02-22 19:28:20 + (Mon, 22 Feb 2010) Log Message: --- Changes for 0.5.4 * Small security fixes * Use of $wgExtensionAssetsPath Modified Paths: -- trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispMap.php trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispPoint.php trunk/extensions/Maps/Maps.php Modified: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php === --- trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php2010-02-22 19:15:43 UTC (rev 62832) +++ trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php2010-02-22 19:28:20 UTC (rev 62833) @@ -89,8 +89,6 @@ 'default' => $egMapsGoogleAutozoom, 'output-type' => 'boolstr' ), - 'class' => array(), - 'style' => array(), ); } Modified: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispMap.php === --- trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispMap.php 2010-02-22 19:15:43 UTC (rev 62832) +++ trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispMap.php 2010-02-22 19:28:20 UTC (rev 62833) @@ -69,7 +69,7 @@ $this->output .=<< +
[MediaWiki-CVS] SVN: [62832] trunk/extensions/UsabilityInitiative
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62832 Revision: 62832 Author: catrope Date: 2010-02-22 19:15:43 + (Mon, 22 Feb 2010) Log Message: --- UsabilityInitiative: Recombine, bump style versions for r62724 Modified Paths: -- trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php trunk/extensions/UsabilityInitiative/js/plugins.combined.js trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js Modified: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php === --- trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php 2010-02-22 18:41:29 UTC (rev 62831) +++ trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php 2010-02-22 19:15:43 UTC (rev 62832) @@ -78,14 +78,14 @@ array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 18 ), array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 93 ), array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ), - array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 21 ), + array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 22 ), array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ), ), 'combined' => array( - array( 'src' => 'js/plugins.combined.js', 'version' => 273 ), + array( 'src' => 'js/plugins.combined.js', 'version' => 274 ), ), 'minified' => array( - array( 'src' => 'js/plugins.combined.min.js', 'version' => 273 ), + array( 'src' => 'js/plugins.combined.min.js', 'version' => 274 ), ), ), ); Modified: trunk/extensions/UsabilityInitiative/js/plugins.combined.js === --- trunk/extensions/UsabilityInitiative/js/plugins.combined.js 2010-02-22 18:41:29 UTC (rev 62831) +++ trunk/extensions/UsabilityInitiative/js/plugins.combined.js 2010-02-22 19:15:43 UTC (rev 62832) @@ -9006,7 +9006,8 @@ end: tokenArray[endIndex].offset, type: 'template', anchor: 'wrap', - splitPs: model.isCollapsible(), + //splitPs: model.isCollapsible(), + splitPs: false, afterWrap: $.wikiEditor.modules.templateEditor.fn.stylize, beforeUnwrap: function( node ) { // FIXME: $( node ).data( 'display' ) doesn't exist any more @@ -9068,7 +9069,7 @@ } var $template = $( this ) - .wrap( '' ) + .wrap( '' ) .addClass( 'wikiEditor-template-text wikiEditor-nodisplay' ) .parent() .addClass( 'wikiEditor-template-collapsed' ) @@ -9077,10 +9078,11 @@ $( '' ) .addClass( 'wikiEditor-template-name wikiEditor-noinclude' ) .text( model.getName() ) - .mousedown( function(){createDialog( $template );} ) //have to pass template so model stays in sync + .mousedown(toggleWikiTextEditor) + //.mousedown( function(){createDialog( $template );} ) //have to pass template so model stays in sync .prependTo( $template ); - + /* var $options = $( '' ) .addClass( 'wikiEditor-template-modes wikiEditor-noinclude' ) .append( $( '' ) @@ -9089,7 +9091,7 @@ $.wikiEditor.imgPath + 'templateEditor/' + 'wiki-text.png' ) ) .mousedown( toggleWikiTextEditor ) ) .insertAfter( $template.find( '.wikiEditor-template-name' ) ); - + */ $(this).data( 'setupDone', true ); function toggleWikiTextEditor(){ @@ -9608,9 +9610,8 @@ this.params = params;
[MediaWiki-CVS] SVN: [62831] trunk/wap/image.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62831 Revision: 62831 Author: nhuffschmid Date: 2010-02-22 18:41:29 + (Mon, 22 Feb 2010) Log Message: --- fixed export error Modified Paths: -- trunk/wap/image.php Modified: trunk/wap/image.php === --- trunk/wap/image.php 2010-02-22 18:34:21 UTC (rev 62830) +++ trunk/wap/image.php 2010-02-22 18:41:29 UTC (rev 62831) @@ -41,6 +41,10 @@ curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + // WP otherwise says: "Please provide a User-Agent header" + curl_setopt($ch, CURLOPT_USERAGENT, "hawpedia"); + $curlResultString = curl_exec($ch); if (!is_string($curlResultString)) { fatalError("Couldn't reach remote image repository."); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62830] trunk/extensions/Storyboard
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62830 Revision: 62830 Author: jeroendedauw Date: 2010-02-22 18:34:21 + (Mon, 22 Feb 2010) Log Message: --- Added profiling to story review Modified Paths: -- trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php Modified: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php === --- trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php 2010-02-22 17:03:29 UTC (rev 62829) +++ trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php 2010-02-22 18:34:21 UTC (rev 62830) @@ -4,6 +4,7 @@ * * @file StoryReview_body.php * @ingroup Storyboard + * @ingroup SpecialPage * * @author Jeroen De Dauw */ @@ -21,6 +22,8 @@ } public function execute( $language ) { + wfProfileIn('StoryReview special page'); + global $wgUser; if ( $wgUser->isAllowed( 'storyreview' ) && !$wgUser->isBlocked() ) { // If the user has the storyreview permission and is not blocked, show the regular output. @@ -30,8 +33,10 @@ global $wgOut; $wgOut->permissionRequired( 'storyreview' ); } + + wfProfileOut('StoryReview special page'); } - + private function addOutput() { global $wgOut; Modified: trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php === --- trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php 2010-02-22 17:03:29 UTC (rev 62829) +++ trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php 2010-02-22 18:34:21 UTC (rev 62830) @@ -18,8 +18,11 @@ // http://www.mediawiki.org/wiki/Manual:Forms // http://www.mediawiki.org/wiki/Manual:Hooks/UnknownAction public static function render( $input, $args, $parser, $frame ) { + return << + END; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62829] trunk/extensions/Widgets/Widgets.i18n.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62829 Revision: 62829 Author: sergeychernyshev Date: 2010-02-22 17:03:29 + (Mon, 22 Feb 2010) Log Message: --- More detailed message with link to extension page. Modified Paths: -- trunk/extensions/Widgets/Widgets.i18n.php Modified: trunk/extensions/Widgets/Widgets.i18n.php === --- trunk/extensions/Widgets/Widgets.i18n.php 2010-02-22 15:16:36 UTC (rev 62828) +++ trunk/extensions/Widgets/Widgets.i18n.php 2010-02-22 17:03:29 UTC (rev 62829) @@ -13,7 +13,7 @@ 'group-widgeteditor' => 'Widget editors', 'group-widgeteditor-member' => 'Widget editor', 'grouppage-widgeteditor' => 'Project:Widget editors', - 'right-editwidgets' => 'Edit pages in the "{{ns:widget}}" namespace', + 'right-editwidgets' => 'Create and edit [http://www.mediawiki.org/wiki/Extension:Widgets widgets] in the {{ns:widget}} namespace', ); /** Message documentation (Message documentation) ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62828] branches/SkinSystemRewrite/includes/Skin.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62828 Revision: 62828 Author: ashley Date: 2010-02-22 15:16:36 + (Mon, 22 Feb 2010) Log Message: --- Skin system rewrite: only show these in the footer if we actually have something to show Modified Paths: -- branches/SkinSystemRewrite/includes/Skin.php Modified: branches/SkinSystemRewrite/includes/Skin.php === --- branches/SkinSystemRewrite/includes/Skin.php2010-02-22 13:06:36 UTC (rev 62827) +++ branches/SkinSystemRewrite/includes/Skin.php2010-02-22 15:16:36 UTC (rev 62828) @@ -3057,11 +3057,19 @@ global $wgRequest; $action = $wgRequest->getVal( 'action', 'view' ); if ( $this->mTitle->getNamespace() != NS_SPECIAL && $action !== 'edit' ) { - $s .= "\t\t" . '' . $this->lastModified() . ' - ' . $this->getViewCount() . ' - ' . $this->getNumberOfWatchingUsers() . ' - ' . $this->getCredits() . ' - ' . $this->getCopyright() . '' . "\n"; + $s .= "\t\t" . '' . $this->lastModified() . ''; + if ( $this->getViewCount() ) { + $s .= "\t\t" . '' . $this->getViewCount() . '' . "\n"; + } + if ( $this->getNumberOfWatchingUsers() ) { + $s .= "\t\t" . '' . $this->getNumberOfWatchingUsers() . '' . "\n"; + } + if ( $this->getCredits() ) { + $s .= "\t\t" . '' . $this->getCredits() . '' . "\n"; + } + if ( $this->getCopyright() ) { + $s .= "\t\t" . '' . $this->getCopyright() . '' . "\n"; + } } $s .= "\t\t" . '' . $this->privacyLink() . ' ' . $this->aboutLink() . ' ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62827] trunk/extensions/CentralAuth
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62827 Revision: 62827 Author: vasilievvv Date: 2010-02-22 13:06:36 + (Mon, 22 Feb 2010) Log Message: --- Fix r61737 (mostly per Tim Starling's comments): * Cleanup messages output in Special:CentralAuth * Throw exception if unable to determine home wiki * Fix ucfirst spelling * Use array_chunk() instead of DIY code * Reword $wgCentralAuthUDPAddress description * Rename cursor variable to wgCursorPosition so it does not pollute global JS namespace * Fix SQL: update main schema file and change gu_locked/gu_hidden indices Modified Paths: -- trunk/extensions/CentralAuth/CentralAuth.php trunk/extensions/CentralAuth/CentralAuthUser.php trunk/extensions/CentralAuth/SpecialCentralAuth.php trunk/extensions/CentralAuth/central-auth.sql trunk/extensions/CentralAuth/centralauth.js trunk/extensions/CentralAuth/db_patches/patch-gu_hidden.sql Modified: trunk/extensions/CentralAuth/CentralAuth.php === --- trunk/extensions/CentralAuth/CentralAuth.php2010-02-22 12:25:53 UTC (rev 62826) +++ trunk/extensions/CentralAuth/CentralAuth.php2010-02-22 13:06:36 UTC (rev 62827) @@ -123,7 +123,7 @@ $wgCentralAuthCreateOnView = false; /** - * UPD-transmissed RC settings + * Settings for sending the CentralAuth events to the RC-to-UDP system */ $wgCentralAuthUDPAddress = false; $wgCentralAuthNew2UDPPrefix = ''; Modified: trunk/extensions/CentralAuth/CentralAuthUser.php === --- trunk/extensions/CentralAuth/CentralAuthUser.php2010-02-22 12:25:53 UTC (rev 62826) +++ trunk/extensions/CentralAuth/CentralAuthUser.php2010-02-22 13:06:36 UTC (rev 62827) @@ -1057,11 +1057,9 @@ 'reason' => $reason, ); $jobs = array(); - $step = $wgCentralAuthWikisPerSuppressJob; - for( $jobCount = 0; $jobCount < count( $this->mAttachedArray ); $jobCount += $step ) { - $length = $jobCount + $step > count( $this->mAttachedArray ) ? - $jobCount - $step : $step; - $jobParams['wikis'] = array_slice( $this->mAttachedArray, $jobCount, $length ); + $chunks = array_chunk( $this->mAttachedArray, $wgCentralAuthWikisPerSuppressJob ); + foreach( $chunks as $wikis ) { + $jobParams['wikis'] = $wikis; $jobs[] = Job::factory( 'crosswikiSuppressUser', Title::makeTitleSafe( NS_USER, $this->getName() ), Modified: trunk/extensions/CentralAuth/SpecialCentralAuth.php === --- trunk/extensions/CentralAuth/SpecialCentralAuth.php 2010-02-22 12:25:53 UTC (rev 62826) +++ trunk/extensions/CentralAuth/SpecialCentralAuth.php 2010-02-22 13:06:36 UTC (rev 62827) @@ -204,7 +204,7 @@ function showStatusError( $wikitext ) { global $wgOut; - $wrap = Xml::tags( 'div', array( 'class' => 'error' ), $s ); + $wrap = Xml::tags( 'div', array( 'class' => 'error' ), $wikitext ); $wgOut->addHTML( $wgOut->parse( $wrap, /*linestart*/true, /*uilang*/true ) ); } @@ -278,7 +278,8 @@ $out = ''; $out .= '' . wfMsgHtml( 'centralauth-admin-info-header' ) . ''; foreach( $attribs as $tag => $data ) { - $out .= '' . wfMsg( "centralauth-admin-info-$tag" ) . ' ' . $data . ''; + $out .= '' . wfMsgHtml( "centralauth-admin-info-$tag" ) . ' ' . + htmlspecialchars( $data ) . ''; } $out .= ''; $wgOut->addHTML( $out ); @@ -290,8 +291,8 @@ $remainder = $this->mUnattachedLocalAccounts; $legend = $this->mCanUnmerge ? - wfMsg( 'centralauth-admin-list-legend-rw' ) : - wfMsg( 'centralauth-admin-list-legend-ro' ); + wfMsgHtml( 'centralauth-admin-list-legend-rw' ) : + wfMsgHtml( 'centralauth-admin-list-legend-ro' ); $wgOut->addHTML( "{$legend}" ); $wgOut->addHTML( $this->listHeader() ); @@ -346,7 +347,7 @@ function listRemainder( $list ) { ksort( $list ); - $notMerged = wfMsg( 'centralauth-admin-unattached' ); + $notMerged = wfMsgExt( 'centralauth-admin-unattached', array( 'parseinline' ) ); $rows = array(); foreach ( $list as $row ) { $rows[] = '' . @@ -372,9 +373,9 @@ functi
[MediaWiki-CVS] SVN: [62826] trunk/phase3/includes/api/ApiMove.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62826 Revision: 62826 Author: ashley Date: 2010-02-22 12:25:53 + (Mon, 22 Feb 2010) Log Message: --- ApiMove.php: fix copyright symbol, spacing & coding style tweaks, more braces Modified Paths: -- trunk/phase3/includes/api/ApiMove.php Modified: trunk/phase3/includes/api/ApiMove.php === --- trunk/phase3/includes/api/ApiMove.php 2010-02-22 12:25:01 UTC (rev 62825) +++ trunk/phase3/includes/api/ApiMove.php 2010-02-22 12:25:53 UTC (rev 62826) @@ -1,10 +1,10 @@ .@home.nl + * Copyright © 2007 Roan Kattouw .@home.nl * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,49 +24,51 @@ if ( !defined( 'MEDIAWIKI' ) ) { // Eclipse helper - will be ignored in production - require_once ( "ApiBase.php" ); + require_once( "ApiBase.php" ); } - /** * @ingroup API */ class ApiMove extends ApiBase { public function __construct( $main, $action ) { - parent :: __construct( $main, $action ); + parent::__construct( $main, $action ); } public function execute() { global $wgUser; $params = $this->extractRequestParams(); - if ( is_null( $params['reason'] ) ) + if ( is_null( $params['reason'] ) ) { $params['reason'] = ''; + } $this->requireOnlyOneParameter( $params, 'from', 'fromid' ); - if ( !isset( $params['to'] ) ) + if ( !isset( $params['to'] ) ) { $this->dieUsageMsg( array( 'missingparam', 'to' ) ); + } - if ( isset( $params['from'] ) ) - { + if ( isset( $params['from'] ) ) { $fromTitle = Title::newFromText( $params['from'] ); - if ( !$fromTitle ) + if ( !$fromTitle ) { $this->dieUsageMsg( array( 'invalidtitle', $params['from'] ) ); - } - else if ( isset( $params['fromid'] ) ) - { + } + } elseif ( isset( $params['fromid'] ) ) { $fromTitle = Title::newFromID( $params['fromid'] ); - if ( !$fromTitle ) + if ( !$fromTitle ) { $this->dieUsageMsg( array( 'nosuchpageid', $params['fromid'] ) ); + } } - if ( !$fromTitle->exists() ) + if ( !$fromTitle->exists() ) { $this->dieUsageMsg( array( 'notanarticle' ) ); + } $fromTalk = $fromTitle->getTalkPage(); $toTitle = Title::newFromText( $params['to'] ); - if ( !$toTitle ) + if ( !$toTitle ) { $this->dieUsageMsg( array( 'invalidtitle', $params['to'] ) ); + } $toTalk = $toTitle->getTalkPage(); if ( $toTitle->getNamespace() == NS_FILE @@ -83,25 +85,25 @@ // Move the page $hookErr = null; $retval = $fromTitle->moveTo( $toTitle, true, $params['reason'], !$params['noredirect'] ); - if ( $retval !== true ) + if ( $retval !== true ) { $this->dieUsageMsg( reset( $retval ) ); + } $r = array( 'from' => $fromTitle->getPrefixedText(), 'to' => $toTitle->getPrefixedText(), 'reason' => $params['reason'] ); if ( !$params['noredirect'] || !$wgUser->isAllowed( 'suppressredirect' ) ) + { $r['redirectcreated'] = ''; + } // Move the talk page if ( $params['movetalk'] && $fromTalk->exists() && !$fromTitle->isTalkPage() ) { $retval = $fromTalk->moveTo( $toTalk, true, $params['reason'], !$params['noredirect'] ); - if ( $retval === true ) - { + if ( $retval === true ) { $r['talkfrom'] = $fromTalk->getPrefixedText(); $r['talkto'] = $toTalk->getPrefixedText(); - } - // We're not gonna dieUsage() on failure, since we already changed something - else - { + } else { + // We're not gonna dieUsage() on failure, since we already changed something $parsed = $this->parseMsg( reset( $retval ) ); $r['talkmove-error-code'] = $parsed['code']
[MediaWiki-CVS] SVN: [62825] branches/REL1_16/phase3/includes/filerepo/FileRepo.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62825 Revision: 62825 Author: demon Date: 2010-02-22 12:25:01 + (Mon, 22 Feb 2010) Log Message: --- (bug 22617), FileRepo::append() definition does not match child, change it to be like all the children Modified Paths: -- branches/REL1_16/phase3/includes/filerepo/FileRepo.php Modified: branches/REL1_16/phase3/includes/filerepo/FileRepo.php === --- branches/REL1_16/phase3/includes/filerepo/FileRepo.php 2010-02-22 12:24:50 UTC (rev 62824) +++ branches/REL1_16/phase3/includes/filerepo/FileRepo.php 2010-02-22 12:25:01 UTC (rev 62825) @@ -406,7 +406,7 @@ *that the source file should be deleted if possible * @return mixed Status or false */ - abstract function append( $srcPath, $toAppendPath, $flags ); + abstract function append( $srcPath, $toAppendPath, $flags = 0 ); /** * Remove a temporary file or mark it for garbage collection ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62824] trunk/phase3/includes/filerepo/FileRepo.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62824 Revision: 62824 Author: demon Date: 2010-02-22 12:24:50 + (Mon, 22 Feb 2010) Log Message: --- (bug 22617), FileRepo::append() definition does not match child, change it to be like all the children Modified Paths: -- trunk/phase3/includes/filerepo/FileRepo.php Modified: trunk/phase3/includes/filerepo/FileRepo.php === --- trunk/phase3/includes/filerepo/FileRepo.php 2010-02-22 12:20:54 UTC (rev 62823) +++ trunk/phase3/includes/filerepo/FileRepo.php 2010-02-22 12:24:50 UTC (rev 62824) @@ -406,7 +406,7 @@ *that the source file should be deleted if possible * @return mixed Status or false */ - abstract function append( $srcPath, $toAppendPath, $flags ); + abstract function append( $srcPath, $toAppendPath, $flags = 0 ); /** * Remove a temporary file or mark it for garbage collection ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62823] trunk/phase3/includes/api/ApiEmailUser.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62823 Revision: 62823 Author: ashley Date: 2010-02-22 12:20:54 + (Mon, 22 Feb 2010) Log Message: --- ApiEmailUser.php: fix copyright symbol, spacing and coding style tweaks, spaces -> tabs, trimmed off trailing whitespace Modified Paths: -- trunk/phase3/includes/api/ApiEmailUser.php Modified: trunk/phase3/includes/api/ApiEmailUser.php === --- trunk/phase3/includes/api/ApiEmailUser.php 2010-02-22 12:18:42 UTC (rev 62822) +++ trunk/phase3/includes/api/ApiEmailUser.php 2010-02-22 12:20:54 UTC (rev 62823) @@ -1,10 +1,10 @@ + * Copyright © 2008 Bryan Tong Minh * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { // Eclipse helper - will be ignored in production - require_once ( "ApiBase.php" ); + require_once( "ApiBase.php" ); } /** @@ -33,43 +33,51 @@ class ApiEmailUser extends ApiBase { public function __construct( $main, $action ) { - parent :: __construct( $main, $action ); + parent::__construct( $main, $action ); } public function execute() { global $wgUser; // Check whether email is enabled - if ( !EmailUserForm::userEmailEnabled() ) + if ( !EmailUserForm::userEmailEnabled() ) { $this->dieUsageMsg( array( 'usermaildisabled' ) ); + } $params = $this->extractRequestParams(); // Check required parameters - if ( !isset( $params['target'] ) ) + if ( !isset( $params['target'] ) ) { $this->dieUsageMsg( array( 'missingparam', 'target' ) ); - if ( !isset( $params['text'] ) ) + } + if ( !isset( $params['text'] ) ) { $this->dieUsageMsg( array( 'missingparam', 'text' ) ); - - // Validate target + } + + // Validate target $targetUser = EmailUserForm::validateEmailTarget( $params['target'] ); - if ( !( $targetUser instanceof User ) ) + if ( !( $targetUser instanceof User ) ) { $this->dieUsageMsg( array( $targetUser ) ); - + } + // Check permissions $error = EmailUserForm::getPermissionsError( $wgUser, $params['token'] ); - if ( $error ) + if ( $error ) { $this->dieUsageMsg( array( $error ) ); + } $form = new EmailUserForm( $targetUser, $params['text'], $params['subject'], $params['ccme'] ); $retval = $form->doSubmit(); - if ( is_null( $retval ) ) + if ( is_null( $retval ) ) { $result = array( 'result' => 'Success' ); - else - $result = array( 'result' => 'Failure', -'message' => $retval->getMessage() ); - + } else { + $result = array( + 'result' => 'Failure', + 'message' => $retval->getMessage() + ); + } + $this->getResult()->addValue( null, $this->getModuleName(), $result ); } - + public function mustBePosted() { return true; } @@ -79,7 +87,7 @@ } public function getAllowedParams() { - return array ( + return array( 'target' => null, 'subject' => null, 'text' => null, @@ -89,7 +97,7 @@ } public function getParamDescription() { - return array ( + return array( 'target' => 'User to send email to', 'subject' => 'Subject header', 'text' => 'Mail body', @@ -103,21 +111,21 @@ 'Email a user.' ); } - -public function getPossibleErrors() { + + public function getPossibleErrors() { return array_merge( parent::getPossibleErrors(), array( array( 'usermaildisabled' ), array( 'missingparam', 'target' ), array( 'missingparam', 'text' ), -) ); + ) ); } - + public function getTokenSalt() { return ''; } protected function getExamples() { - return array ( + return array( 'api.php?actio
[MediaWiki-CVS] SVN: [62822] trunk/phase3/includes/api/ApiEditPage.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62822 Revision: 62822 Author: ashley Date: 2010-02-22 12:18:42 + (Mon, 22 Feb 2010) Log Message: --- ApiEditPage.php: fix copyright symbol, spacing and coding style cleanup, more braces Modified Paths: -- trunk/phase3/includes/api/ApiEditPage.php Modified: trunk/phase3/includes/api/ApiEditPage.php === --- trunk/phase3/includes/api/ApiEditPage.php 2010-02-22 11:27:52 UTC (rev 62821) +++ trunk/phase3/includes/api/ApiEditPage.php 2010-02-22 12:18:42 UTC (rev 62822) @@ -1,11 +1,11 @@ @gmail.com + * Copyright © 2007 Iker Labarga @gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,8 +24,8 @@ */ if ( !defined( 'MEDIAWIKI' ) ) { -// Eclipse helper - will be ignored in production -require_once ( "ApiBase.php" ); + // Eclipse helper - will be ignored in production + require_once( "ApiBase.php" ); } /** @@ -38,40 +38,48 @@ class ApiEditPage extends ApiBase { public function __construct( $query, $moduleName ) { - parent :: __construct( $query, $moduleName ); + parent::__construct( $query, $moduleName ); } public function execute() { global $wgUser; $params = $this->extractRequestParams(); - - if ( is_null( $params['title'] ) ) + + if ( is_null( $params['title'] ) ) { $this->dieUsageMsg( array( 'missingparam', 'title' ) ); + } if ( is_null( $params['text'] ) && is_null( $params['appendtext'] ) && is_null( $params['prependtext'] ) && $params['undo'] == 0 ) + { $this->dieUsageMsg( array( 'missingtext' ) ); + } $titleObj = Title::newFromText( $params['title'] ); - if ( !$titleObj || $titleObj->isExternal() ) + if ( !$titleObj || $titleObj->isExternal() ) { $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) ); - + } + // Some functions depend on $wgTitle == $ep->mTitle global $wgTitle; $wgTitle = $titleObj; - if ( $params['createonly'] && $titleObj->exists() ) + if ( $params['createonly'] && $titleObj->exists() ) { $this->dieUsageMsg( array( 'createonly-exists' ) ); - if ( $params['nocreate'] && !$titleObj->exists() ) + } + if ( $params['nocreate'] && !$titleObj->exists() ) { $this->dieUsageMsg( array( 'nocreate-missing' ) ); + } // Now let's check whether we're even allowed to do this $errors = $titleObj->getUserPermissionsErrors( 'edit', $wgUser ); - if ( !$titleObj->exists() ) + if ( !$titleObj->exists() ) { $errors = array_merge( $errors, $titleObj->getUserPermissionsErrors( 'create', $wgUser ) ); - if ( count( $errors ) ) + } + if ( count( $errors ) ) { $this->dieUsageMsg( $errors[0] ); + } $articleObj = new Article( $titleObj ); $toMD5 = $params['text']; @@ -81,103 +89,123 @@ // returns an interface message rather than '' // We do want getContent()'s behavior for non-existent // MediaWiki: pages, though - if ( $articleObj->getID() == 0 && $titleObj->getNamespace() != NS_MEDIAWIKI ) + if ( $articleObj->getID() == 0 && $titleObj->getNamespace() != NS_MEDIAWIKI ) { $content = ''; - else + } else { $content = $articleObj->getContent(); - - if ( !is_null( $params['section'] ) ) - { + } + + if ( !is_null( $params['section'] ) ) { // Process the content for section edits global $wgParser; $section = intval( $params['section'] ); $content = $wgParser->getSection( $content, $section, false ); - if ( $content === false ) + if ( $content === false ) { $this->dieUsage( "There is no section {$section}.", 'nosuchsection' ); + }
[MediaWiki-CVS] SVN: [62820] branches/REL1_16/extensions/
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62820 Revision: 62820 Author: tstarling Date: 2010-02-22 11:21:36 + (Mon, 22 Feb 2010) Log Message: --- Branch for MediaWiki 1.16 Added Paths: --- branches/REL1_16/extensions/ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62819] branches/REL1_16/phase3/
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62819 Revision: 62819 Author: tstarling Date: 2010-02-22 11:21:08 + (Mon, 22 Feb 2010) Log Message: --- Branch for MediaWiki 1.16 Added Paths: --- branches/REL1_16/phase3/ Property changes on: branches/REL1_16/phase3 ___ Added: svn:ignore + *~ .classpath .metadata* .project .settings AdminSettings.php LocalSettings.php StartProfiler.php favicon.ico project.index static* Added: svn:mergeinfo + /branches/REL1_15/phase3:51646 /branches/sqlite:58211-58321 ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62818] branches/REL1_16/
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62818 Revision: 62818 Author: tstarling Date: 2010-02-22 11:19:47 + (Mon, 22 Feb 2010) Log Message: --- Branch for MediaWiki 1.16 Added Paths: --- branches/REL1_16/ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62817] trunk/phase3/includes/Preferences.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62817 Revision: 62817 Author: tstarling Date: 2010-02-22 10:48:30 + (Mon, 22 Feb 2010) Log Message: --- Fix r62774 in a different way. Modified Paths: -- trunk/phase3/includes/Preferences.php Modified: trunk/phase3/includes/Preferences.php === --- trunk/phase3/includes/Preferences.php 2010-02-22 10:42:31 UTC (rev 62816) +++ trunk/phase3/includes/Preferences.php 2010-02-22 10:48:30 UTC (rev 62817) @@ -114,7 +114,7 @@ } static function profilePreferences( $user, &$defaultPreferences ) { - global $wgLang; + global $wgLang, $wgUser; ## User info # // Information panel $defaultPreferences['username'] = @@ -209,7 +209,6 @@ ); if( $wgAuth->allowPasswordChange() ) { - global $wgUser; // For skin. $link = $wgUser->getSkin()->link( SpecialPage::getTitleFor( 'Resetpass' ), wfMsgHtml( 'prefs-resetpass' ), array(), array( 'returnto' => SpecialPage::getTitleFor( 'Preferences' ) ) ); @@ -362,7 +361,6 @@ $disableEmailPrefs = false; } else { $disableEmailPrefs = true; - global $wgUser; // wgUser is okay here, it's for display $skin = $wgUser->getSkin(); $emailauthenticated = wfMsgExt( 'emailnotauthenticated', 'parseinline' ) . '' . $skin->link( ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [62816] trunk/extensions/CodeReview
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62816 Revision: 62816 Author: happydog Date: 2010-02-22 10:42:31 + (Mon, 22 Feb 2010) Log Message: --- CodeReview: From Tim Starling, in response to r62508 (http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62508#c5934): "Variable names should start with a lower-case letter, e.g. "$result" instead of "$Result". Put braces around conditional blocks." - DONE Modified Paths: -- trunk/extensions/CodeReview/backend/Subversion.php trunk/extensions/CodeReview/svnImport.php Modified: trunk/extensions/CodeReview/backend/Subversion.php === --- trunk/extensions/CodeReview/backend/Subversion.php 2010-02-22 07:33:39 UTC (rev 62815) +++ trunk/extensions/CodeReview/backend/Subversion.php 2010-02-22 10:42:31 UTC (rev 62816) @@ -109,13 +109,14 @@ $this->getExtraArgs(), wfEscapeShellArg( $this->mRepo ) ); - $Result = wfShellExec( $command ); - if ( $Result == "" ) + $result = wfShellExec( $command ); + if ( $result == "" ) { return false; - elseif ( strpos( $Result, "No repository found" ) !== false ) + } elseif ( strpos( $result, "No repository found" ) !== false ) { return false; - else + } else { return true; + } } function getFile( $path, $rev = null ) { Modified: trunk/extensions/CodeReview/svnImport.php === --- trunk/extensions/CodeReview/svnImport.php 2010-02-22 07:33:39 UTC (rev 62815) +++ trunk/extensions/CodeReview/svnImport.php 2010-02-22 10:42:31 UTC (rev 62816) @@ -64,8 +64,9 @@ echo "Syncing repo $repoName from r$start to HEAD...\n"; - if ( !$svn->canConnect() ) + if ( !$svn->canConnect() ) { die( "Unable to connect to repository.\n" ); + } while ( true ) { $log = $svn->getLog( '', $start, $start + $chunkSize - 1 ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs