[MediaWiki-CVS] SVN: [94869] trunk/extensions/RecordAdmin
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94869 Revision: 94869 Author: nad Date: 2011-08-18 06:04:31 + (Thu, 18 Aug 2011) Log Message: --- if sortable set but not to yes use it as an id attribute for sortable persistence Modified Paths: -- trunk/extensions/RecordAdmin/RecordAdmin.php trunk/extensions/RecordAdmin/RecordAdmin_body.php Modified: trunk/extensions/RecordAdmin/RecordAdmin.php === --- trunk/extensions/RecordAdmin/RecordAdmin.php2011-08-18 05:47:02 UTC (rev 94868) +++ trunk/extensions/RecordAdmin/RecordAdmin.php2011-08-18 06:04:31 UTC (rev 94869) @@ -10,7 +10,7 @@ * @author Siebrand Mazeland * @licence GNU General Public Licence 2.0 or later */ -define( 'RECORDADMIN_VERSION', '1.3.3, 2011-08-18' ); +define( 'RECORDADMIN_VERSION', '1.3.4, 2011-08-18' ); $wgRecordAdminExtPath = preg_replace( |^.*(/extensions/.*$)|, $wgScriptPath$1, dirname( __FILE__ ) ); Modified: trunk/extensions/RecordAdmin/RecordAdmin_body.php === --- trunk/extensions/RecordAdmin/RecordAdmin_body.php 2011-08-18 05:47:02 UTC (rev 94868) +++ trunk/extensions/RecordAdmin/RecordAdmin_body.php 2011-08-18 06:04:31 UTC (rev 94869) @@ -307,8 +307,9 @@ if( $groupby ) $groupby = self::split( $groupby, ',' ); $type = $this-type; - $sortable = $sortable ? ' sortable' : ''; - $br = $sortable ? 'br /' : ''; + $id = ($sortable $sortable != 'yes') ? id=\$sortable\ : ; + $sortable = $sortable ? sortable : ; + $br = $sortable ? br / : ; $format = $wgRequest-getText( 'export' ); # If exporting as pdf, ensure the parser renders full URL's @@ -321,7 +322,7 @@ } # Table header (col0-3 class atts are for backward compatibility, only use named from now on) - $table = table class='recordadmin$sortable $type-record'\ntr; + $table = table$id class='recordadmin$sortable $type-record'\ntr; $th = array( 'select' = th class='col-select'. wfMsg( 'recordadmin-select' ) . $br/th, 'title'= th class='col0 col-title'. wfMsg( 'recordadmin-title', $type ) . $br/th, ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94870] trunk/extensions/RecordAdmin/RecordAdmin_body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94870 Revision: 94870 Author: nad Date: 2011-08-18 06:06:00 + (Thu, 18 Aug 2011) Log Message: --- oops 1 not yes Modified Paths: -- trunk/extensions/RecordAdmin/RecordAdmin_body.php Modified: trunk/extensions/RecordAdmin/RecordAdmin_body.php === --- trunk/extensions/RecordAdmin/RecordAdmin_body.php 2011-08-18 06:04:31 UTC (rev 94869) +++ trunk/extensions/RecordAdmin/RecordAdmin_body.php 2011-08-18 06:06:00 UTC (rev 94870) @@ -307,7 +307,7 @@ if( $groupby ) $groupby = self::split( $groupby, ',' ); $type = $this-type; - $id = ($sortable $sortable != 'yes') ? id=\$sortable\ : ; + $id = ($sortable $sortable != 1) ? id=\$sortable\ : ; $sortable = $sortable ? sortable : ; $br = $sortable ? br / : ; $format = $wgRequest-getText( 'export' ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94871] trunk/extensions/RecordAdmin/RecordAdmin_body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94871 Revision: 94871 Author: nad Date: 2011-08-18 06:10:40 + (Thu, 18 Aug 2011) Log Message: --- allow any nonempty value for sortable Modified Paths: -- trunk/extensions/RecordAdmin/RecordAdmin_body.php Modified: trunk/extensions/RecordAdmin/RecordAdmin_body.php === --- trunk/extensions/RecordAdmin/RecordAdmin_body.php 2011-08-18 06:06:00 UTC (rev 94870) +++ trunk/extensions/RecordAdmin/RecordAdmin_body.php 2011-08-18 06:10:40 UTC (rev 94871) @@ -957,7 +957,7 @@ elseif( $k == 'groupby' ) $groupby = $v; elseif( $k == 'format' ) $format = $v; elseif( $k == 'cols' ) $cols = self::split( $v, ',' ); - elseif( $k == 'sortable' ) $sortable = preg_match( /(1|yes|true|on)/i, $v ); + elseif( $k == 'sortable' ) $sortable = !empty( $v ); elseif( $k == 'template' ) $template = $v; elseif( $k == 'count' )$count= $v; elseif( $k == 'export' ) $export = $v; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94872] trunk/extensions/RecordAdmin/RecordAdmin_body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94872 Revision: 94872 Author: nad Date: 2011-08-18 06:16:20 + (Thu, 18 Aug 2011) Log Message: --- treat as id if strlen5 Modified Paths: -- trunk/extensions/RecordAdmin/RecordAdmin_body.php Modified: trunk/extensions/RecordAdmin/RecordAdmin_body.php === --- trunk/extensions/RecordAdmin/RecordAdmin_body.php 2011-08-18 06:10:40 UTC (rev 94871) +++ trunk/extensions/RecordAdmin/RecordAdmin_body.php 2011-08-18 06:16:20 UTC (rev 94872) @@ -307,7 +307,7 @@ if( $groupby ) $groupby = self::split( $groupby, ',' ); $type = $this-type; - $id = ($sortable $sortable != 1) ? id=\$sortable\ : ; + $id = strlen($sortable) 5 ? id=\$sortable\ : ; $sortable = $sortable ? sortable : ; $br = $sortable ? br / : ; $format = $wgRequest-getText( 'export' ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94873] trunk/phase3/tests/phpunit/includes/BlockTest.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94873 Revision: 94873 Author: bawolff Date: 2011-08-18 06:23:44 + (Thu, 18 Aug 2011) Log Message: --- Make testBug26425BlockTimestampDefaultsToTime be tolerrant of up to 2 seconds difference. Otherwise if the test happens to be run on a second barrier, it could falsely fail (like it did just now when codur said some hurtful things about my code failing unit-tests where it really didn't ;) Some of the other block tests seem to itermitantly fail for no appearent reason (null comes back instead of the block)... I don't know why. Modified Paths: -- trunk/phase3/tests/phpunit/includes/BlockTest.php Modified: trunk/phase3/tests/phpunit/includes/BlockTest.php === --- trunk/phase3/tests/phpunit/includes/BlockTest.php 2011-08-18 06:16:20 UTC (rev 94872) +++ trunk/phase3/tests/phpunit/includes/BlockTest.php 2011-08-18 06:23:44 UTC (rev 94873) @@ -75,9 +75,10 @@ * per bug 26425 */ function testBug26425BlockTimestampDefaultsToTime() { + // delta to stop one-off errors when things happen to go over a second mark. + $delta = abs( $this-madeAt - $this-block-mTimestamp ); + $this-assertLessThan( 2, $delta, If no timestamp is specified, the block is recorded as time()); - $this-assertEquals( $this-madeAt, $this-block-mTimestamp, If no timestamp is specified, the block is recorded as time()); - } /** ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94875] trunk/phase3/maintenance/archives
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94875 Revision: 94875 Author: raymond Date: 2011-08-18 07:49:10 + (Thu, 18 Aug 2011) Log Message: --- fu r94541: Delete empty files Removed Paths: - trunk/phase3/maintenance/archives/patch-ar_sha1.sql trunk/phase3/maintenance/archives/patch-rev_sha1.sql Deleted: trunk/phase3/maintenance/archives/patch-ar_sha1.sql === Deleted: trunk/phase3/maintenance/archives/patch-rev_sha1.sql === ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94876] trunk/extensions/SemanticMediaWiki/includes/storage/ SMW_Description.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94876 Revision: 94876 Author: mkroetzsch Date: 2011-08-18 08:09:09 + (Thu, 18 Aug 2011) Log Message: --- Allow duplicate printouts in query results: just do as the user says and don't try to be smart here Modified Paths: -- trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php Modified: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php === --- trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php 2011-08-18 07:49:10 UTC (rev 94875) +++ trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php 2011-08-18 08:09:09 UTC (rev 94876) @@ -46,7 +46,7 @@ * @param SMWPrintRequest $printrequest */ public function addPrintRequest( SMWPrintRequest $printrequest ) { - $this-m_printreqs[$printrequest-getHash()] = $printrequest; + $this-m_printreqs[] = $printrequest; } /** @@ -56,7 +56,7 @@ * @param SMWPrintRequest */ public function prependPrintRequest( SMWPrintRequest $printrequest ) { - $this-m_printreqs = array_merge( array( $printrequest-getHash() = $printrequest ), $this-m_printreqs ); + array_unshift( $this-m_printreqs, $printrequest ); } /** ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94877] trunk/extensions/SemanticMediaWiki/RELEASE-NOTES
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94877 Revision: 94877 Author: mkroetzsch Date: 2011-08-18 08:31:03 + (Thu, 18 Aug 2011) Log Message: --- comment on recent change to allow duplicate printouts Modified Paths: -- trunk/extensions/SemanticMediaWiki/RELEASE-NOTES Modified: trunk/extensions/SemanticMediaWiki/RELEASE-NOTES === --- trunk/extensions/SemanticMediaWiki/RELEASE-NOTES2011-08-18 08:09:09 UTC (rev 94876) +++ trunk/extensions/SemanticMediaWiki/RELEASE-NOTES2011-08-18 08:31:03 UTC (rev 94877) @@ -3,6 +3,9 @@ == SMW 1.6.1 == +* #ask queries now allow printouts (table columns) that are exactly the same. + In previous versions, multiple printouts with the same label would be + collapsed (e.g. {{#ask: [[Catgegory:City]] |?|?|?}} now shows four columns). * Fixed continue and limit escaping issues on Special:Ask. * Internationalization improvements and layout tweaks to #smwdoc. ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94878] trunk/extensions
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94878 Revision: 94878 Author: raymond Date: 2011-08-18 08:36:13 + (Thu, 18 Aug 2011) Log Message: --- Add new extension (r93523) to translatewiki.net Add i18n file, tweak extension credits Modified Paths: -- trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php trunk/extensions/Translate/groups/mediawiki-defines.txt Added Paths: --- trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.i18n.php Added: trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.i18n.php === --- trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.i18n.php (rev 0) +++ trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.i18n.php 2011-08-18 08:36:13 UTC (rev 94878) @@ -0,0 +1,17 @@ +?php +/** + * Internationalisation file for extension Automatic Board Welcome. + * + * @file + * @ingroup Extensions + */ + +$messages = array(); + +/** English + * @author Jack Phoenix j...@countervandalism.net + */ +$messages['en'] = array( + 'automaticboardwelcome-desc' = Automatically posts [[MediaWiki:User-board-welcome-message|a welcome message]] on new users' user boards after account creation, + +); Property changes on: trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.i18n.php ___ Added: svn:eol-style + native Modified: trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php === --- trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php 2011-08-18 08:31:03 UTC (rev 94877) +++ trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php 2011-08-18 08:36:13 UTC (rev 94878) @@ -7,7 +7,7 @@ * * @file * @ingroup Extensions - * @version 0.1 + * @version 0.1.1 * @date 30 July 2011 * @author Jack Phoenix j...@countervandalism.net * @license http://en.wikipedia.org/wiki/Public_domain Public domain @@ -18,10 +18,11 @@ // Extension credits that will show up on Special:Version $wgExtensionCredits['other'][] = array( + 'path' = __FILE__, 'name' = 'Automatic Board Welcome', - 'version' = '0.1', + 'version' = '0.1.1', 'author' = 'Jack Phoenix', - 'description' = 'Automatically posts [[MediaWiki:User-board-welcome-message|a welcome message]] on new users\' user boards after account creation', + 'descriptionmsg' = 'automaticboardwelcome-desc', 'url' = 'http://www.mediawiki.org/wiki/Extension:Automatic_Board_Welcome', ); Modified: trunk/extensions/Translate/groups/mediawiki-defines.txt === --- trunk/extensions/Translate/groups/mediawiki-defines.txt 2011-08-18 08:31:03 UTC (rev 94877) +++ trunk/extensions/Translate/groups/mediawiki-defines.txt 2011-08-18 08:36:13 UTC (rev 94878) @@ -82,10 +82,12 @@ Assert Edit +Author Protect + Autoincrement magicfile = Autoincrement/Autoincrement.i18n.magic.php -Author Protect +Automatic Board Welcome Babel magicfile = Babel/Babel.i18n.magic.php ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94879] trunk/extensions/RecordAdmin/RecordAdmin_body.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94879 Revision: 94879 Author: nad Date: 2011-08-18 09:52:27 + (Thu, 18 Aug 2011) Log Message: --- more solid way to handle sortable parameter Modified Paths: -- trunk/extensions/RecordAdmin/RecordAdmin_body.php Modified: trunk/extensions/RecordAdmin/RecordAdmin_body.php === --- trunk/extensions/RecordAdmin/RecordAdmin_body.php 2011-08-18 08:36:13 UTC (rev 94878) +++ trunk/extensions/RecordAdmin/RecordAdmin_body.php 2011-08-18 09:52:27 UTC (rev 94879) @@ -307,7 +307,7 @@ if( $groupby ) $groupby = self::split( $groupby, ',' ); $type = $this-type; - $id = strlen($sortable) 5 ? id=\$sortable\ : ; + $id = ( $sortable $sortable != 1 ) ? id=\$sortable\ : ; $sortable = $sortable ? sortable : ; $br = $sortable ? br / : ; $format = $wgRequest-getText( 'export' ); @@ -957,7 +957,11 @@ elseif( $k == 'groupby' ) $groupby = $v; elseif( $k == 'format' ) $format = $v; elseif( $k == 'cols' ) $cols = self::split( $v, ',' ); - elseif( $k == 'sortable' ) $sortable = !empty( $v ); + elseif( $k == 'sortable' ) { + $sortable = strtolower( $v ); + if( $sortable == 'yes' || $sortable == 'true' ) $sortable = 1; + if( $sortable == 'no' || $sortable == 'false' ) $sortable = false; + } elseif( $k == 'template' ) $template = $v; elseif( $k == 'count' )$count= $v; elseif( $k == 'export' ) $export = $v; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94880] trunk/extensions/SemanticMediaWiki/specials/AskSpecial
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94880 Revision: 94880 Author: devayon Date: 2011-08-18 09:53:40 + (Thu, 18 Aug 2011) Log Message: --- width correction for inputboxes under show more options Modified Paths: -- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php Modified: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php === --- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php 2011-08-18 09:52:27 UTC (rev 94879) +++ trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php 2011-08-18 09:53:40 UTC (rev 94880) @@ -1675,7 +1675,7 @@ Html::rawElement( 'div', array( - 'style' = 'width: 30%; padding: 5px; float: left;' + 'style' = 'width: 30%; min-width:220px; margin:5px; padding: 1px; float: left;' ), 'label for=p[' . htmlspecialchars( $param-getName() ) . ']' . htmlspecialchars( $param-getName() ) . ': /label' . $this-showFormatOption( $param, $currentValue ) . Modified: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php === --- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php 2011-08-18 09:52:27 UTC (rev 94879) +++ trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php 2011-08-18 09:53:40 UTC (rev 94880) @@ -229,21 +229,21 @@ } $result = 'fieldsetlegend' . wfMsg( 'smw_ask_otheroptions' ) . /legend\n . Html::rawElement( 'div', - array( 'style' = 'width: 30%; padding: 5px; float: left;' ), + array( 'style' = 'width: 30%; min-width:220px; margin:5px; padding: 1px; float: left;' ), wfMsg( 'smw_qc_intro' ) . - 'input name=p[intro] value=' . $intro . 'size=32/ br/' . + 'input name=p[intro] value=' . $intro . ' style=width:220px;/ br/' . wfMsg( 'smw_paramdesc_intro' ) ) . Html::rawElement( 'div', - array( 'style' = 'width: 30%; padding: 5px; float: left;' ), + array( 'style' = 'width: 30%; min-width:220px; margin:5px; padding: 1px; float: left;' ), wfMsg( 'smw_qc_outro' ) . - 'input name=p[outro] value=' . $outro . ' size=32/ br/' . + 'input name=p[outro] value=' . $outro . ' style=width:220px;/ br/' . wfMsg( 'smw_paramdesc_outro' ) ) . Html::rawElement( 'div', - array( 'style' = 'width: 30%; padding: 5px; float: left;' ), + array( 'style' = 'width: 30%; min-width:220px; margin:5px; padding: 1px; float: left;' ), wfMsg( 'smw_qc_default' ) . - 'input name=p[default] value=' . $default . ' size=32/ br/' . + 'input name=p[default] value=' . $default . ' style=width:220px; / br/' . wfMsg( 'smw_paramdesc_default' ) ) . Html::hidden( 'p[limit]', $limit ) . ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94881] trunk/phase3/includes/HttpFunctions.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94881 Revision: 94881 Author: marooned Date: 2011-08-18 10:33:39 + (Thu, 18 Aug 2011) Log Message: --- Relative values of the Location header are incorrect as stated in RFC, however they do happen and modern browsers support them. This function loops backwards through all locations in order to build the proper absolute URI - Marooned at wikia-inc.com Modified Paths: -- trunk/phase3/includes/HttpFunctions.php Modified: trunk/phase3/includes/HttpFunctions.php === --- trunk/phase3/includes/HttpFunctions.php 2011-08-18 09:53:40 UTC (rev 94880) +++ trunk/phase3/includes/HttpFunctions.php 2011-08-18 10:33:39 UTC (rev 94881) @@ -569,13 +569,44 @@ /** * Returns the final URL after all redirections. * -* @return String +* Relative values of the Location header are incorrect as stated in RFC, however they do happen and modern browsers support them. +* This function loops backwards through all locations in order to build the proper absolute URI - Marooned at wikia-inc.com +* +* @returns string */ public function getFinalUrl() { - $location = $this-getResponseHeader( Location ); + $headers = $this-getResponseHeaders(); - if ( $location ) { - return $location; + //return full url (fix for incorrect but handled relative location) + if ( isset( $headers[ 'location' ] ) ) { + $locations = $headers[ 'location' ]; + $domain = ''; + $foundRelativeURI = false; + $countLocations = count($locations); + + for ( $i = $countLocations - 1; $i = 0; $i-- ) { + $url = parse_url( $locations[ $i ] ); + + if ( isset($url[ 'host' ]) ) { + $domain = $url[ 'scheme' ] . '://' . $url[ 'host' ]; + break; //found correct URI (with host) + } else { + $foundRelativeURI = true; + } + } + + if ( $foundRelativeURI ) { + if ( $domain ) { + return $domain . $locations[ $countLocations - 1 ]; + } else { + $url = parse_url( $this-url ); + if ( isset($url[ 'host' ]) ) { + return $url[ 'scheme' ] . '://' . $url[ 'host' ] . $locations[ $countLocations - 1 ]; + } + } + } else { + return $locations[ $countLocations - 1 ]; + } } return $this-url; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94882] trunk/extensions/SemanticMediaWiki
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94882 Revision: 94882 Author: devayon Date: 2011-08-18 11:51:22 + (Thu, 18 Aug 2011) Log Message: --- modal-window for mainlabel Modified Paths: -- trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php trunk/extensions/SemanticMediaWiki/skins/SMW_custom.css trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php Modified: trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php === --- trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php 2011-08-18 10:33:39 UTC (rev 94881) +++ trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php 2011-08-18 11:51:22 UTC (rev 94882) @@ -264,7 +264,7 @@ 'smw_qui_descorder' = 'Descending', 'smw_qui_addnprop' = 'Add additional property', 'smw_qui_delete'= 'Remove', - 'smw_qui_rescol'= 'strongQuery Matches/strong Label', + 'smw_qui_rescol'= 'Query Matches', 'smw_qui_options' = 'options', 'smw_qui_addcategory' = 'Add additional category', 'smw_qui_addrescol' = 'Add main result column', @@ -274,6 +274,7 @@ 'smw_qui_label' = 'Label', 'smw_prp_options' = 'Property Options', 'smw_qui_catopts' = 'Category Options', + 'smw_qui_mainlabopts' = 'Result Options', 'smw_qui_dlabel'= 'Label:', 'smw_qui_dcategory' = 'Category:', 'smw_qui_dcatyes' = 'Show text when category is present:', Modified: trunk/extensions/SemanticMediaWiki/skins/SMW_custom.css === --- trunk/extensions/SemanticMediaWiki/skins/SMW_custom.css 2011-08-18 10:33:39 UTC (rev 94881) +++ trunk/extensions/SemanticMediaWiki/skins/SMW_custom.css 2011-08-18 11:51:22 UTC (rev 94882) @@ -131,6 +131,9 @@ } /* ui buttons for QueryUI */ +div.smwsort{ + margin-bottom: 5px; +} .smwsort input, .smwsort a, .smwsort select, .smwsort checkbox{ margin-left: 5px; margin-bottom: 5px; @@ -148,18 +151,13 @@ padding-left: 35px; } -.smwpropdialog input, .smwpropdialog select{ +.smwpropdialog input, .smwpropdialog select, .smwcatdialog input, +.smwcatdialog select, .smwmainlabdialog input{ margin-top: 10px; margin-right: 5px; margin-left: 5px; } -.smwcatdialog input, .smwcatdialog select{ - margin-top: 10px; - margin-right: 5px; - margin-left: 5px; -} - /* Query Creator */ div.smwqcnavbar{ padding-bottom: 5px; @@ -173,7 +171,7 @@ } .smwquisortlabel{ - width: 15em; + width: 10em; float: left; } /* search, browse, RDF icons */ Modified: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php === --- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php 2011-08-18 10:33:39 UTC (rev 94881) +++ trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php 2011-08-18 11:51:22 UTC (rev 94882) @@ -591,11 +591,21 @@ array( 'href' = 'javascript:smwRemoveMainLabel()' ) ) . 'img src=' . $smwgScriptPath . '/skins/images/close-button.png alt=' . wfMsg( 'smw_qui_delete' ) . '' . '/a' . - '/span' . + '/spanstrong' . wfMsg( 'smw_qui_rescol' ) . - '/span' . - 'input size=25 value=' . $mainLabelText . ' id=mainlabelvis /' . - 'input type=hidden name=pmainlabel value=' . $mainLabel . ' id=mainlabelhid /' . + '/strong/span' . + Xml::openElement( 'div', + array( 'id' = 'mainlabel-dialog', + 'title' = wfMsg( 'smw_qui_mainlabopts'), + 'class' = 'smwmainlabdialog' ) + ). + 'table align=center tr'. + 'td'. wfMsg('smw_qui_dlabel'). '/td'. + 'tdinput size=25 value=' . $mainLabelText . ' id=mainlabelvis //td'. + '/tr/table' . + '/div'. + 'input type=hidden name=pmainlabel value=' . $mainLabel . ' id=mainlabelhid / ' . + 'a class=smwq-more href=javascript:smw_makeMainlabelDialog()'.wfMsg( 'smw_qui_options' ).'/a '. '/div'; $urlArgs = array(); $urlArgs['pmainlabel'] = $mainLabel; @@ -908,9 +918,9 @@
[MediaWiki-CVS] SVN: [94883] trunk/extensions/SemanticMediaWiki/specials/AskSpecial/ SMW_QueryUIHelper.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94883 Revision: 94883 Author: devayon Date: 2011-08-18 12:02:09 + (Thu, 18 Aug 2011) Log Message: --- follow-up r94770 Modified Paths: -- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php Modified: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php === --- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php 2011-08-18 11:51:22 UTC (rev 94882) +++ trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php 2011-08-18 12:02:09 UTC (rev 94883) @@ -487,6 +487,10 @@ $params['sort'] = ''; $params['order'] = ''; foreach ( $propertyValues as $key = $propertyValue ) { + $propertyValues[$key] = trim( $propertyValue ); + if ( $propertyValues[$key] == '' ) { + unset( $propertyValues[$key] ); + } if ( $smwgQSortingSupport is_array( $orderValues ) array_key_exists( $key, $orderValues ) @@ -596,16 +600,16 @@ '/strong/span' . Xml::openElement( 'div', array( 'id' = 'mainlabel-dialog', - 'title' = wfMsg( 'smw_qui_mainlabopts'), + 'title' = wfMsg( 'smw_qui_mainlabopts' ), 'class' = 'smwmainlabdialog' ) - ). - 'table align=center tr'. - 'td'. wfMsg('smw_qui_dlabel'). '/td'. - 'tdinput size=25 value=' . $mainLabelText . ' id=mainlabelvis //td'. + ) . + 'table align=center tr' . + 'td' . wfMsg( 'smw_qui_dlabel' ) . '/td' . + 'tdinput size=25 value=' . $mainLabelText . ' id=mainlabelvis //td' . '/tr/table' . - '/div'. + '/div' . 'input type=hidden name=pmainlabel value=' . $mainLabel . ' id=mainlabelhid / ' . - 'a class=smwq-more href=javascript:smw_makeMainlabelDialog()'.wfMsg( 'smw_qui_options' ).'/a '. + 'a class=smwq-more href=javascript:smw_makeMainlabelDialog()' . wfMsg( 'smw_qui_options' ) . '/a ' . '/div'; $urlArgs = array(); $urlArgs['pmainlabel'] = $mainLabel; @@ -1059,18 +1063,18 @@ 'table align=center' . 'trtd' . $categoryHtml[0] . '/tdtd' . $categoryHtml[1] . '/td/tr' . 'trtd' . $categoryLabelHtml[0] . '/tdtd' . $categoryLabelHtml[1] . '/td/tr' . - '/tablebr/table align=center'. + '/tablebr/table align=center' . 'trtd' . $categoryYesHtml[0] . '/tdtd' . $categoryYesHtml[1] . '/td/tr' . 'trtd' . $categoryNoHtml[0] . '/tdtd' . $categoryNoHtml[1] . '/td/tr' . '/table' . Xml::closeElement( 'div' ); $mainLabelDialogBox = Xml::openElement( 'div', array( 'id' = 'mainlabel-dialog', - 'title' = wfMsg( 'smw_qui_mainlabopts'), + 'title' = wfMsg( 'smw_qui_mainlabopts' ), 'class' = 'smwmainlabdialog' ) - ). - Xml::inputLabel(wfMsg('smw_qui_dlabel'), '', 'd-mainlabel-label'). - Xml::closeElement('div'); + ) . + Xml::inputLabel( wfMsg( 'smw_qui_dlabel' ), '', 'd-mainlabel-label' ) . + Xml::closeElement( 'div' ); $result .= 'div id=sorting_main/div' . \n; $result .= '[a href=javascript:smw_addPropertyInstance(\'property_starter\', \'sorting_main\')' . wfMsg( 'smw_qui_addnprop' ) . '/a]' . ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94884] trunk/extensions/Favorites/Favorites.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94884 Revision: 94884 Author: jlemley Date: 2011-08-18 12:32:22 + (Thu, 18 Aug 2011) Log Message: --- Reverted Modified Paths: -- trunk/extensions/Favorites/Favorites.php Modified: trunk/extensions/Favorites/Favorites.php === --- trunk/extensions/Favorites/Favorites.php2011-08-18 12:02:09 UTC (rev 94883) +++ trunk/extensions/Favorites/Favorites.php2011-08-18 12:32:22 UTC (rev 94884) @@ -22,12 +22,11 @@ 'name' = 'Favorites', 'author' = 'Jeremy Lemley', 'descriptionmsg' = 'favorites-desc', - 'version' = '0.2.5', + 'version' = '0.2.2', 'url' = http://www.mediawiki.org/wiki/Extension:Favorites;, ); -global $wgUseIconFavorite, $wgFavoritesPersonalURL; - +global $wgUseIconFavorite; $dir = dirname(__FILE__) . '/'; $wgExtensionMessagesFiles['Favorites'] = $dir . 'favorites.i18n.php'; $wgAutoloadClasses['Favorites'] = $dir . 'Favorites_body.php'; @@ -63,32 +62,7 @@ $wgHooks['TitleMoveComplete'][] = 'fnHookMoveToFav'; $wgHooks['ArticleDeleteComplete'][] = 'fnHookDeleteFav'; -// Do we want to display a My Favorites link in the personal urls area? -if ($wgFavoritesPersonalURL) { - $wgHooks['PersonalUrls'][] = 'onAddPersonalUrls'; -} -function onAddPersonalUrls( $personal_urls, $wgTitle ) { - global $wgUser; - - // $skin = $wgUser-getSkin(); - - if( $wgUser-getID() ) { -$url['userpage'] = array_shift( $personal_urls ); -$url[] = array_shift( $personal_urls ); -$url[] = array_shift( $personal_urls ); - - $url[] = array( 'text' = wfMsg( 'myfavoritelist' ), - 'href' = Skin::makeKnownUrlDetails( 'Special:Favoritelist' ) - ); - - - $personal_urls = $url + $personal_urls; - } - - return true; -} - function fnAction ($action, $article) { $title = new Title(); $favArticle = new FavArticle($title); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94885] branches/REL1_16/extensions/Favorites/Favorites.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94885 Revision: 94885 Author: jlemley Date: 2011-08-18 12:32:31 + (Thu, 18 Aug 2011) Log Message: --- Reverted Modified Paths: -- branches/REL1_16/extensions/Favorites/Favorites.php Modified: branches/REL1_16/extensions/Favorites/Favorites.php === --- branches/REL1_16/extensions/Favorites/Favorites.php 2011-08-18 12:32:22 UTC (rev 94884) +++ branches/REL1_16/extensions/Favorites/Favorites.php 2011-08-18 12:32:31 UTC (rev 94885) @@ -22,12 +22,11 @@ 'name' = 'Favorites', 'author' = 'Jeremy Lemley', 'descriptionmsg' = 'favorites-desc', - 'version' = '0.2.5', + 'version' = '0.2.2', 'url' = http://www.mediawiki.org/wiki/Extension:Favorites;, ); -global $wgUseIconFavorite, $wgFavoritesPersonalURL; - +global $wgUseIconFavorite; $dir = dirname(__FILE__) . '/'; $wgExtensionMessagesFiles['Favorites'] = $dir . 'favorites.i18n.php'; $wgAutoloadClasses['Favorites'] = $dir . 'Favorites_body.php'; @@ -63,32 +62,7 @@ $wgHooks['TitleMoveComplete'][] = 'fnHookMoveToFav'; $wgHooks['ArticleDeleteComplete'][] = 'fnHookDeleteFav'; -// Do we want to display a My Favorites link in the personal urls area? -if ($wgFavoritesPersonalURL) { - $wgHooks['PersonalUrls'][] = 'onAddPersonalUrls'; -} -function onAddPersonalUrls( $personal_urls, $wgTitle ) { - global $wgUser; - - // $skin = $wgUser-getSkin(); - - if( $wgUser-getID() ) { -$url['userpage'] = array_shift( $personal_urls ); -$url[] = array_shift( $personal_urls ); -$url[] = array_shift( $personal_urls ); - - $url[] = array( 'text' = wfMsg( 'myfavoritelist' ), - 'href' = Skin::makeKnownUrlDetails( 'Special:Favoritelist' ) - ); - - - $personal_urls = $url + $personal_urls; - } - - return true; -} - function fnAction ($action, $article) { $title = new Title(); $favArticle = new FavArticle($title); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94886] branches/REL1_17/extensions/Favorites/Favorites.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94886 Revision: 94886 Author: jlemley Date: 2011-08-18 12:32:42 + (Thu, 18 Aug 2011) Log Message: --- Reverted Modified Paths: -- branches/REL1_17/extensions/Favorites/Favorites.php Modified: branches/REL1_17/extensions/Favorites/Favorites.php === --- branches/REL1_17/extensions/Favorites/Favorites.php 2011-08-18 12:32:31 UTC (rev 94885) +++ branches/REL1_17/extensions/Favorites/Favorites.php 2011-08-18 12:32:42 UTC (rev 94886) @@ -22,12 +22,11 @@ 'name' = 'Favorites', 'author' = 'Jeremy Lemley', 'descriptionmsg' = 'favorites-desc', - 'version' = '0.2.5', + 'version' = '0.2.2', 'url' = http://www.mediawiki.org/wiki/Extension:Favorites;, ); -global $wgUseIconFavorite, $wgFavoritesPersonalURL; - +global $wgUseIconFavorite; $dir = dirname(__FILE__) . '/'; $wgExtensionMessagesFiles['Favorites'] = $dir . 'favorites.i18n.php'; $wgAutoloadClasses['Favorites'] = $dir . 'Favorites_body.php'; @@ -63,32 +62,7 @@ $wgHooks['TitleMoveComplete'][] = 'fnHookMoveToFav'; $wgHooks['ArticleDeleteComplete'][] = 'fnHookDeleteFav'; -// Do we want to display a My Favorites link in the personal urls area? -if ($wgFavoritesPersonalURL) { - $wgHooks['PersonalUrls'][] = 'onAddPersonalUrls'; -} -function onAddPersonalUrls( $personal_urls, $wgTitle ) { - global $wgUser; - - // $skin = $wgUser-getSkin(); - - if( $wgUser-getID() ) { -$url['userpage'] = array_shift( $personal_urls ); -$url[] = array_shift( $personal_urls ); -$url[] = array_shift( $personal_urls ); - - $url[] = array( 'text' = wfMsg( 'myfavoritelist' ), - 'href' = Skin::makeKnownUrlDetails( 'Special:Favoritelist' ) - ); - - - $personal_urls = $url + $personal_urls; - } - - return true; -} - function fnAction ($action, $article) { $title = new Title(); $favArticle = new FavArticle($title); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94887] trunk/extensions/Maps
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94887 Revision: 94887 Author: jeroendedauw Date: 2011-08-18 12:44:59 + (Thu, 18 Aug 2011) Log Message: --- fxied fail and incremented version nr Modified Paths: -- trunk/extensions/Maps/INSTALL trunk/extensions/Maps/Maps.php trunk/extensions/Maps/RELEASE-NOTES trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js Modified: trunk/extensions/Maps/INSTALL === --- trunk/extensions/Maps/INSTALL 2011-08-18 12:32:42 UTC (rev 94886) +++ trunk/extensions/Maps/INSTALL 2011-08-18 12:44:59 UTC (rev 94887) @@ -1,4 +1,4 @@ -[[Maps 1.0.1]] +[[Maps 1.0.2]] In order to use this version of Maps, you need to have Validator 0.3.6 installed. If you get a distribution from this page, you don't need to bother this, since Validator comes bundled with every release, and will Modified: trunk/extensions/Maps/Maps.php === --- trunk/extensions/Maps/Maps.php 2011-08-18 12:32:42 UTC (rev 94886) +++ trunk/extensions/Maps/Maps.php 2011-08-18 12:44:59 UTC (rev 94887) @@ -41,7 +41,7 @@ die( 'bError:/b You need to have a href=http://www.mediawiki.org/wiki/Extension:Validator;Validator/a installed in order to use a href=http://www.mediawiki.org/wiki/Extension:Maps;Maps/a.br /' ); } -define( 'Maps_VERSION', '1.0.1' ); +define( 'Maps_VERSION', '1.0.2 alpha' ); $wgExtensionCredits['parserhook'][] = array( 'path' = __FILE__, Modified: trunk/extensions/Maps/RELEASE-NOTES === --- trunk/extensions/Maps/RELEASE-NOTES 2011-08-18 12:32:42 UTC (rev 94886) +++ trunk/extensions/Maps/RELEASE-NOTES 2011-08-18 12:44:59 UTC (rev 94887) @@ -7,6 +7,11 @@ http://mapping.referata.com/wiki/Maps/Version_history#Maps_change_log +=== Maps 1.0.2 === +(2011-08-xx) + +* Fixed Google Maps v3 JavaScript issue when using Google Earth on unsuported systems. + === Maps 1.0.1 === (2011-08-17) Modified: trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js === --- trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js 2011-08-18 12:32:42 UTC (rev 94886) +++ trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js 2011-08-18 12:44:59 UTC (rev 94887) @@ -127,6 +127,8 @@ } }; + this.options = options; + var showEarth = $.inArray( 'earth', options.types ) !== -1; // If there are any non-Google KML/KMZ layers, load the geoxml library and use it to add these layers. @@ -138,7 +140,6 @@ disableDefaultUI: true, mapTypeId: options.type == 'earth' ? google.maps.MapTypeId.SATELLITE : eval( 'google.maps.MapTypeId.' + options.type ) }; - this.options = options; // Map controls mapOptions.panControl = $.inArray( 'pan', options.controls ) != -1; @@ -258,11 +259,11 @@ } }; + map.setMapTypeId( GoogleEarth.MAP_TYPE_ID ); setTilt(); } _this.addOverlays(); - map.setMapTypeId( GoogleEarth.MAP_TYPE_ID ); } ); } } ); } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94888] trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94888 Revision: 94888 Author: devayon Date: 2011-08-18 12:56:41 + (Thu, 18 Aug 2011) Log Message: --- simplify messages for QueryCreator print-out controls Modified Paths: -- trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php Modified: trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php === --- trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php 2011-08-18 12:44:59 UTC (rev 94887) +++ trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php 2011-08-18 12:56:41 UTC (rev 94888) @@ -262,12 +262,12 @@ 'smw_qui_nosort'= 'No sorting', 'smw_qui_ascorder' = 'Ascending', 'smw_qui_descorder' = 'Descending', - 'smw_qui_addnprop' = 'Add additional property', + 'smw_qui_addnprop' = 'add property', 'smw_qui_delete'= 'Remove', - 'smw_qui_rescol'= 'Query Matches', + 'smw_qui_rescol'= 'Query-matches', 'smw_qui_options' = 'options', - 'smw_qui_addcategory' = 'Add additional category', - 'smw_qui_addrescol' = 'Add main result column', + 'smw_qui_addcategory' = 'add category', + 'smw_qui_addrescol' = 'add query-matches', 'smw_qui_ok'= 'Ok', 'smw_qui_cancel'= 'Cancel', 'smw_qui_category' = 'strongCategory/strong', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94889] trunk/extensions/SemanticMediaWiki/specials/AskSpecial/ SMW_QueryUIHelper.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94889 Revision: 94889 Author: devayon Date: 2011-08-18 13:26:33 + (Thu, 18 Aug 2011) Log Message: --- modal window for '?' printouts, follow-up r94882 Modified Paths: -- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php Modified: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php === --- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php 2011-08-18 12:56:41 UTC (rev 94888) +++ trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php 2011-08-18 13:26:33 UTC (rev 94889) @@ -925,11 +925,11 @@ '/spanstrong' . wfMsg( 'smw_qui_rescol' ) . '/strong/span' . - Xml::input( maincol_label[$i], - '25', + Html::hidden( maincol_label[$i], $mainColumnLabels[$key], array ( 'id' = maincol_label$i ) ) . . + 'a class=smwq-more href=javascript:smw_makeQueryMatchesDialog(\'' . $i . '\')' . wfMsg( 'smw_qui_options' ) . '/a ' . '/div'; $urlArgs[maincol_label[$i]] = ( $mainColumnLabels[$key] == '' ) ? ' ':$mainColumnLabels[$key]; @@ -997,7 +997,7 @@ '/a' . '/spanstrong' . wfMsg( 'smw_qui_rescol' ) . '/strong/span' . - Xml::input( maincol_label_num, '25' ) . . + Html::hidden( maincol_label_num, '' ) . . Xml::closeElement( 'div' ); $hiddenMainColumn = json_encode( $hiddenMainColumn ); @@ -1068,12 +1068,17 @@ 'trtd' . $categoryNoHtml[0] . '/tdtd' . $categoryNoHtml[1] . '/td/tr' . '/table' . Xml::closeElement( 'div' ); - $mainLabelDialogBox = Xml::openElement( 'div', - array( 'id' = 'mainlabel-dialog', + + // Create dialog box for QueryMatches + $mainResLabelHtml = Xml::inputLabelSep( wfMsg( 'smw_qui_dlabel' ), '', 'd-mainres-label' ); + $mainResDialogBox = Xml::openElement( 'div', + array( 'id' = 'mainres-dialog', 'title' = wfMsg( 'smw_qui_mainlabopts' ), 'class' = 'smwmainlabdialog' ) ) . - Xml::inputLabel( wfMsg( 'smw_qui_dlabel' ), '', 'd-mainlabel-label' ) . + 'table align=center' . + 'trtd' . $mainResLabelHtml[0] . '/tdtd' . $mainResLabelHtml[1] . '/td/tr' . + '/table' . Xml::closeElement( 'div' ); $result .= 'div id=sorting_main/div' . \n; @@ -1157,6 +1162,13 @@ jQuery('#mainlabel-dialog').dialog(open); } + function smw_makeQueryMatchesDialog( qm_id ){ + qmLabel=jQuery('#maincol_label'+qm_id).attr('value'); + jQuery('#d-mainres-label').attr('value', qmLabel); + jQuery( '#mainres-dialog' ).dialog.sortid = qm_id; + jQuery( '#mainres-dialog' ).dialog( 'open' ); + } + function smw_makeCatDialog( cat_id ){ jQuery( '#prop-cat input' ).attr('value',''); @@ -1319,6 +1331,7 @@ jQuery('$hiddenMainColumn').appendTo(document.body); jQuery('$propertyDialogBox').appendTo(document.body); jQuery('$categoryDialogBox').appendTo(document.body); + jQuery('$mainResDialogBox').appendTo(document.body); jQuery( '#mainlabel-dialog' ).dialog( { autoOpen: false, @@ -1336,6 +1349,24 @@ } } ); + jQuery( '#mainres-dialog' ).dialog( { + autoOpen: false, + modal: true, + resizable: true, + minWidth: 400, + buttons: { + {$okMsg}: function(){ + id = jQuery( this ).dialog.sortid; + label = jQuery('#d-mainres-label'); + jQuery('#maincol_label'+id).attr('value', label); + jQuery(this).dialog(close); + }, +
[MediaWiki-CVS] SVN: [94890] trunk/extensions/SecurePoll/SecurePoll.i18n.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94890 Revision: 94890 Author: churchofemacs Date: 2011-08-18 13:32:17 + (Thu, 18 Aug 2011) Log Message: --- link to special:userlogin Modified Paths: -- trunk/extensions/SecurePoll/SecurePoll.i18n.php Modified: trunk/extensions/SecurePoll/SecurePoll.i18n.php === --- trunk/extensions/SecurePoll/SecurePoll.i18n.php 2011-08-18 13:26:33 UTC (rev 94889) +++ trunk/extensions/SecurePoll/SecurePoll.i18n.php 2011-08-18 13:32:17 UTC (rev 94890) @@ -72,7 +72,7 @@ 'securepoll-api-invalid-params' = 'Invalid parameters.', 'securepoll-api-no-user' = 'No user was found with the given ID.', 'securepoll-api-token-mismatch' = 'Security token mismatch, cannot log in.', - 'securepoll-not-logged-in' = 'You must log in to vote in this election', + 'securepoll-not-logged-in' = 'You must [[Special:Userlogin|log in]] to vote in this election. If you do not yet have an account, you can [[Special:Userlogin/signup|create one]].', 'securepoll-too-few-edits' = 'Sorry, you cannot vote. You need to have made at least $1 {{PLURAL:$1|edit|edits}} to vote in this election, you have made $2.', 'securepoll-too-new' = 'Sorry, you cannot vote. Your account needs to have been registered before $1 to vote in this election, you registered on $2.', 'securepoll-blocked' = 'Sorry, you cannot vote in this election if you are currently blocked from editing.', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94891] trunk/extensions/SemanticSignup/ROADMAP
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94891 Revision: 94891 Author: jeroendedauw Date: 2011-08-18 13:48:18 + (Thu, 18 Aug 2011) Log Message: --- added roadmap Added Paths: --- trunk/extensions/SemanticSignup/ROADMAP Added: trunk/extensions/SemanticSignup/ROADMAP === --- trunk/extensions/SemanticSignup/ROADMAP (rev 0) +++ trunk/extensions/SemanticSignup/ROADMAP 2011-08-18 13:48:18 UTC (rev 94891) @@ -0,0 +1,10 @@ +This is the roadmap for the SemanticSignup extension. + +Extension page on mediawiki.org: http://www.mediawiki.org/wiki/Extension:SemanticSignup +Latest version of the roadmap: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticSignup/ROADMAP?view=co + + +== Version 0.4 == + +* Fix compatibility with Confirm Edit and other captcha extensions. +* Fix loading of obsolete JavaScript and CSS files. ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94892] trunk/extensions/SemanticSignup/RELEASE-NOTES
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94892 Revision: 94892 Author: jeroendedauw Date: 2011-08-18 13:52:18 + (Thu, 18 Aug 2011) Log Message: --- up rel notes Modified Paths: -- trunk/extensions/SemanticSignup/RELEASE-NOTES Modified: trunk/extensions/SemanticSignup/RELEASE-NOTES === --- trunk/extensions/SemanticSignup/RELEASE-NOTES 2011-08-18 13:48:18 UTC (rev 94891) +++ trunk/extensions/SemanticSignup/RELEASE-NOTES 2011-08-18 13:52:18 UTC (rev 94892) @@ -21,6 +21,7 @@ * Moved code to standard i18n, hooks and settings files. * Split DataChecker classes code to separate files. * Make use of semantic extension type. +* Changed the signupfields tag extension into a parser function. * Stylized code. === Version 0.2 === ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94893] trunk/extensions/SemanticMediaWiki/specials/AskSpecial/ SMW_QueryUIHelper.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94893 Revision: 94893 Author: devayon Date: 2011-08-18 13:54:54 + (Thu, 18 Aug 2011) Log Message: --- follow-up r94889 Modified Paths: -- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php Modified: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php === --- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php 2011-08-18 13:52:18 UTC (rev 94892) +++ trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php 2011-08-18 13:54:54 UTC (rev 94893) @@ -941,6 +941,7 @@ // END: create form elements already submitted earlier via form // create hidden form elements to be cloned later + //property $hiddenProperty = Html::openElement( 'div', array( 'id' = 'property_starter', 'style' = 'display:none' ) @@ -967,7 +968,7 @@ Html::hidden( 'prop_limit_num', '' ) . Xml::closeElement( 'div' ); $hiddenProperty = json_encode( $hiddenProperty ); - + //category $hiddenCategory = Html::openElement( 'div', array( 'id' = 'category_starter', 'style' = 'display:none' ) @@ -985,7 +986,7 @@ 'input type=hidden name=cat_no_num /' . Xml::closeElement( 'div' ); $hiddenCategory = json_encode( $hiddenCategory ); - + // For '?' printouts $hiddenMainColumn = Html::openElement( 'div', array( 'id' = 'maincol_starter', 'style' = 'display:none' ) @@ -1001,6 +1002,7 @@ Xml::closeElement( 'div' ); $hiddenMainColumn = json_encode( $hiddenMainColumn ); + //Create dialog-boxes // create dialogbox for Property options $propertyHtml = Xml::inputLabelSep( wfMsg( 'smw_qui_prop' ), '', @@ -1121,13 +1123,6 @@ } ); } - function smwRemoveMainLabel(){ - jQuery( '#mainlabelhid' ).attr( 'value', '-' ); - jQuery( '#mainlabelvis' ).attr( 'value', '' ); - jQuery( '#smwmainlabel' ).hide(); - smw_mainLabelHidden = true; - } - function smw_category_autocomplete(){ jQuery( '[name*=category]' ).autocomplete( { minLength: 2, @@ -1162,6 +1157,13 @@ jQuery('#mainlabel-dialog').dialog(open); } + function smwRemoveMainLabel(){ + jQuery( '#mainlabelhid' ).attr( 'value', '-' ); + jQuery( '#mainlabelvis' ).attr( 'value', '' ); + jQuery( '#smwmainlabel' ).hide(); + } + + function smw_makeQueryMatchesDialog( qm_id ){ qmLabel=jQuery('#maincol_label'+qm_id).attr('value'); jQuery('#d-mainres-label').attr('value', qmLabel); @@ -1278,13 +1280,14 @@ num_elements++; smw_category_autocomplete(); } - var smw_mainLabelHidden=true; + function smw_addMainColInstance(starter_div_id, main_div_id) { - if(smw_mainLabelHidden (jQuery('.smwsort').length==1)){ + if( (jQuery('#smwmainlabel').css('display')=='none') +(jQuery('.smwsort').length==1) + ){ jQuery('#mainlabelhid').attr('value',''); jQuery('#mainlabelvis').attr('value',''); jQuery('#smwmainlabel').show(); - smw_mainLabelHidden=false; } else { if( jQuery( '.smwsort' ).length smwgQPrintoutLimit ){ return; @@ -1308,6 +1311,11 @@ children[x].name = children[x].name.replace(/_num/, '[' + num_elements + ']'); } } + //Create 'options' link + var more_button =document.createElement('span'); + more_button.innerHTML = ' a class=smwq-more href=javascript:smw_makeQueryMatchesDialog(\'' + num_elements + '\'){$optionsMsg}/a '; + more_button.id = 'more'+num_elements; + new_div.appendChild(more_button); //Add the new instance main_div.appendChild(new_div); @@ -1438,9 +1446,6 @@ jQuery(document).ready(smw_property_autocomplete); jQuery(document).ready(smw_category_autocomplete); -
[MediaWiki-CVS] SVN: [94894] trunk/extensions/MetricsReporting
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94894 Revision: 94894 Author: reedy Date: 2011-08-18 13:58:12 + (Thu, 18 Aug 2011) Log Message: --- Add GenericMetricBase for use with generic CSV import (importCSVFile.php) Should be reasonably usable Modified Paths: -- trunk/extensions/MetricsReporting/GenericDataTable.sql trunk/extensions/MetricsReporting/MetricsReporting.php Added Paths: --- trunk/extensions/MetricsReporting/metrics/GenericMetricBase.php Modified: trunk/extensions/MetricsReporting/GenericDataTable.sql === --- trunk/extensions/MetricsReporting/GenericDataTable.sql 2011-08-18 13:54:54 UTC (rev 94893) +++ trunk/extensions/MetricsReporting/GenericDataTable.sql 2011-08-18 13:58:12 UTC (rev 94894) @@ -4,6 +4,6 @@ `project_code` varchar (10) DEFAULT NULL, `country_code` varchar (3) DEFAULT NULL, `value` bigint (12),-- Needs to be decimal? - PRIMARY KEY (date,language_code,project_code,country_code,value), + PRIMARY KEY ( date, language_code, project_code, country_code, value ), -- More indexes may be needed where language, project and country could be null ) ; \ No newline at end of file Modified: trunk/extensions/MetricsReporting/MetricsReporting.php === --- trunk/extensions/MetricsReporting/MetricsReporting.php 2011-08-18 13:54:54 UTC (rev 94893) +++ trunk/extensions/MetricsReporting/MetricsReporting.php 2011-08-18 13:58:12 UTC (rev 94894) @@ -33,6 +33,8 @@ $metricsDir = $dir . 'metrics/'; +$wgAutoloadClasses['GenericMetricBase'] = $metricsDir . 'GenericMetricBase.php'; + $wgAutoloadClasses['ComScoreReachPercentageMetric'] = $metricsDir . 'ComScoreReachPercentageMetric.php'; $wgMetricAPIModules['comscorereachpercentage'] = 'ComScoreReachPercentageMetric'; Added: trunk/extensions/MetricsReporting/metrics/GenericMetricBase.php === --- trunk/extensions/MetricsReporting/metrics/GenericMetricBase.php (rev 0) +++ trunk/extensions/MetricsReporting/metrics/GenericMetricBase.php 2011-08-18 13:58:12 UTC (rev 94894) @@ -0,0 +1,47 @@ +?php + +/** + * Subclass this, pass the table name to the constructor, then just override + * the getDescription and getExamples functions + * + * Then add it to the loader + */ +abstract class GenericMetricBase extends ApiAnalyticsBase { + + protected $tableName; + + /** +* @param $tableName string +*/ + function __construct( $tableName ) { + $this-tableName = $tableName; + } + + public function getAllowedFilters() { + return array( + 'selectprojects', + 'selectcountries', + ); + } + + protected function getQueryInfo() { + return array( + 'table' = array( $this-tableName ), + 'conds' = array(), + 'options' = array( 'GROUP BY' = 'date', 'ORDER BY' = 'date' ), + 'join_conds' = array(), + ); + } + + protected function getQueryFields() { + return array( 'date', 'language_code', 'project_code', 'country_code', 'value' ); + } + + public abstract function getDescription(); + + protected abstract function getExamples(); + + public function getVersion() { + return __CLASS__ . ': $Id$'; + } +} \ No newline at end of file Property changes on: trunk/extensions/MetricsReporting/metrics/GenericMetricBase.php ___ Added: svn:keywords + Id 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: [94895] trunk/extensions/SemanticMediaWiki/skins/elastic/jquery. elastic.source.js
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94895 Revision: 94895 Author: devayon Date: 2011-08-18 13:59:36 + (Thu, 18 Aug 2011) Log Message: --- rem dead code Modified Paths: -- trunk/extensions/SemanticMediaWiki/skins/elastic/jquery.elastic.source.js Modified: trunk/extensions/SemanticMediaWiki/skins/elastic/jquery.elastic.source.js === --- trunk/extensions/SemanticMediaWiki/skins/elastic/jquery.elastic.source.js 2011-08-18 13:58:12 UTC (rev 94894) +++ trunk/extensions/SemanticMediaWiki/skins/elastic/jquery.elastic.source.js 2011-08-18 13:59:36 UTC (rev 94895) @@ -128,9 +128,9 @@ $textarea.css({'overflow':'hidden'}); // Update textarea size on keyup, change, cut and paste - $textarea.bind('keyup change cut paste', function(){ - update(); - }); + //$textarea.bind('keyup change cut paste', function(){ + // setTimeout( update, 1 ); + //}); // Update width of twin if browser or textarea is resized (solution for textareas with widths in percent) jQuery(window).bind('resize', setTwinWidth); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94896] trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94896 Revision: 94896 Author: reedy Date: 2011-08-18 15:03:23 + (Thu, 18 Aug 2011) Log Message: --- Add some newlines to output Add commented examples how to get Worksheet, list of cell based feeds from the google documents spreadhseet api Modified Paths: -- trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php Modified: trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php === --- trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php 2011-08-18 13:59:36 UTC (rev 94895) +++ trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php 2011-08-18 15:03:23 UTC (rev 94896) @@ -61,20 +61,33 @@ $node = new SimpleXMLElement( $reader-readOuterXML() ); - //$src = (string)$node-content[src]; - $src = $node-content-attributes()-src; - $this-output( 'Worksheet found: ' . $src ); + // Worksheet based feed + // $src = (string)$node-link[2]['href']; + //$src = $node-link[2]-attributes()-href; + + // List based feed + // $src = (string)$node-content[src]; + // $src = $node-content-attributes()-src; + + // Cell based feed + // $src = (string)$node-link[href]; + // $src = $node-link-attributes()-href; + + $this-output( 'Worksheet found: ' . $src . \n ); $worksheets[] = $src; // go to next entry / $reader-next( 'entry' ); } + $this-output( \n ); + foreach( $worksheets as $sheet ) { $http = $this-buildAuthedRequest( $sheet, $authToken, $cookies ); $http-execute(); $content = $http-getContent(); var_dump( $this-formatXmlString( $content ) ); + $this-output( \n ); } $this-output( Finished!\n ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94897] trunk/extensions/PageSchemas
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94897 Revision: 94897 Author: ankitgarg833 Date: 2011-08-18 15:33:07 + (Thu, 18 Aug 2011) Log Message: --- Some minor fixes. Modified Paths: -- trunk/extensions/PageSchemas/PS_Tabs.php trunk/extensions/PageSchemas/PageSchemas.classes.php trunk/extensions/PageSchemas/PageSchemas.hooks.php trunk/extensions/PageSchemas/PageSchemas.i18n.php trunk/extensions/PageSchemas/PageSchemas.php trunk/extensions/PageSchemas/specials/PS_EditSchema.php Modified: trunk/extensions/PageSchemas/PS_Tabs.php === --- trunk/extensions/PageSchemas/PS_Tabs.php2011-08-18 15:03:23 UTC (rev 94896) +++ trunk/extensions/PageSchemas/PS_Tabs.php2011-08-18 15:33:07 UTC (rev 94897) @@ -5,17 +5,15 @@ * * @since 0.1 * - * @file Push_Tab.php - * @ingroup Push + * @file _Tab.php + * @ingroup * * @author ankit */ final class PSTabs { - /** -* Adds an action (i.e., a tab) to allow pushing the current article. -*/ - public static function displayTab( $obj, $content_actions ) { + + public static function displayTabs( $obj, $content_actions ) { global $wgUser; // Make sure that this is not a special page, the page has contents, and the user can push. @@ -54,34 +52,30 @@ * Function currently called only for the 'Vector' skin, added in * MW 1.16 - will possibly be called for additional skins later */ - public static function displayTab2( $obj, $links ) { + public static function displayTabs2( $obj, $links ) { // The old '$content_actions' array is thankfully just a sub-array of this one $views_links = $links['actions']; - self::displayTab( $obj, $views_links ); + self::displayTabs( $obj, $views_links ); $links['actions'] = $views_links; return true; } - /** -* Handle actions not known to MediaWiki. If the action is push, -* display the push page by calling the displayPushPage method. -* -* @param string $action -* @param Article $article + /** * * @return true */ public static function onUnknownAction( $action, Article $article ) { $title = $article-getTitle(); $category = $title-getText(); - if ( $action == 'generatepages' ) { - $gen_page = new GeneratePages(); - return $gen_page-execute($category); - } - else if( $action == 'editschema' ) { - $edit_schema = new EditSchema(); - return $edit_schema-execute($category); - } +if ( $action == 'generatepages' ) { +$gen_page = new GeneratePages(); +$gen_page-execute($category); +return false; + } elseif ( $action == 'editschema' ) { +$edit_schema = new EditSchema(); +$edit_schema-execute($category); +return false; +} return true; } } \ No newline at end of file Modified: trunk/extensions/PageSchemas/PageSchemas.classes.php === --- trunk/extensions/PageSchemas/PageSchemas.classes.php2011-08-18 15:03:23 UTC (rev 94896) +++ trunk/extensions/PageSchemas/PageSchemas.classes.php2011-08-18 15:33:07 UTC (rev 94897) @@ -111,7 +111,7 @@ // for now - this may change later // hide parsing warnings libxml_use_internal_errors(true); - $xml_success = simplexml_load_string($xmlDTD . $xml); + $xml_success = simplexml_load_string($xmlDTD.$xml); $errors = libxml_get_errors(); $error_msg = $errors[0]-message; return $xml_success; @@ -144,8 +144,8 @@ $text = pSchema description:/p\n; $text .= table class=\pageSchema\\n; $name = $class_schema_xml-attributes()-name; - $text .= self::tableRowHTML('paramGroup', 'PageSchema', $name); - foreach ( $class_schema_xml-children() as $tag = $child ) { + $text .= self::tableRowHTML('paramGroup', 'PageSchema', $name); + foreach ( $class_schema_xml-children() as $tag = $child ) { if ( $tag == 'Form' ){ $text .= self::parseFormElem($child); } Modified: trunk/extensions/PageSchemas/PageSchemas.hooks.php
[MediaWiki-CVS] SVN: [94898] trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94898 Revision: 94898 Author: ashley Date: 2011-08-18 15:33:25 + (Thu, 18 Aug 2011) Log Message: --- SocialProfile: follow-up to r90537, r90547, r94139: remove unused global Modified Paths: -- trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php Modified: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php === --- trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php 2011-08-18 15:33:07 UTC (rev 94897) +++ trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php 2011-08-18 15:33:25 UTC (rev 94898) @@ -779,7 +779,7 @@ */ function getProfileTop( $user_id, $user_name ) { global $wgTitle, $wgUser, $wgLang; - global $wgUserLevels, $wgEnableUserStatus; + global $wgUserLevels; $stats = new UserStats( $user_id, $user_name ); $stats_data = $stats-getUserStats(); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94899] trunk/extensions/PageSchemas/specials/PS_EditSchema.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94899 Revision: 94899 Author: ankitgarg833 Date: 2011-08-18 15:37:35 + (Thu, 18 Aug 2011) Log Message: --- minor fix. Modified Paths: -- trunk/extensions/PageSchemas/specials/PS_EditSchema.php Modified: trunk/extensions/PageSchemas/specials/PS_EditSchema.php === --- trunk/extensions/PageSchemas/specials/PS_EditSchema.php 2011-08-18 15:33:25 UTC (rev 94898) +++ trunk/extensions/PageSchemas/specials/PS_EditSchema.php 2011-08-18 15:37:35 UTC (rev 94899) @@ -325,7 +325,7 @@ ); //first row of the result set $row = $dbr-fetchRow( $res ); - if( $row == null ){ + if( $row == null !$title-exists() ){ //Create form here, Cat doesnt exist, create new cat with this text $text_1 .= $text; $wgOut-addHTML( $text_1 ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94900] trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94900 Revision: 94900 Author: ankitgarg833 Date: 2011-08-18 15:38:31 + (Thu, 18 Aug 2011) Log Message: --- minor fix. Modified Paths: -- trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php === --- trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php 2011-08-18 15:37:35 UTC (rev 94899) +++ trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php 2011-08-18 15:38:31 UTC (rev 94900) @@ -574,7 +574,7 @@ foreach ( $wgRequest-getValues() as $var = $val ) { if(substr($var,0,18) == 'smw_property_name_'){ $templateNum = substr($var,18,1); - $Xmltext .= 'semanticmediawiki:Property name='.$val.''; + $Xmltext .= 'semanticmediawiki:Property name='.$val.' '; }else if(substr($var,0,18) == 'smw_property_type_'){ $Xmltext .= 'Type'.$val.'/Type'; }else if(substr($var,0,11) == 'smw_values_'){ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94901] trunk/extensions/SemanticForms/includes/SF_Utils.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94901 Revision: 94901 Author: ankitgarg833 Date: 2011-08-18 15:39:05 + (Thu, 18 Aug 2011) Log Message: --- adding cosmetic changes. Modified Paths: -- trunk/extensions/SemanticForms/includes/SF_Utils.php Modified: trunk/extensions/SemanticForms/includes/SF_Utils.php === --- trunk/extensions/SemanticForms/includes/SF_Utils.php2011-08-18 15:38:31 UTC (rev 94900) +++ trunk/extensions/SemanticForms/includes/SF_Utils.php2011-08-18 15:39:05 UTC (rev 94901) @@ -256,10 +256,10 @@ $form_array = $obj['sf']; $form_html_text .= 'fieldset style=background: #CF9;legendForm/legend - p Name: input size=15 name=sf_form_name_starter value= '.$form_array['name'].' /p + p Name: input size=15 name=sf_form_name_starter value= '.$form_array['name'].' /p p Page name formula: input size=20 name=sf_page_name_formula_starter value='.$form_array['PageNameFormula'].' /p - p Create tite: input size=25 name=sf_create_title_starter value='.$form_array['CreateTite'].' /p - p Edit title: input size=25 name=sf_edit_title_starter value='.$form_array['EditTitle'].' /p + p Title of form for new pages: input size=25 name=sf_create_title_starter value='.$form_array['CreateTite'].' /p + p Title of form for existing pages:input size=25 name=sf_edit_title_starter value='.$form_array['EditTitle'].' /p /fieldset'; foreach ( $template_all as $template ) { $field_all = $template-getFields(); @@ -292,13 +292,12 @@ } public static function getHtmlTextForPS( $js_extensions ,$text_extensions ) { $html_text = ; - $form_text = ; - //'fieldset style=background: #00FF00;plegendForm input/legend /p + $form_text = ; $form_text .= 'fieldset style=background: #00FF00;legendForm/legend - p Name: input size=15 name=sf_form_name_starter/p + p Name: input size=15 name=sf_form_name_starter/p p Page name formula: input size=20 name=sf_page_name_formula_starter/p - p Create tite: input size=25 name=sf_create_title_starter/p - p Edit title: input size=25 name=sf_edit_title_starter/p + p Title of form for new pages: input size=25 name=sf_create_title_starter/p + p Title of form for existing pages:input size=25 name=sf_edit_title_starter/p /fieldset'; $html_text .= 'fieldset style=background: #00FF00; legendForm input/legend ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94902] trunk/extensions/SemanticDrilldown/includes/SD_Utils.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94902 Revision: 94902 Author: ankitgarg833 Date: 2011-08-18 15:39:29 + (Thu, 18 Aug 2011) Log Message: --- adding few cosmetic changes. Modified Paths: -- trunk/extensions/SemanticDrilldown/includes/SD_Utils.php Modified: trunk/extensions/SemanticDrilldown/includes/SD_Utils.php === --- trunk/extensions/SemanticDrilldown/includes/SD_Utils.php2011-08-18 15:39:05 UTC (rev 94901) +++ trunk/extensions/SemanticDrilldown/includes/SD_Utils.php2011-08-18 15:39:29 UTC (rev 94902) @@ -151,12 +151,12 @@ $html_text .= 'option selected value='.$combo_box_value.''.$combo_box_label.'/option option value='.$date_range_value.''.$date_range_label.'/option /select - /p'; + /p/fieldset'; }else if( $input_type_val == $date_range_value ){ $html_text .= 'option value='.$combo_box_value.''.$combo_box_label.'/option option selected value='.$date_range_value.''.$date_range_label.'/option /select - /p'; + /p/fieldset'; }else{ $html_text .= 'option value='.$combo_box_value.''.$combo_box_label.'/option option value='.$date_range_value.''.$date_range_label.'/option ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94903] trunk/extensions/SocialProfile/UserStatus
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94903 Revision: 94903 Author: ashley Date: 2011-08-18 15:52:27 + (Thu, 18 Aug 2011) Log Message: --- SocialProfile: make Special:UserStatus a listed special page, add standard checks (block+DB read-only mode) and move some hardcoded English texts into the i18n file Modified Paths: -- trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php Modified: trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php === --- trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php 2011-08-18 15:39:29 UTC (rev 94902) +++ trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php 2011-08-18 15:52:27 UTC (rev 94903) @@ -1,26 +1,53 @@ ?php -class SpecialUserStatus extends UnlistedSpecialPage { +class SpecialUserStatus extends SpecialPage { /** -* Constructor +* Constructor -- set up the new special page */ public function __construct() { - global $wgOut, $wgScriptPath; - - parent::__construct( 'UserStatus' ); - $wgOut-addScriptFile( $wgScriptPath . '/extensions/SocialProfile/UserStatus/UserStatus.js' ); + parent::__construct( 'UserStatus', 'delete-status-update' ); } + /** +* Show the special page +* +* @param $params Mixed: parameter(s) passed to the special page or null +*/ public function execute( $params ) { - global $wgOut,$wgUser; - if ( $wgUser-isAllowed( 'delete-status-update' ) ) { - $output = Enter username: input type=\text\ id=\us-name-input\ ; - $output .= input type=\button\ value=\Find\ onclick=\javascript:UserStatus.specialGetHistory();\; - $output .= div id=\us-special\ /div; - $wgOut-addHTML($output); + global $wgOut, $wgScriptPath, $wgUser; + + // Make sure that the user is allowed to access this special page + if( !$wgUser-isAllowed( 'delete-status-update' ) ) { + $wgOut-permissionRequired( 'delete-status-update' ); + return false; } - return; + + // Blocked through Special:Block? No access for you either! + if( $wgUser-isBlocked() ) { + $wgOut-blockedPage( false ); + return false; + } + + // Is the database locked or not? + if( wfReadOnly() ) { + $wgOut-readOnlyPage(); + return false; + } + + // Set the page title and robot policies + $this-setHeaders(); + + // Add required JS file + $wgOut-addScriptFile( $wgScriptPath . '/extensions/SocialProfile/UserStatus/UserStatus.js' ); + + // Build and output the form for deleting users' status updates + $output = wfMsg( 'userstatus-enter-username' ) . + ' input type=text id=us-name-input / '; + $output .= 'input type=button value=' . + wfMsg( 'userstatus-find' ) . ' onclick=javascript:UserStatus.specialGetHistory(); /'; + $output .= 'div id=us-special /div'; + $wgOut-addHTML( $output ); } - + } Modified: trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php === --- trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php 2011-08-18 15:39:29 UTC (rev 94902) +++ trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php 2011-08-18 15:52:27 UTC (rev 94903) @@ -12,6 +12,9 @@ * @author Yevhenii Vlasenko */ $messages['en'] = array( + 'userstatus' = 'Delete status updates', + 'userstatus-enter-username' = 'Enter username:', + 'userstatus-find' = 'Find', 'userstatus-edit' = 'Edit', 'userstatus-save' = 'Save', 'userstatus-cancel' = 'Cancel', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94904] trunk/tools/ToolserverI18N/language/messages/Commonshelper2. i18n.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94904 Revision: 94904 Author: jan Date: 2011-08-18 16:11:21 + (Thu, 18 Aug 2011) Log Message: --- Update messages for CommonsHelper2 Modified Paths: -- trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php Modified: trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php === --- trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php 2011-08-18 15:52:27 UTC (rev 94903) +++ trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php 2011-08-18 16:11:21 UTC (rev 94904) @@ -73,7 +73,13 @@ 'upload_control_text'= 'Please check the new wiki text and click $1 if all is OK!', 'error_commons_user' = 'To identify the transfer user, your Wikimedia Commons username has to be in the description!', 'error_upload_users' = 'The upload function is only available to some users during the test period!', - 'error_upload_file' = 'The original file cannot be downloaded.' + 'error_upload_file' = 'The original file cannot be downloaded.', + + //Help + 'help_intro' = 'When you want to report a bug, suggest a feature or have a question, you can use one of the contact types below:', + 'help_jira' = '$1JIRA (you need an account)$2 (Project: Commonshelper2)', + 'help_mail' = 'Send a mail to $1', + 'help_commons' = '$1Add a post on Commons$2' ); /** Message documentation (Message documentation) @@ -118,6 +124,9 @@ 'error_tusc_failed' = ' {{hint-TUSC}}', 'upload_control_text' = '$1 is be the same as in the message {{msg-toolserver|Commonshelper2-upload_submit}}', + 'help_jira' = '$1 and $2 are for a clickable link ($1 is the start of the link, $2 the end of the link). The target of the link is https://jira.toolserver.org/secure/CreateIssue!default.jspa.', + 'help_mail' = '$1 is the mail address.', + 'help_commons' = '$1 and $2 are for a clickable link ($1 is the start of the link, $2 the end of the link). The target of the link is http://commons.wikimedia.org/wiki/Commons_talk:CommonsHelper_2.' ); /** Afrikaans (Afrikaans) ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94905] trunk/extensions/SocialProfile/UserBoard/SpecialSendBoardBlast .php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94905 Revision: 94905 Author: ashley Date: 2011-08-18 16:21:54 + (Thu, 18 Aug 2011) Log Message: --- SocialProfile: don't allow the user to access Special:SendBoardBlast if 1) the user in question is blocked or 2) if the database is locked Modified Paths: -- trunk/extensions/SocialProfile/UserBoard/SpecialSendBoardBlast.php Modified: trunk/extensions/SocialProfile/UserBoard/SpecialSendBoardBlast.php === --- trunk/extensions/SocialProfile/UserBoard/SpecialSendBoardBlast.php 2011-08-18 16:11:21 UTC (rev 94904) +++ trunk/extensions/SocialProfile/UserBoard/SpecialSendBoardBlast.php 2011-08-18 16:21:54 UTC (rev 94905) @@ -27,12 +27,6 @@ public function execute( $params ) { global $wgRequest, $wgOut, $wgUser, $wgUserBoardScripts; - // Add CSS JS - $wgOut-addExtensionStyle( $wgUserBoardScripts . '/BoardBlast.css' ); - $wgOut-addScriptFile( $wgUserBoardScripts . '/BoardBlast.js' ); - - $output = ''; - // This feature is available only to logged-in users. if ( !$wgUser-isLoggedIn() ) { $wgOut-setPageTitle( wfMsg( 'boardblastlogintitle' ) ); @@ -40,6 +34,24 @@ return ''; } + // Is the database locked? + if( wfReadOnly() ) { + $wgOut-readOnlyPage(); + return false; + } + + // Blocked through Special:Block? No access for you! + if( $wgUser-isBlocked() ) { + $wgOut-blockedPage( false ); + return false; + } + + // Add CSS JS + $wgOut-addExtensionStyle( $wgUserBoardScripts . '/BoardBlast.css' ); + $wgOut-addScriptFile( $wgUserBoardScripts . '/BoardBlast.js' ); + + $output = ''; + if ( $wgRequest-wasPosted() ) { $wgOut-setPageTitle( wfMsg( 'messagesenttitle' ) ); $b = new UserBoard(); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94906] trunk/extensions/SocialProfile/UserStatus
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94906 Revision: 94906 Author: ashley Date: 2011-08-18 16:35:31 + (Thu, 18 Aug 2011) Log Message: --- SocialProfile: in UserStatus, moved the public history button from JS to PHP, added some tr and td tags around the no status history message in wfGetHistory, made it so that the owner of a status update and anons can't like the status update, removed unused JS globals and renamed the method which outputs the new JS global and added some wfReadOnly() checks Modified Paths: -- trunk/extensions/SocialProfile/UserStatus/UserStatus.js trunk/extensions/SocialProfile/UserStatus/UserStatus_AjaxFunctions.php Modified: trunk/extensions/SocialProfile/UserStatus/UserStatus.js === --- trunk/extensions/SocialProfile/UserStatus/UserStatus.js 2011-08-18 16:21:54 UTC (rev 94905) +++ trunk/extensions/SocialProfile/UserStatus/UserStatus.js 2011-08-18 16:35:31 UTC (rev 94906) @@ -23,11 +23,6 @@ document.getElementById( 'status-letter-count' ).innerHTML = len + ' ' + _US_LETTERS; }, - publicHistoryButton: function( id ) { - document.getElementById( 'user-status-block' ).innerHTML += - 'br / a class=us-link href=javascript:UserStatus.useHistory(' + id + ');' + _US_HISTORY + '/a'; - }, - /** * Enter the edit mode by hiding the current status message and displaying * the hidden input field which allows the user to enter a new status @@ -79,14 +74,14 @@ historyBlock.id = 'status-history-block'; statusBlock.appendChild( historyBlock ); } - - if ( historyBlock.style.display == block ) { - historyBlock.style.display = none; + + if ( historyBlock.style.display == 'block' ) { + historyBlock.style.display = 'none'; } else { - //This call should be here, as it fixes bug, - //when history does not change after first status save + // This call should be here, as it fixes bug, + // when history does not change after first status save sajax_do_call( 'wfGetHistory', [id], historyBlock ); - historyBlock.style.display = block; + historyBlock.style.display = 'block'; } }, @@ -101,7 +96,7 @@ document.getElementById( 'user-status-input' ).value = jQuery( '#status-history-entry-' + statusId ).text(); }, - + like: function( userID, messageID ) { var div = document.getElementById( 'like-status-' + messageID ); sajax_do_call( 'wfStatusLike', [userID, messageID], div ); Modified: trunk/extensions/SocialProfile/UserStatus/UserStatus_AjaxFunctions.php === --- trunk/extensions/SocialProfile/UserStatus/UserStatus_AjaxFunctions.php 2011-08-18 16:21:54 UTC (rev 94905) +++ trunk/extensions/SocialProfile/UserStatus/UserStatus_AjaxFunctions.php 2011-08-18 16:35:31 UTC (rev 94906) @@ -11,7 +11,7 @@ // Would probably be best to pass an edit token here, like most other MW // forms do - if ( $u_id == $wgUser-getId() ) { + if ( $u_id == $wgUser-getId() !wfReadOnly() ) { // Decode what we encoded in JS, UserStatus.saveStatus; this is safe // because the Database class that UserStatusClass uses for its DB queries // will do all the escaping for us. @@ -41,7 +41,7 @@ $output = 'table id=user-status-history'; if ( empty( $historyArray ) ) { - $output .= 'No status history.'; + $output .= 'trtdNo status history./td/tr'; } else { foreach ( $historyArray as $row ) { $us = htmlspecialchars( $row['ush_status'] ); @@ -55,19 +55,27 @@ $href = ' href=javascript:UserStatus.insertStatusFromHistory(' . $status_id . ');'; } - + + $likeSymbol = '#9829;'; + // Don't allow 1) the owner of the status update or 2) anonymous + // users to like the status + if ( !( $wgUser-getId() == $u_id ) $wgUser-isLoggedIn() ) { + $likeSymbol = 'a href=javascript:UserStatus.like(' . + $wgUser-getId() . ',' . $status_id . ');#9829;/a'; + } + $output .= 'tr td width=60 id=status-history-time' .
[MediaWiki-CVS] SVN: [94907] trunk
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94907 Revision: 94907 Author: nikerabbit Date: 2011-08-18 16:41:07 + (Thu, 18 Aug 2011) Log Message: --- Attempt to fix Bug 30216 - Improve language fallback loop detection. Made fallbacks a list per language, instead of scanning them recursively through the languages. Modified Paths: -- trunk/extensions/Translate/groups/ComplexMessages.php trunk/extensions/Translate/utils/TranslationHelpers.php trunk/extensions/cldr/LanguageNames.body.php trunk/phase3/includes/api/ApiQuerySiteinfo.php trunk/phase3/languages/Language.php trunk/phase3/languages/messages/MessagesAls.php trunk/phase3/languages/messages/MessagesBat_smg.php trunk/phase3/languages/messages/MessagesFiu_vro.php trunk/phase3/languages/messages/MessagesGan.php trunk/phase3/languages/messages/MessagesGan_hant.php trunk/phase3/languages/messages/MessagesIi.php trunk/phase3/languages/messages/MessagesKaa.php trunk/phase3/languages/messages/MessagesKk_cn.php trunk/phase3/languages/messages/MessagesKk_tr.php trunk/phase3/languages/messages/MessagesMap_bms.php trunk/phase3/languages/messages/MessagesQug.php trunk/phase3/languages/messages/MessagesRue.php trunk/phase3/languages/messages/MessagesRuq.php trunk/phase3/languages/messages/MessagesTt.php trunk/phase3/languages/messages/MessagesZh_hk.php trunk/phase3/languages/messages/MessagesZh_mo.php trunk/phase3/languages/messages/MessagesZh_my.php trunk/phase3/languages/messages/MessagesZh_tw.php Modified: trunk/extensions/Translate/groups/ComplexMessages.php === --- trunk/extensions/Translate/groups/ComplexMessages.php 2011-08-18 16:35:31 UTC (rev 94906) +++ trunk/extensions/Translate/groups/ComplexMessages.php 2011-08-18 16:41:07 UTC (rev 94907) @@ -102,13 +102,15 @@ $current = $this-cleanData( $defs, $current ); $chain = $current; - while ( $this-chainable $code = Language::getFallbackFor( $code ) ) { - $fbdata = $this-readVariable( $group, $code ); - if ( $this-firstMagic ) { - $fbdata = $this-cleanData( $defs, $fbdata ); + if ( $this-chainable } { + foreach ( Language::getFallbackFors( $code ) as $code ) { + $fbdata = $this-readVariable( $group, $code ); + if ( $this-firstMagic ) { + $fbdata = $this-cleanData( $defs, $fbdata ); + } + + $chain = array_merge_recursive( $chain, $fbdata ); } - - $chain = array_merge_recursive( $chain, $fbdata ); } if ( $this-firstMagic ) { Modified: trunk/extensions/Translate/utils/TranslationHelpers.php === --- trunk/extensions/Translate/utils/TranslationHelpers.php 2011-08-18 16:35:31 UTC (rev 94906) +++ trunk/extensions/Translate/utils/TranslationHelpers.php 2011-08-18 16:41:07 UTC (rev 94907) @@ -995,11 +995,16 @@ $fallbacks = (array) $wgTranslateLanguageFallbacks[$code]; } - // And the real fallback - // TODO: why only one? - $realFallback = $code ? Language::getFallbackFor( $code ) : false; - if ( $realFallback $realFallback !== 'en' ) { - $fallbacks = array_merge( array( $realFallback ), $fallbacks ); + // BC 1.19 + if ( method_exists( 'Language', 'getFallbacksFor' ) ) { + $list = Language::getFallbacskFor( $code ); + array_pop( $list ); // Get 'en' away from the end + $fallbacks = array_merge( $list , $fallbacks ); + } else { + $realFallback = $code ? Language::getFallbackFor( $code ) : false; + if ( $realFallback $realFallback !== 'en' ) { + $fallbacks = array_merge( array( $realFallback ), $fallbacks ); + } } return $fallbacks; Modified: trunk/extensions/cldr/LanguageNames.body.php === --- trunk/extensions/cldr/LanguageNames.body.php2011-08-18 16:35:31 UTC (rev 94906) +++ trunk/extensions/cldr/LanguageNames.body.php2011-08-18 16:41:07 UTC (rev 94907) @@ -25,9 +25,9 @@ if ( $fbMethod === self::FALLBACK_NATIVE ) { $names = array_merge( $native, $xx ); } elseif ( $fbMethod === self::FALLBACK_NORMAL ) { - $fallback = $code; +
[MediaWiki-CVS] SVN: [94908] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94908 Revision: 94908 Author: nikerabbit Date: 2011-08-18 16:43:24 + (Thu, 18 Aug 2011) Log Message: --- * (bug 30217) Make pt-br a fallback of pt Depends on r94907. Modified Paths: -- trunk/phase3/RELEASE-NOTES-1.19 trunk/phase3/languages/messages/MessagesPt.php Modified: trunk/phase3/RELEASE-NOTES-1.19 === --- trunk/phase3/RELEASE-NOTES-1.19 2011-08-18 16:41:07 UTC (rev 94907) +++ trunk/phase3/RELEASE-NOTES-1.19 2011-08-18 16:43:24 UTC (rev 94908) @@ -83,6 +83,7 @@ * Kichwa (qug) (new). * Uighur (Latin) (ug-latn) was incorrectly marked as right-to-left language. +* (bug 30217) Make pt-br a fallback of pt === Other changes in 1.19 === * jquery.mwPrototypes module was renamed to jquery.mwExtension. Modified: trunk/phase3/languages/messages/MessagesPt.php === --- trunk/phase3/languages/messages/MessagesPt.php 2011-08-18 16:41:07 UTC (rev 94907) +++ trunk/phase3/languages/messages/MessagesPt.php 2011-08-18 16:43:24 UTC (rev 94908) @@ -44,6 +44,8 @@ * @author 555 */ +$fallback = 'pt-br'; + $namespaceNames = array( NS_MEDIA= 'Multimédia', NS_SPECIAL = 'Especial', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94909] trunk/extensions/SocialProfile/SocialProfile.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94909 Revision: 94909 Author: ashley Date: 2011-08-18 16:44:55 + (Thu, 18 Aug 2011) Log Message: --- SocialProfile: running core maintenance/update.php should create all UserStatus tables, not just one of them Modified Paths: -- trunk/extensions/SocialProfile/SocialProfile.php Modified: trunk/extensions/SocialProfile/SocialProfile.php === --- trunk/extensions/SocialProfile/SocialProfile.php2011-08-18 16:43:24 UTC (rev 94908) +++ trunk/extensions/SocialProfile/SocialProfile.php2011-08-18 16:44:55 UTC (rev 94909) @@ -243,6 +243,8 @@ efSocialProfileDBUpdate( $updater, 'gift', $dir/UserGifts/usergifts$dbExt.sql ); efSocialProfileDBUpdate( $updater, 'user_system_messages', $dir/UserSystemMessages/user_system_messages$dbExt.sql ); efSocialProfileDBUpdate( $updater, 'user_status', $dir/UserStatus/userstatus$dbExt.sql ); + efSocialProfileDBUpdate( $updater, 'user_status_history', $dir/UserStatus/userstatus$dbExt.sql ); + efSocialProfileDBUpdate( $updater, 'user_status_likes', $dir/UserStatus/userstatus$dbExt.sql ); return true; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94910] trunk/tools/wsor
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94910 Revision: 94910 Author: giovanni Date: 2011-08-18 17:07:05 + (Thu, 18 Aug 2011) Log Message: --- created folder contribution_inequality and added query files Added Paths: --- trunk/tools/wsor/contribution_inequality/ trunk/tools/wsor/contribution_inequality/create.sql trunk/tools/wsor/contribution_inequality/query.py trunk/tools/wsor/contribution_inequality/queryall.sh Added: trunk/tools/wsor/contribution_inequality/create.sql === --- trunk/tools/wsor/contribution_inequality/create.sql (rev 0) +++ trunk/tools/wsor/contribution_inequality/create.sql 2011-08-18 17:07:05 UTC (rev 94910) @@ -0,0 +1,133 @@ +drop table if exists giovanni.policy_contributors; + +create table giovanni.policy_contributors select +page_title as title, +page_namespace as namespace, +rev_user as user_id, +rev_user_text user_name, +year(rev_timestamp) as year, +count(*) as editcount +from revision join page +on rev_page = page_id +where page_title in ( +Notability, +Verifiability, +No_original_research, +Neutral_point_of_view, +Article_titles, +What_Wikipedia_is_not, +Wikipedia_is_not_a_dictionary, +Biographies_of_living_persons, +Consensus, +Ignore_all_rules, +Deletion_policy, +Criteria_for_speedy_deletion, +Proposed_deletion, +Editing_policy, +Citing_sources, +Disambiguation, +Edit_warring, +Civility, +No_legal_threats, +No_personal_attacks, +Ownership_of_articles, +Sock_puppetry, +Conflict_of_interest, +Do_not_disrupt_Wikipedia_to_illustrate_a_point, +Etiquette, +Gaming_the_system, +Manual_of_Style, +Manual_of_Style_(abbreviations), +Manual_of_Style_(accessibility), +Manual_of_Style_(article_message_boxes), +Manual_of_Style_(biographies), +Manual_of_Style_(capital_letters), +Manual_of_Style_(captions), +Manual_of_Style_(dates_and_numbers), +Manual_of_Style_(disambiguation_pages), +Manual_of_Style_(embedded_lists), +Manual_of_Style_(footnotes), +Manual_of_Style_(icons), +Manual_of_Style_(infoboxes), +Manual_of_Style_(layout), +Manual_of_Style_(lead_section), +Manual_of_Style_(linking), +Manual_of_Style_(lists), +Manual_of_Style_(lists_of_works), +Manual_of_Style_(pronunciation), +Manual_of_Style_(proper_names), +Manual_of_Style_(self-references_to_avoid), +Manual_of_Style_(spelling), +Manual_of_Style_(summary_style), +Manual_of_Style_(tables), +Manual_of_Style_(text_formatting), +Manual_of_Style_(titles), +Manual_of_Style_(trademarks), +Manual_of_Style_(trivia_sections), +Manual_of_Style_(words_to_watch), +Help_desk, +Reference_desk/Computing, +Reference_desk/Entertainment, +Reference_desk/Humanities, +Reference_desk/Language, +Reference_desk/Mathematics, +Reference_desk/Science, +Reference_desk/Miscellaneous, +Editor%27s_index_to_Wikipedia, +Copyright_problems, +Contributor_copyright_investigations, +External_links/Noticeboard, +Fringe_theories/Noticeboard, +Neutral_point_of_view/Noticeboard, +Reliable_sources/Noticeboard, +Administrator_intervention_against_vandalism, +Arbitration_Committee/Noticeboard, +Arbitration/Requests/Enforcement, +Arbitration/Requests, +Editor_review, +Dispute_resolution_noticeboard, +Wikiquette_assistance, +Requests_for_mediation, +Notability_(academics), +Notability_(books), +Notability_(events), +Notability_(films), +Notability_(music), +Notability_(numbers), +Notability_(people), +Notability_(sports), +Notability_(web), +Notability_(organizations_and_companies), +No_original_research/Noticeboard, +Fiction/Noticeboard, +Content_forking, +Autobiography, +Non-free_content_review, +Bureaucrats%27_noticeboard, +External_links, +Fringe_theories, +No_disclaimers_in_articles, +Offensive_material, +Patent_nonsense, +Plagiarism, +Spam, +Wikipedia_is_not_for_things_made_up_one_day, +Sexual_content, +Vandalism, +Please_do_not_bite_the_newcomers, +Arbitration/Policy, +Banning_policy, +Blocking_policy, +Administrators, +Bot_policy, +Copyright_violations, +Image_use_policy, +Non-free_content_criteria, +Be_bold, +Categorization/Ethnicity,_gender,_religion_and_sexuality, +Categorization_of_people, +Categorization, +Citing_sources +) +and page_namespace in (4,5) +group by rev_user_text, year(rev_timestamp), title, namespace Added: trunk/tools/wsor/contribution_inequality/query.py === --- trunk/tools/wsor/contribution_inequality/query.py (rev 0)
[MediaWiki-CVS] SVN: [94911] trunk/extensions/ContributionTracking/ContributionTracking.sql
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94911 Revision: 94911 Author: khorn Date: 2011-08-18 17:19:15 + (Thu, 18 Aug 2011) Log Message: --- Suggested changes to the contribution_tracking table definition (r94791). Modified Paths: -- trunk/extensions/ContributionTracking/ContributionTracking.sql Modified: trunk/extensions/ContributionTracking/ContributionTracking.sql === --- trunk/extensions/ContributionTracking/ContributionTracking.sql 2011-08-18 17:07:05 UTC (rev 94910) +++ trunk/extensions/ContributionTracking/ContributionTracking.sql 2011-08-18 17:19:15 UTC (rev 94911) @@ -1,5 +1,5 @@ CREATE TABLE IF NOT EXISTS /*_*/contribution_tracking ( - id int(10) unsigned NOT NULL auto_increment, + id int(10) unsigned NOT NULL PRIMARY KEY auto_increment, contribution_id int(10) unsigned default NULL, note text, referrer varchar(4096) default NULL, @@ -11,8 +11,8 @@ language varchar(8) default NULL, ts char(14) default NULL, owa_session varbinary(255) default NULL, - owa_ref int(11) default NULL, - PRIMARY KEY (id), - UNIQUE KEY contribution_id (contribution_id), - KEY ts (ts) + owa_ref int(11) default NULL ) /*wgDBTableOptions*/; + +CREATE UNIQUE INDEX /*i*/contribution_id ON /*_*/contribution_tracking (contribution_id); +CREATE INDEX /*i*/ts ON /*_*/contribution_tracking (ts); \ 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: [94912] trunk/extensions/MetricsReporting
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94912 Revision: 94912 Author: reedy Date: 2011-08-18 18:22:43 + (Thu, 18 Aug 2011) Log Message: --- Uncomment relevant feed to use Remove trailing comma from GenericDataTable.sql Modified Paths: -- trunk/extensions/MetricsReporting/GenericDataTable.sql trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php Modified: trunk/extensions/MetricsReporting/GenericDataTable.sql === --- trunk/extensions/MetricsReporting/GenericDataTable.sql 2011-08-18 17:19:15 UTC (rev 94911) +++ trunk/extensions/MetricsReporting/GenericDataTable.sql 2011-08-18 18:22:43 UTC (rev 94912) @@ -4,6 +4,6 @@ `project_code` varchar (10) DEFAULT NULL, `country_code` varchar (3) DEFAULT NULL, `value` bigint (12),-- Needs to be decimal? - PRIMARY KEY ( date, language_code, project_code, country_code, value ), + PRIMARY KEY ( date, language_code, project_code, country_code, value ) -- More indexes may be needed where language, project and country could be null ) ; \ No newline at end of file Modified: trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php === --- trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php 2011-08-18 17:19:15 UTC (rev 94911) +++ trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php 2011-08-18 18:22:43 UTC (rev 94912) @@ -66,7 +66,7 @@ //$src = $node-link[2]-attributes()-href; // List based feed - // $src = (string)$node-content[src]; + $src = (string)$node-content[src]; // $src = $node-content-attributes()-src; // Cell based feed ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94913] trunk/parsers/wikidom/lib/es
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94913 Revision: 94913 Author: tparscal Date: 2011-08-18 18:32:18 + (Thu, 18 Aug 2011) Log Message: --- Moved es.Content.isolate functionality into es.Content.annotate, where it's actually needed - not using it prior to annotating can cause nasty hard to find bugs, so this is safer and easier Modified Paths: -- trunk/parsers/wikidom/lib/es/es.Content.js trunk/parsers/wikidom/lib/es/es.Transaction.js Modified: trunk/parsers/wikidom/lib/es/es.Content.js === --- trunk/parsers/wikidom/lib/es/es.Content.js 2011-08-18 18:22:43 UTC (rev 94912) +++ trunk/parsers/wikidom/lib/es/es.Content.js 2011-08-18 18:32:18 UTC (rev 94913) @@ -401,26 +401,6 @@ }; /** - * Breaks cross references, which occur when content is copied around. - * - * Because content data is an array of characters, or arrays containing a character and any - * number of references to annotation objects, slicing the array still leaves annotated characters - * as references to shared memory. This should be used only when annotations are going to be - * changed because it is rather expensive. - * - * @method - */ -es.Content.prototype.isolate = function() { - var i = 0, - length = this.data.length; - while ( i length ) { - // The slice method works for array or string character type - this.data[i] = this.data[i].slice( 0 ); - i++; - } -}; - -/** * Inserts content data at a specific position. * * Inserted content will inherit annotations from neighboring content. @@ -550,12 +530,33 @@ * @emits change with type:annotate data property */ es.Content.prototype.annotate = function( method, annotation, range ) { + // Support calling without a range argument, using the full content range as default if ( !range ) { range = new es.Range( 0, this.data.length ); } else { range.normalize(); } - var i; + /* +* Because content data is an array of either strings containing a single character each or +* references to arrays containing a single character string followed by a series of references +* to annotation objects, making a copy by slicing content data will cause references to +* annotated characters in the content data to be shared between the original and the copy. To +* ensure that modifications to annotated characters in the content data do not affect the data +* of other content objects, annotated characters must be sliced individually. This is too +* expensive to do on all content on every copy, so we only do it when we are going to modify +* the annotation information, and on a few annotated characters as possible. +*/ + for ( var i = range.start; i range.end; i++ ) { + if ( typeof this.data[i] !== 'string' ) { + this.data[i] = this.data[i].slice( 0 ); + } + i++; + } + /* +* Support toggle method by automatically choosing add or remove based on the coverage of the +* content being annotated; if the content is not covered or partially covered add will be used, +* if the content is completely covered, remove will be used. +*/ if ( method === 'toggle' ) { var coverage = this.coverageOfAnnotation( range, annotation, false ); if ( coverage.length === range.getLength() ) { @@ -567,7 +568,7 @@ } if ( method === 'add' ) { var duplicate; - for ( i = range.start; i range.end; i++ ) { + for ( var i = range.start; i range.end; i++ ) { duplicate = -1; if ( typeof this.data[i] === 'string' ) { // Never annotate new lines @@ -589,7 +590,7 @@ } } } else if ( method === 'remove' ) { - for ( i = range.start; i range.end; i++ ) { + for ( var i = range.start; i range.end; i++ ) { if ( typeof this.data[i] !== 'string' ) { if ( annotation.type === 'all' ) { // Remove all annotations by converting the annotated character to a plain Modified: trunk/parsers/wikidom/lib/es/es.Transaction.js === --- trunk/parsers/wikidom/lib/es/es.Transaction.js 2011-08-18 18:22:43 UTC (rev 94912) +++ trunk/parsers/wikidom/lib/es/es.Transaction.js 2011-08-18 18:32:18 UTC (rev 94913) @@ -1,6 +1,9 @@ /** - * Creates an operation to be applied to a content object. + * Creates a transaction which can be applied to a content object. * + * Transactions
[MediaWiki-CVS] SVN: [94914] trunk/parsers/wikidom/lib/es/es.ListBlock.js
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94914 Revision: 94914 Author: inez Date: 2011-08-18 18:38:59 + (Thu, 18 Aug 2011) Log Message: --- Implement deleteContent for ListBlock (for single item and for multiple items) Modified Paths: -- trunk/parsers/wikidom/lib/es/es.ListBlock.js Modified: trunk/parsers/wikidom/lib/es/es.ListBlock.js === --- trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 18:32:18 UTC (rev 94913) +++ trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 18:38:59 UTC (rev 94914) @@ -196,6 +196,62 @@ location.item.flow.content.insert( location.offset, content ); }; +/** + * Deletes content in a block within a range. + * + * @method + * @param range {es.Range} Range of content to remove + */ +es.ListBlock.prototype.deleteContent = function( range ) { + range.normalize(); + + var locationStart = this.getLocationFromOffset( range.start ), + locationEnd = this.getLocationFromOffset( range.end ); + + if ( locationStart.item == locationEnd.item ) { + // delete content within one item + locationStart.item.content.remove( + new es.Range( locationStart.offset, locationStart.offset + range.getLength() ) + ); + } else { + // delete content across multiple items + + // delete selected content from first selected item + locationStart.item.content.remove( + new es.Range( + locationStart.offset, + locationStart.item.content.getLength() + ) + ); + + // grab not selected content from last selected item and append it to first selected item + locationStart.item.content.insert( locationStart.offset, locationEnd.item.content.getContent( + new es.Range( + locationEnd.offset, + locationEnd.item.content.getLength() + ) + ).data ); + + // delete all selected items except first one + var deleting = false; + for ( var i = 0; i this.list.items.length; i++ ) { + if ( this.list.items[i] == locationStart.item ) { + deleting = true; + continue; + } else if ( this.list.items[i] == locationEnd.item ) { + this.list.items[i].list.remove( this.list.items[i] ); + break; + } + if ( deleting ) { + this.list.items[i].list.remove( this.list.items[i] ); + i--; + } + } + + this.enumerate(); + } +}; + es.ListBlock.prototype.getText = function( range, render ) { return ; }; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94915] trunk/parsers/wikidom/lib/es/es.ListBlock.js
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94915 Revision: 94915 Author: inez Date: 2011-08-18 18:43:42 + (Thu, 18 Aug 2011) Log Message: --- Lets be more strict about comparing objects Modified Paths: -- trunk/parsers/wikidom/lib/es/es.ListBlock.js Modified: trunk/parsers/wikidom/lib/es/es.ListBlock.js === --- trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 18:38:59 UTC (rev 94914) +++ trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 18:43:42 UTC (rev 94915) @@ -235,10 +235,10 @@ // delete all selected items except first one var deleting = false; for ( var i = 0; i this.list.items.length; i++ ) { - if ( this.list.items[i] == locationStart.item ) { + if ( this.list.items[i] === locationStart.item ) { deleting = true; continue; - } else if ( this.list.items[i] == locationEnd.item ) { + } else if ( this.list.items[i] === locationEnd.item ) { this.list.items[i].list.remove( this.list.items[i] ); break; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94916] trunk/parsers/wikidom/lib/es/es.Transaction.js
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94916 Revision: 94916 Author: tparscal Date: 2011-08-18 18:47:07 + (Thu, 18 Aug 2011) Log Message: --- Added docuementation Modified Paths: -- trunk/parsers/wikidom/lib/es/es.Transaction.js Modified: trunk/parsers/wikidom/lib/es/es.Transaction.js === --- trunk/parsers/wikidom/lib/es/es.Transaction.js 2011-08-18 18:43:42 UTC (rev 94915) +++ trunk/parsers/wikidom/lib/es/es.Transaction.js 2011-08-18 18:47:07 UTC (rev 94916) @@ -4,6 +4,25 @@ * Transactions contain a series of operations, such as retain, insert, remove, start and end. Each * operation describes a step that must be taken to construct a new version of a content object. * + * @example + * // Given the following content... + * var content = es.Content.newFromText( 'abc' ); + * + * // Build transaction + * var tx = new es.Transaction(); + * tx.add( 'retain', 1 ); + * tx.add( 'remove', content.getData( new es.Range( 1, 2 ) ) ); + * tx.add( 'insert', es.Content.newFromText( 'B' ) ); + * tx.add( 'retain', 1 ); + * + * // Commit transaction to content + * var committed = tx.commit( content ); + * console.log( committed.getText() ); // Logs aBc + * + * // Apply transaction to content + * var rolledback = tx.rollback( content ); + * console.log( rolledback.getText() ); // Logs abc + * * @class * @constructor * @param content {es.Content} Content to operate on ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94917] trunk/extensions/MobileFrontend/MobileFrontend.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94917 Revision: 94917 Author: preilly Date: 2011-08-18 18:50:39 + (Thu, 18 Aug 2011) Log Message: --- add addtional wikipedia specific css selector for template ?\226?\128?\148 remember that $wgMFRemovableClasses can be used for non-wikipedia sites Modified Paths: -- trunk/extensions/MobileFrontend/MobileFrontend.php Modified: trunk/extensions/MobileFrontend/MobileFrontend.php === --- trunk/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 18:47:07 UTC (rev 94916) +++ trunk/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 18:50:39 UTC (rev 94917) @@ -55,7 +55,7 @@ $wgMFRemovableClasses = array(); class ExtMobileFrontend { - const VERSION = '0.5.34'; + const VERSION = '0.5.35'; /** * @var DOMDocument @@ -104,6 +104,7 @@ '.metadata mbox-small', '.metadata plainlinks ambox ambox-content', '.metadata plainlinks ambox ambox-move', + '.metadata plainlinks ambox ambox-style', 'form', 'div.sister-project', 'script', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94918] branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend .php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94918 Revision: 94918 Author: preilly Date: 2011-08-18 18:51:30 + (Thu, 18 Aug 2011) Log Message: --- mft r94917 Modified Paths: -- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php === --- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 18:50:39 UTC (rev 94917) +++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 18:51:30 UTC (rev 94918) @@ -55,7 +55,7 @@ $wgMFRemovableClasses = array(); class ExtMobileFrontend { - const VERSION = '0.5.34'; + const VERSION = '0.5.35'; /** * @var DOMDocument @@ -104,6 +104,7 @@ '.metadata mbox-small', '.metadata plainlinks ambox ambox-content', '.metadata plainlinks ambox ambox-move', + '.metadata plainlinks ambox ambox-style', 'form', 'div.sister-project', 'script', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94919] trunk/parsers/wikidom/lib/es/es.Transaction.js
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94919 Revision: 94919 Author: tparscal Date: 2011-08-18 18:52:54 + (Thu, 18 Aug 2011) Log Message: --- Added data check to annotation comparison used in annotation removal operations Modified Paths: -- trunk/parsers/wikidom/lib/es/es.Transaction.js Modified: trunk/parsers/wikidom/lib/es/es.Transaction.js === --- trunk/parsers/wikidom/lib/es/es.Transaction.js 2011-08-18 18:51:30 UTC (rev 94918) +++ trunk/parsers/wikidom/lib/es/es.Transaction.js 2011-08-18 18:52:54 UTC (rev 94919) @@ -82,11 +82,20 @@ } var index; for ( var i = 0; i stack.length; i++ ) { - // TODO: Compare data too: es.Content.compareObjects( stack[i], val.annotation ) - if ( stack[i].type === val.annotation.type ) { - index = i; - break; + // Type check + if ( stack[i].type !== val.annotation.type ) { + // Nope + continue; } + // Data check + if ( ( stack[i].data || stack[i].data ) +!es.Content.compareObjects( stack[i], val.annotation ) ) { + // Nope + continue; + } + // Found it! + index = i; + break; } if ( index === undefined ) { throw 'Annotation stack error. Annotation is missing.'; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94920] trunk/parsers/wikidom/lib/es/es.Transaction.js
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94920 Revision: 94920 Author: tparscal Date: 2011-08-18 18:55:16 + (Thu, 18 Aug 2011) Log Message: --- Simplified annotation comparison Modified Paths: -- trunk/parsers/wikidom/lib/es/es.Transaction.js Modified: trunk/parsers/wikidom/lib/es/es.Transaction.js === --- trunk/parsers/wikidom/lib/es/es.Transaction.js 2011-08-18 18:52:54 UTC (rev 94919) +++ trunk/parsers/wikidom/lib/es/es.Transaction.js 2011-08-18 18:55:16 UTC (rev 94920) @@ -80,22 +80,13 @@ } else { throw 'Annotation method error. Unsupported annotation method: ' + val.method; } + // Find the index of a comparable annotation (checking for same value, not reference) var index; for ( var i = 0; i stack.length; i++ ) { - // Type check - if ( stack[i].type !== val.annotation.type ) { - // Nope - continue; + if ( es.Content.compareObjects( stack[i], val.annotation ) ) { + index = i; + break; } - // Data check - if ( ( stack[i].data || stack[i].data ) -!es.Content.compareObjects( stack[i], val.annotation ) ) { - // Nope - continue; - } - // Found it! - index = i; - break; } if ( index === undefined ) { throw 'Annotation stack error. Annotation is missing.'; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94921] trunk/parsers/wikidom/lib/es/es.ListBlock.js
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94921 Revision: 94921 Author: inez Date: 2011-08-18 18:56:59 + (Thu, 18 Aug 2011) Log Message: --- Implement annotateContent for ListBlock (for single item and for multiple items) Modified Paths: -- trunk/parsers/wikidom/lib/es/es.ListBlock.js Modified: trunk/parsers/wikidom/lib/es/es.ListBlock.js === --- trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 18:55:16 UTC (rev 94920) +++ trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 18:56:59 UTC (rev 94921) @@ -252,6 +252,78 @@ } }; +/** + * Applies an annotation to a given range. + * + * If a range arguments are not provided, all content will be annotated. + * + * @method + * @param method {String} Way to apply annotation (toggle, add or remove) + * @param annotation {Object} Annotation to apply + * @param range {es.Range} Range of content to annotate + */ +es.ListBlock.prototype.annotateContent = function( method, annotation, range ) { + range.normalize(); + + var locationStart = this.getLocationFromOffset( range.start ), + locationEnd = this.getLocationFromOffset( range.end ); + + if ( locationStart.item == locationEnd.item ) { + // annotate content within one item + locationStart.item.content.annotate( + method, + annotation, + new es.Range( + locationStart.offset, + locationStart.offset + range.end - range.start + ) + ); + } else { + // annotate content across multiple items + + // annotate content in the first item - from offset to end + locationStart.item.content.annotate( + method, + annotation, + new es.Range( + locationStart.offset, + locationStart.item.content.getLength() + ) + ); + + // annotate content in the last item - from beginning to offset + locationEnd.item.content.annotate( + method, + annotation, + new es.Range( + 0, + locationEnd.offset + ) + ); + + // annotate all content in selected items except first and last one + var annotating = false; + for ( var i = 0; i this.list.items.length; i++ ) { + if ( this.list.items[i] === locationStart.item ) { + annotating = true; + continue; + } else if ( this.list.items[i] === locationEnd.item ) { + break; + } + if ( annotating ) { + this.list.items[i].content.annotate( + method, + annotation, + new es.Range( + 0, + this.list.items[i].content.getLength() + ) + ); + } + } + } +}; + es.ListBlock.prototype.getText = function( range, render ) { return ; }; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94922] trunk/parsers/wikidom/lib/es/es.ListBlock.js
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94922 Revision: 94922 Author: inez Date: 2011-08-18 18:57:56 + (Thu, 18 Aug 2011) Log Message: --- Lets be more strict about comparing objects Modified Paths: -- trunk/parsers/wikidom/lib/es/es.ListBlock.js Modified: trunk/parsers/wikidom/lib/es/es.ListBlock.js === --- trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 18:56:59 UTC (rev 94921) +++ trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 18:57:56 UTC (rev 94922) @@ -208,7 +208,7 @@ var locationStart = this.getLocationFromOffset( range.start ), locationEnd = this.getLocationFromOffset( range.end ); - if ( locationStart.item == locationEnd.item ) { + if ( locationStart.item === locationEnd.item ) { // delete content within one item locationStart.item.content.remove( new es.Range( locationStart.offset, locationStart.offset + range.getLength() ) @@ -268,7 +268,7 @@ var locationStart = this.getLocationFromOffset( range.start ), locationEnd = this.getLocationFromOffset( range.end ); - if ( locationStart.item == locationEnd.item ) { + if ( locationStart.item === locationEnd.item ) { // annotate content within one item locationStart.item.content.annotate( method, ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94923] trunk/extensions/UploadWizard/UploadWizard.config.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94923 Revision: 94923 Author: jeroendedauw Date: 2011-08-18 18:58:10 + (Thu, 18 Aug 2011) Log Message: --- fix probable cp error Modified Paths: -- trunk/extensions/UploadWizard/UploadWizard.config.php Modified: trunk/extensions/UploadWizard/UploadWizard.config.php === --- trunk/extensions/UploadWizard/UploadWizard.config.php 2011-08-18 18:57:56 UTC (rev 94922) +++ trunk/extensions/UploadWizard/UploadWizard.config.php 2011-08-18 18:58:10 UTC (rev 94923) @@ -79,7 +79,7 @@ 'own-pd' = array( 'msg' = 'mwe-upwiz-license-own-pd', 'icons' = array( 'cc-zero' ), - 'templates' = array( 'cc-zero' ) + 'templates' = array( 'own-pd' ) ), 'cc-by-sa-2.5' = array( 'msg' = 'mwe-upwiz-license-cc-by-sa-2.5', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94924] trunk/parsers/wikidom/lib/es
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94924 Revision: 94924 Author: tparscal Date: 2011-08-18 18:58:42 + (Thu, 18 Aug 2011) Log Message: --- Moved es.Content.copyObject and es.Content.compareObject to out of es.Content and into es.* - they are general purpose and now have use outside the es.Content class. Modified Paths: -- trunk/parsers/wikidom/lib/es/es.Content.js trunk/parsers/wikidom/lib/es/es.Transaction.js trunk/parsers/wikidom/lib/es/es.js Modified: trunk/parsers/wikidom/lib/es/es.Content.js === --- trunk/parsers/wikidom/lib/es/es.Content.js 2011-08-18 18:58:10 UTC (rev 94923) +++ trunk/parsers/wikidom/lib/es/es.Content.js 2011-08-18 18:58:42 UTC (rev 94924) @@ -161,7 +161,7 @@ // Build simplified annotation object var dst = { 'type': src.type }; if ( 'data' in src ) { - dst.data = es.Content.copyObject( src.data ); + dst.data = es.copyObject( src.data ); } // Apply annotation to range var k; @@ -184,61 +184,6 @@ }; /** - * Recursively compares string and number property between two objects. - * - * A false result may be caused by property inequality or by properties in one object missing from - * the other. An asymmetrical test may also be performed, which checks only that properties in the - * first object are present in the second object, but not the inverse. - * - * @static - * @method - * @param a {Object} First object to compare - * @param b {Object} Second object to compare - * @param asymmetrical {Boolean} Whether to check only that b contains values from a - * @returns {Boolean} If the objects contain the same values as each other - */ -es.Content.compareObjects = function( a, b, asymmetrical ) { - var aValue, bValue, aType, bType; - var k; - for ( k in a ) { - aValue = a[k]; - bValue = b[k]; - aType = typeof aValue; - bType = typeof bValue; - if ( aType !== bType - || ( ( aType === 'string' || aType === 'number' ) aValue !== bValue ) - || ( $.isPlainObject( aValue ) !es.Content.compareObjects( aValue, bValue ) ) ) { - return false; - } - } - // If the check is not asymmetrical, recursing with the arguments swapped will verify our result - return asymmetrical ? true : es.Content.compareObjects( b, a, true ); -}; - -/** - * Gets a recursive copy of an object's string, number and plain-object property. - * - * @static - * @method - * @param source {Object} Object to copy - * @returns {Object} Copy of source object - */ -es.Content.copyObject = function( source ) { - var destination = {}; - var key; - for ( key in source ) { - sourceValue = source[key]; - sourceType = typeof sourceValue; - if ( sourceType === 'string' || sourceType === 'number' ) { - destination[key] = sourceValue; - } else if ( $.isPlainObject( sourceValue ) ) { - destination[key] = es.Content.copyObject( sourceValue ); - } - } - return destination; -}; - -/** * Gets a rendered opening or closing of an annotation. * * Tag nesting is handled using a stack, which keeps track of what is currently open. A common stack @@ -470,7 +415,7 @@ index = this.indexOfAnnotation( i, annotation ); if ( typeof this.data[i] !== 'string' index !== -1 ) { if ( strict ) { - if ( es.Content.compareObjects( this.data[i][index].data, annotation.data ) ) { + if ( es.compareObjects( this.data[i][index].data, annotation.data ) ) { coverage.push( i ); } } else { @@ -501,7 +446,7 @@ for ( i = 1; i this.data[offset].length; i++ ) { if ( annotatedChar[i].type === annotation.type ) { if ( strict ) { - if ( es.Content.compareObjects( annotatedChar[i].data, annotation.data ) ) { + if ( es.compareObjects( annotatedChar[i].data, annotation.data ) ) { return i; } } else { @@ -716,7 +661,7 @@ */ es.Content.prototype.handleAnnotation = function( bias, stack, index, annotation ) { if ( bias === 'open' ) { - var newAnnotation = es.Content.copyObject( annotation ); + var newAnnotation = es.copyObject( annotation );
[MediaWiki-CVS] SVN: [94925] trunk/parsers/wikidom/lib/es/es.ListBlock.js
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94925 Revision: 94925 Author: inez Date: 2011-08-18 18:59:35 + (Thu, 18 Aug 2011) Log Message: --- Use range.getLength() method instead of calculating manually Modified Paths: -- trunk/parsers/wikidom/lib/es/es.ListBlock.js Modified: trunk/parsers/wikidom/lib/es/es.ListBlock.js === --- trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 18:58:42 UTC (rev 94924) +++ trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 18:59:35 UTC (rev 94925) @@ -273,10 +273,7 @@ locationStart.item.content.annotate( method, annotation, - new es.Range( - locationStart.offset, - locationStart.offset + range.end - range.start - ) + new es.Range( locationStart.offset, locationStart.offset + range.getLength() ) ); } else { // annotate content across multiple items ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94926] trunk/tools/planet
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94926 Revision: 94926 Author: reedy Date: 2011-08-18 19:10:05 + (Thu, 18 Aug 2011) Log Message: --- Add blogs to Planet per meta 2 to fr 1 to de 3 to en, and 1 updated at en Modified Paths: -- trunk/tools/planet/de/config.ini trunk/tools/planet/en/config.ini trunk/tools/planet/fr/config.ini Modified: trunk/tools/planet/de/config.ini === --- trunk/tools/planet/de/config.ini2011-08-18 18:59:35 UTC (rev 94925) +++ trunk/tools/planet/de/config.ini2011-08-18 19:10:05 UTC (rev 94926) @@ -150,3 +150,6 @@ [http://steproe.wordpress.com/category/wikimedia/feed/atom/] name=Stepro + +[http://lyzzy.de/blog/category/wikimedia/feed/] +name=lyzzy \ No newline at end of file Modified: trunk/tools/planet/en/config.ini === --- trunk/tools/planet/en/config.ini2011-08-18 18:59:35 UTC (rev 94925) +++ trunk/tools/planet/en/config.ini2011-08-18 19:10:05 UTC (rev 94926) @@ -218,7 +218,7 @@ [http://lunasantin.blogspot.com/feeds/posts/default/-/wikimedia] name=User:Luna Santin -[http://sebmol.com/blog/?cat=8feed=rss2] +[http://blog.sebmol.me/category/wikimedia-en/feed/] name=Sebastian Moleski [http://wikipediaweekly.org/feed/] @@ -479,3 +479,12 @@ [http://midea.nmc.org/author/loribyrdphillips/feed/] name=New Media Consortium + +[http://www.philippebeaudette.com/feed] +name=Phillipe Beaudette + +[http://feeds.feedburner.com/EinsteinUniversity] +name=Einstein University + +[http://www.wikilove.in/feeds/posts/default] +name=WikiLove \ No newline at end of file Modified: trunk/tools/planet/fr/config.ini === --- trunk/tools/planet/fr/config.ini2011-08-18 18:59:35 UTC (rev 94925) +++ trunk/tools/planet/fr/config.ini2011-08-18 19:10:05 UTC (rev 94926) @@ -216,3 +216,9 @@ [http://www.leconomiste-notes.fr/dotclear2/index.php/feed/tag/Wikip%C3%A9dia/atom] name=Bokken + +[http://wikitrekk.blogspot.com/feeds/posts/default] +name=Wikitrekk + +[http://littletony87.unblog.fr/feed/] +name=littletony87 \ 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: [94927] trunk/tools/ToolserverI18N/language/messages
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94927 Revision: 94927 Author: raymond Date: 2011-08-18 19:19:44 + (Thu, 18 Aug 2011) Log Message: --- Localisation updates for ToolserverI18N messages from translatewiki.net Modified Paths: -- trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php trunk/tools/ToolserverI18N/language/messages/General.i18n.php Modified: trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php === --- trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php 2011-08-18 19:10:05 UTC (rev 94926) +++ trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php 2011-08-18 19:19:44 UTC (rev 94927) @@ -126,7 +126,7 @@ 'upload_control_text' = '$1 is be the same as in the message {{msg-toolserver|Commonshelper2-upload_submit}}', 'help_jira' = '$1 and $2 are for a clickable link ($1 is the start of the link, $2 the end of the link). The target of the link is https://jira.toolserver.org/secure/CreateIssue!default.jspa.', 'help_mail' = '$1 is the mail address.', - 'help_commons' = '$1 and $2 are for a clickable link ($1 is the start of the link, $2 the end of the link). The target of the link is http://commons.wikimedia.org/wiki/Commons_talk:CommonsHelper_2.' + 'help_commons' = '$1 and $2 are for a clickable link ($1 is the start of the link, $2 the end of the link). The target of the link is http://commons.wikimedia.org/wiki/Commons_talk:CommonsHelper_2.', ); /** Afrikaans (Afrikaans) Modified: trunk/tools/ToolserverI18N/language/messages/General.i18n.php === --- trunk/tools/ToolserverI18N/language/messages/General.i18n.php 2011-08-18 19:10:05 UTC (rev 94926) +++ trunk/tools/ToolserverI18N/language/messages/General.i18n.php 2011-08-18 19:19:44 UTC (rev 94927) @@ -1061,6 +1061,7 @@ /** Swedish (Svenska) * @author Liftarn * @author Lokal Profil + * @author WikiPhoenix */ $messages['sv'] = array( 'hello' = 'Hej', @@ -1070,12 +1071,12 @@ 'namespace' = 'Namnrymd', 'form-submit' = 'Gå', 'form-reset' = 'Nollställ', - 'years' = 'år', - 'weeks' = 'veckor', - 'days' = 'dagar', - 'hours' = 'timmar', - 'minutes' = 'minuter', - 'seconds' = 'sekunder', + 'years' = '{{PLURAL: $1|år|år}}', + 'weeks' = '{{PLURAL: $1|vecka|veckor}}', + 'days' = '{{PLURAL: $1|dag|dagar}}', + 'hours' = '{{PLURAL: $1|timma|timmar}}', + 'minutes' = '{{PLURAL: $1|minut|minuter}}', + 'seconds' = '{{PLURAL: $1|sekund|sekunder}}', 'last-modified-date' = 'Senast uppdaterad: $1', 'view-source' = 'Visa källkod', ); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94928] trunk/extensions/SemanticMediaWiki/includes/datavalues/ SMW_DV_Time.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94928 Revision: 94928 Author: jeroendedauw Date: 2011-08-18 19:26:02 + (Thu, 18 Aug 2011) Log Message: --- fix bug 30395 Modified Paths: -- trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Time.php Modified: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Time.php === --- trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Time.php 2011-08-18 19:19:44 UTC (rev 94927) +++ trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Time.php 2011-08-18 19:26:02 UTC (rev 94928) @@ -146,8 +146,10 @@ $datecomponents = array(); $calendarmodel = $era = $hours = $minutes = $seconds = $timeoffset = false; - $timeStamp = wfTimestamp( TS_MW, $value ); - if ( $timeStamp !== false ) { + // Check if it's parseable by wfTimestamp when it's not a year (which is wrongly interpreted). + if ( strlen( $value ) != 4 wfTimestamp( TS_MW, $value ) !== false ) { + $timeStamp = wfTimestamp( TS_MW, $value ); + $this-m_dataitem = new SMWDITime( SMWDITime::CM_GREGORIAN, substr( $timeStamp, 0, 4 ), ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94929] trunk/parsers/wikidom/lib/es/es.ListBlock.js
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94929 Revision: 94929 Author: inez Date: 2011-08-18 19:28:26 + (Thu, 18 Aug 2011) Log Message: --- Implement getWordBoundaries and getSectionBoundaries for ListBlock Modified Paths: -- trunk/parsers/wikidom/lib/es/es.ListBlock.js Modified: trunk/parsers/wikidom/lib/es/es.ListBlock.js === --- trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 19:26:02 UTC (rev 94928) +++ trunk/parsers/wikidom/lib/es/es.ListBlock.js2011-08-18 19:28:26 UTC (rev 94929) @@ -184,7 +184,36 @@ return length === 0 ? 0 : length - 1; }; + /** + * Gets the start and end points of the word closest a given offset. + * + * @method + * @param offset {Integer} Offset to find word nearest to + * @returns {Object} Range object of boundaries + */ +es.ListBlock.prototype.getWordBoundaries = function( offset ) { + var location = this.getLocationFromOffset( offset ), + boundaries = location.item.flow.content.getWordBoundaries( location.offset ); + boundaries.start += offset - location.offset; + boundaries.end += offset - location.offset; + return boundaries; +}; + +/** + * Gets the start and end points of the section closest a given offset. + * + * @method + * @param offset {Integer} Offset to find section nearest to + * @returns {Object} Range object of boundaries + */ +es.ListBlock.prototype.getSectionBoundaries = function( offset ) { + var location = this.getLocationFromOffset( offset ), + start = offset - location.offset; + return new es.Range( start, start + location.item.content.getLength() ); +}; + +/** * Inserts content into a block at an offset. * * @method ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94931] trunk/extensions/MetricsReporting/GenericDataTable.sql
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94931 Revision: 94931 Author: demon Date: 2011-08-18 19:55:55 + (Thu, 18 Aug 2011) Log Message: --- Add table prefix magic and remove some of the ugly backticks :) Modified Paths: -- trunk/extensions/MetricsReporting/GenericDataTable.sql Modified: trunk/extensions/MetricsReporting/GenericDataTable.sql === --- trunk/extensions/MetricsReporting/GenericDataTable.sql 2011-08-18 19:41:03 UTC (rev 94930) +++ trunk/extensions/MetricsReporting/GenericDataTable.sql 2011-08-18 19:55:55 UTC (rev 94931) @@ -1,4 +1,4 @@ -CREATE TABLE `GenericDataTable` ( +CREATE TABLE /*_*/GenericDataTable ( `date` date NOT NULL, `language_code` char (15) DEFAULT NULL, `project_code` varchar (10) DEFAULT NULL, ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94932] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94932 Revision: 94932 Author: ialex Date: 2011-08-18 20:03:30 + (Thu, 18 Aug 2011) Log Message: --- Moved wfGetIP() to WebRequest::getIP(): * Changed all calls in core to the latter * Also marked wfGetForwardedFor() as deprecated * Moved wfGetIP() tests to WebRequestTest Modified Paths: -- trunk/phase3/api.php trunk/phase3/includes/Autopromote.php trunk/phase3/includes/EditPage.php trunk/phase3/includes/Exception.php trunk/phase3/includes/ProxyTools.php trunk/phase3/includes/RecentChange.php trunk/phase3/includes/SkinLegacy.php trunk/phase3/includes/Title.php trunk/phase3/includes/User.php trunk/phase3/includes/WebRequest.php trunk/phase3/includes/specials/SpecialBlockme.php trunk/phase3/includes/specials/SpecialPasswordReset.php trunk/phase3/includes/specials/SpecialUserlogin.php trunk/phase3/includes/specials/SpecialVersion.php trunk/phase3/tests/phpunit/includes/WebRequestTest.php Removed Paths: - trunk/phase3/tests/phpunit/includes/ProxyTools/ Modified: trunk/phase3/api.php === --- trunk/phase3/api.php2011-08-18 19:55:55 UTC (rev 94931) +++ trunk/phase3/api.php2011-08-18 20:03:30 UTC (rev 94932) @@ -127,7 +127,7 @@ $items = array( wfTimestamp( TS_MW ), $endtime - $starttime, - wfGetIP(), + $wgRequest-getIP(), $_SERVER['HTTP_USER_AGENT'] ); $items[] = $wgRequest-wasPosted() ? 'POST' : 'GET'; Modified: trunk/phase3/includes/Autopromote.php === --- trunk/phase3/includes/Autopromote.php 2011-08-18 19:55:55 UTC (rev 94931) +++ trunk/phase3/includes/Autopromote.php 2011-08-18 20:03:30 UTC (rev 94932) @@ -166,9 +166,9 @@ $groups = array_slice( $cond, 1 ); return count( array_intersect( $groups, $user-getGroups() ) ) == count( $groups ); case APCOND_ISIP: - return $cond[1] == wfGetIP(); + return $cond[1] == $user-getRequest()-getIP(); case APCOND_IPINRANGE: - return IP::isInRange( wfGetIP(), $cond[1] ); + return IP::isInRange( $user-getRequest()-getIP(), $cond[1] ); case APCOND_BLOCKED: return $user-isBlocked(); case APCOND_ISBOT: Modified: trunk/phase3/includes/EditPage.php === --- trunk/phase3/includes/EditPage.php 2011-08-18 19:55:55 UTC (rev 94931) +++ trunk/phase3/includes/EditPage.php 2011-08-18 20:03:30 UTC (rev 94932) @@ -856,7 +856,7 @@ * @return int one of the constants describing the result */ function internalAttemptSave( $result, $bot = false ) { - global $wgFilterCallback, $wgUser, $wgParser; + global $wgFilterCallback, $wgUser, $wgRequest, $wgParser; global $wgMaxArticleSize; wfProfileIn( __METHOD__ ); @@ -888,7 +888,7 @@ } if ( $match !== false ) { $result['spam'] = $match; - $ip = wfGetIP(); + $ip = $wgRequest-getIP(); $pdbk = $this-mTitle-getPrefixedDBkey(); $match = str_replace( \n, '', $match ); wfDebugLog( 'SpamRegex', $ip spam regex hit [[$pdbk]]: \$match\ ); Modified: trunk/phase3/includes/Exception.php === --- trunk/phase3/includes/Exception.php 2011-08-18 19:55:55 UTC (rev 94931) +++ trunk/phase3/includes/Exception.php 2011-08-18 20:03:30 UTC (rev 94932) @@ -352,7 +352,7 @@ */ class UserBlockedError extends ErrorPageError { public function __construct( Block $block ){ - global $wgLang; + global $wgLang, $wgRequest; $blockerUserpage = $block-getBlocker()-getUserPage(); $link = [[{$blockerUserpage-getPrefixedText()}|{$blockerUserpage-getText()}]]; @@ -372,7 +372,7 @@ array( $link, $reason, - wfGetIP(), + $wgRequest-getIP(), $block-getBlocker()-getName(), $block-getId(), $wgLang-formatExpiry( $block-mExpiry ), Modified: trunk/phase3/includes/ProxyTools.php === ---
[MediaWiki-CVS] SVN: [94934] trunk/phase3/tests/phpunit/includes/WebRequestTest.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94934 Revision: 94934 Author: ialex Date: 2011-08-18 20:05:09 + (Thu, 18 Aug 2011) Log Message: --- Removed debugging code from r94932 Modified Paths: -- trunk/phase3/tests/phpunit/includes/WebRequestTest.php Modified: trunk/phase3/tests/phpunit/includes/WebRequestTest.php === --- trunk/phase3/tests/phpunit/includes/WebRequestTest.php 2011-08-18 20:04:47 UTC (rev 94933) +++ trunk/phase3/tests/phpunit/includes/WebRequestTest.php 2011-08-18 20:05:09 UTC (rev 94934) @@ -178,7 +178,6 @@ * @expectedException MWException */ function testGetIpLackOfRemoteAddrThrowAnException() { - var_dump( $_SERVER ); $request = new WebRequest(); # Next call throw an exception about lacking an IP $request-getIP(); ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94935] trunk/extensions/MobileFrontend/MobileFrontend.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94935 Revision: 94935 Author: preilly Date: 2011-08-18 20:28:27 + (Thu, 18 Aug 2011) Log Message: --- fix for r94917 Modified Paths: -- trunk/extensions/MobileFrontend/MobileFrontend.php Modified: trunk/extensions/MobileFrontend/MobileFrontend.php === --- trunk/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 20:05:09 UTC (rev 94934) +++ trunk/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 20:28:27 UTC (rev 94935) @@ -52,10 +52,16 @@ * Make the classes stripped from page content configurable. Each item will * be stripped from the page. See $itemsToRemove for more info */ -$wgMFRemovableClasses = array(); +$wgMFRemovableClasses = array( + 'table.metadata', # ugly metadata + '.metadata mbox-small', + '.metadata plainlinks ambox ambox-content', + '.metadata plainlinks ambox ambox-move', + '.metadata plainlinks ambox ambox-style', +); class ExtMobileFrontend { - const VERSION = '0.5.35'; + const VERSION = '0.5.36'; /** * @var DOMDocument @@ -100,11 +106,6 @@ 'table.toc', # table of contents '#catlinks', # category links 'div.stub', # stub warnings - 'table.metadata', # ugly metadata - '.metadata mbox-small', - '.metadata plainlinks ambox ambox-content', - '.metadata plainlinks ambox ambox-move', - '.metadata plainlinks ambox ambox-style', 'form', 'div.sister-project', 'script', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94936] branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend .php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94936 Revision: 94936 Author: preilly Date: 2011-08-18 20:29:02 + (Thu, 18 Aug 2011) Log Message: --- mft r94935 Modified Paths: -- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php === --- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 20:28:27 UTC (rev 94935) +++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 20:29:02 UTC (rev 94936) @@ -52,10 +52,16 @@ * Make the classes stripped from page content configurable. Each item will * be stripped from the page. See $itemsToRemove for more info */ -$wgMFRemovableClasses = array(); +$wgMFRemovableClasses = array( + 'table.metadata', # ugly metadata + '.metadata mbox-small', + '.metadata plainlinks ambox ambox-content', + '.metadata plainlinks ambox ambox-move', + '.metadata plainlinks ambox ambox-style', +); class ExtMobileFrontend { - const VERSION = '0.5.35'; + const VERSION = '0.5.36'; /** * @var DOMDocument @@ -100,11 +106,6 @@ 'table.toc', # table of contents '#catlinks', # category links 'div.stub', # stub warnings - 'table.metadata', # ugly metadata - '.metadata mbox-small', - '.metadata plainlinks ambox ambox-content', - '.metadata plainlinks ambox ambox-move', - '.metadata plainlinks ambox ambox-style', 'form', 'div.sister-project', 'script', ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94937] trunk/parsers/wikidom/README
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94937 Revision: 94937 Author: tparscal Date: 2011-08-18 20:34:40 + (Thu, 18 Aug 2011) Log Message: --- Updated some of the documentation in the README Modified Paths: -- trunk/parsers/wikidom/README Modified: trunk/parsers/wikidom/README === --- trunk/parsers/wikidom/README2011-08-18 20:29:02 UTC (rev 94936) +++ trunk/parsers/wikidom/README2011-08-18 20:34:40 UTC (rev 94937) @@ -1,12 +1,15 @@ -= WikiDom = += WikiDom and Edit Surface = -WikiDom is a document object model for Wikitext. +WikiDom is a serializable document object model for Wikitext. Once a parser is created that can emit +a WikiDom structure, EditSurface will be usable as a visual editor for Wikitext. EditSurface is a +WikiDom compatible visual editor, which departs from HTML ContentEditable-based editors and uses +the HTML DOM to render the entire document and editing user interface elements. == Contents of this directory == * demos - A variety of demonstrative web pages * lib - Common dependencies -* lib/wiki.js - WikiDom library +* lib/es - EditSurface code * tests - QUnit tests == Status of components == @@ -16,7 +19,7 @@ * Processors ** Templates: not yet started ** Hooks: not yet started -* Renderers +* Serializers ** HTML: basic functionaltiy ** Wikitext: basic functionaltiy @@ -34,7 +37,6 @@ ; Item : A line of text and optionally a series of nested lists. - === Blocks === ; Paragraph @@ -85,13 +87,4 @@ === Plans === -* Re-flow lines without deleting paragraph elements -* Auto-update selection on resize -* Handle keyboard input for: -** moving cursor -** making selection -** inserting and deleting -* Support multiple font styles in the same paragraph -* Support black-box in-line elements, treat them as a single character -* Add list editor * Add table editor ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94939] trunk/extensions/Translate/utils/TranslationHelpers.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94939 Revision: 94939 Author: reedy Date: 2011-08-18 20:40:35 + (Thu, 18 Aug 2011) Log Message: --- Fix Language::getFallbacskFor typo Modified Paths: -- trunk/extensions/Translate/utils/TranslationHelpers.php Modified: trunk/extensions/Translate/utils/TranslationHelpers.php === --- trunk/extensions/Translate/utils/TranslationHelpers.php 2011-08-18 20:35:31 UTC (rev 94938) +++ trunk/extensions/Translate/utils/TranslationHelpers.php 2011-08-18 20:40:35 UTC (rev 94939) @@ -997,7 +997,7 @@ // BC 1.19 if ( method_exists( 'Language', 'getFallbacksFor' ) ) { - $list = Language::getFallbacskFor( $code ); + $list = Language::getFallbacksFor( $code ); array_pop( $list ); // Get 'en' away from the end $fallbacks = array_merge( $list , $fallbacks ); } else { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94940] trunk/phase3/includes/User.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94940 Revision: 94940 Author: reedy Date: 2011-08-18 20:56:57 + (Thu, 18 Aug 2011) Log Message: --- Fix getRequet to getRequest Modified Paths: -- trunk/phase3/includes/User.php Modified: trunk/phase3/includes/User.php === --- trunk/phase3/includes/User.php 2011-08-18 20:40:35 UTC (rev 94939) +++ trunk/phase3/includes/User.php 2011-08-18 20:56:57 UTC (rev 94940) @@ -1450,7 +1450,7 @@ $limits = $wgRateLimits[$action]; $keys = array(); $id = $this-getId(); - $ip = $this-getRequet()-getIP(); + $ip = $this-getRequest()-getIP(); $userLimit = false; if( isset( $limits['anon'] ) $id == 0 ) { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94941] trunk/tools/wsor/contribution_inequality
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94941 Revision: 94941 Author: giovanni Date: 2011-08-18 20:58:24 + (Thu, 18 Aug 2011) Log Message: --- added .gitignore to contribution_inequality, added list of pages, renamed query.py - query_top100.py + fixed queryall.sh Modified Paths: -- trunk/tools/wsor/contribution_inequality/queryall.sh Added Paths: --- trunk/tools/wsor/contribution_inequality/.gitignore trunk/tools/wsor/contribution_inequality/pages.txt trunk/tools/wsor/contribution_inequality/query_top100.py Removed Paths: - trunk/tools/wsor/contribution_inequality/query.py Added: trunk/tools/wsor/contribution_inequality/.gitignore === --- trunk/tools/wsor/contribution_inequality/.gitignore (rev 0) +++ trunk/tools/wsor/contribution_inequality/.gitignore 2011-08-18 20:58:24 UTC (rev 94941) @@ -0,0 +1,6 @@ +.*.swp +*.pyc +data/* +dist/* +MANIFEST +build Added: trunk/tools/wsor/contribution_inequality/pages.txt === --- trunk/tools/wsor/contribution_inequality/pages.txt (rev 0) +++ trunk/tools/wsor/contribution_inequality/pages.txt 2011-08-18 20:58:24 UTC (rev 94941) @@ -0,0 +1,118 @@ +Notability +Verifiability +No_original_research +Neutral_point_of_view +Article_titles +What_Wikipedia_is_not +Wikipedia_is_not_a_dictionary +Biographies_of_living_persons +Consensus +Ignore_all_rules +Deletion_policy +Criteria_for_speedy_deletion +Proposed_deletion +Editing_policy +Citing_sources +Disambiguation +Edit_warring +Civility +No_legal_threats +No_personal_attacks +Ownership_of_articles +Sock_puppetry +Conflict_of_interest +Do_not_disrupt_Wikipedia_to_illustrate_a_point +Etiquette +Gaming_the_system +Manual_of_Style +Manual_of_Style_(abbreviations) +Manual_of_Style_(accessibility) +Manual_of_Style_(article_message_boxes) +Manual_of_Style_(biographies) +Manual_of_Style_(capital_letters) +Manual_of_Style_(captions) +Manual_of_Style_(dates_and_numbers) +Manual_of_Style_(disambiguation_pages) +Manual_of_Style_(embedded_lists) +Manual_of_Style_(footnotes) +Manual_of_Style_(icons) +Manual_of_Style_(infoboxes) +Manual_of_Style_(layout) +Manual_of_Style_(lead_section) +Manual_of_Style_(linking) +Manual_of_Style_(lists) +Manual_of_Style_(lists_of_works) +Manual_of_Style_(pronunciation) +Manual_of_Style_(proper_names) +Manual_of_Style_(self-references_to_avoid) +Manual_of_Style_(spelling) +Manual_of_Style_(summary_style) +Manual_of_Style_(tables) +Manual_of_Style_(text_formatting) +Manual_of_Style_(titles) +Manual_of_Style_(trademarks) +Manual_of_Style_(trivia_sections) +Manual_of_Style_(words_to_watch) +Help_desk +Reference_desk/Computing +Reference_desk/Entertainment +Reference_desk/Humanities +Reference_desk/Language +Reference_desk/Mathematics +Reference_desk/Science +Reference_desk/Miscellaneous +Editor%27s_index_to_Wikipedia +Copyright_problems +Contributor_copyright_investigations +External_links/Noticeboard +Fringe_theories/Noticeboard +Neutral_point_of_view/Noticeboard +Reliable_sources/Noticeboard +Administrator_intervention_against_vandalism +Arbitration_Committee/Noticeboard +Arbitration/Requests/Enforcement +Arbitration/Requests +Editor_review +Dispute_resolution_noticeboard +Wikiquette_assistance +Requests_for_mediation +Notability_(academics) +Notability_(books) +Notability_(events) +Notability_(films) +Notability_(music) +Notability_(numbers) +Notability_(people) +Notability_(sports) +Notability_(web) +Notability_(organizations_and_companies) +No_original_research/Noticeboard +Fiction/Noticeboard +Content_forking +Autobiography +Non-free_content_review +Bureaucrats%27_noticeboard +External_links +Fringe_theories +No_disclaimers_in_articles +Offensive_material +Patent_nonsense +Plagiarism +Spam +Wikipedia_is_not_for_things_made_up_one_day +Sexual_content +Vandalism +Please_do_not_bite_the_newcomers +Arbitration/Policy +Banning_policy +Blocking_policy +Administrators +Bot_policy +Copyright_violations +Image_use_policy +Non-free_content_criteria +Be_bold +Categorization/Ethnicity,_gender,_religion_and_sexuality +Categorization_of_people +Categorization +Citing_sources Deleted: trunk/tools/wsor/contribution_inequality/query.py === --- trunk/tools/wsor/contribution_inequality/query.py 2011-08-18 20:56:57 UTC (rev 94940) +++ trunk/tools/wsor/contribution_inequality/query.py 2011-08-18 20:58:24 UTC (rev 94941) @@ -1,28 +0,0 @@ -#!/usr/bin/python -from argparse import ArgumentParser -import os -from oursql import connect - -parser = ArgumentParser() -parser.add_argument('page') -parser.add_argument('year') -parser.add_argument('ns') - -query= -select -user_name, editcount -from giovanni.policy_contributors -where title = ? and year = ? and namespace = ? -order by editcount
[MediaWiki-CVS] SVN: [94942] trunk/tools/wsor/contribution_inequality
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94942 Revision: 94942 Author: giovanni Date: 2011-08-18 20:58:28 + (Thu, 18 Aug 2011) Log Message: --- moved everything to policy_top100/ Added Paths: --- trunk/tools/wsor/contribution_inequality/policy_top100/ trunk/tools/wsor/contribution_inequality/policy_top100/create.sql trunk/tools/wsor/contribution_inequality/policy_top100/pages.txt trunk/tools/wsor/contribution_inequality/policy_top100/query_top100.py trunk/tools/wsor/contribution_inequality/policy_top100/queryall.sh Removed Paths: - trunk/tools/wsor/contribution_inequality/create.sql trunk/tools/wsor/contribution_inequality/pages.txt trunk/tools/wsor/contribution_inequality/query_top100.py trunk/tools/wsor/contribution_inequality/queryall.sh Deleted: trunk/tools/wsor/contribution_inequality/create.sql === --- trunk/tools/wsor/contribution_inequality/create.sql 2011-08-18 20:58:24 UTC (rev 94941) +++ trunk/tools/wsor/contribution_inequality/create.sql 2011-08-18 20:58:28 UTC (rev 94942) @@ -1,133 +0,0 @@ -drop table if exists giovanni.policy_contributors; - -create table giovanni.policy_contributors select -page_title as title, -page_namespace as namespace, -rev_user as user_id, -rev_user_text user_name, -year(rev_timestamp) as year, -count(*) as editcount -from revision join page -on rev_page = page_id -where page_title in ( -Notability, -Verifiability, -No_original_research, -Neutral_point_of_view, -Article_titles, -What_Wikipedia_is_not, -Wikipedia_is_not_a_dictionary, -Biographies_of_living_persons, -Consensus, -Ignore_all_rules, -Deletion_policy, -Criteria_for_speedy_deletion, -Proposed_deletion, -Editing_policy, -Citing_sources, -Disambiguation, -Edit_warring, -Civility, -No_legal_threats, -No_personal_attacks, -Ownership_of_articles, -Sock_puppetry, -Conflict_of_interest, -Do_not_disrupt_Wikipedia_to_illustrate_a_point, -Etiquette, -Gaming_the_system, -Manual_of_Style, -Manual_of_Style_(abbreviations), -Manual_of_Style_(accessibility), -Manual_of_Style_(article_message_boxes), -Manual_of_Style_(biographies), -Manual_of_Style_(capital_letters), -Manual_of_Style_(captions), -Manual_of_Style_(dates_and_numbers), -Manual_of_Style_(disambiguation_pages), -Manual_of_Style_(embedded_lists), -Manual_of_Style_(footnotes), -Manual_of_Style_(icons), -Manual_of_Style_(infoboxes), -Manual_of_Style_(layout), -Manual_of_Style_(lead_section), -Manual_of_Style_(linking), -Manual_of_Style_(lists), -Manual_of_Style_(lists_of_works), -Manual_of_Style_(pronunciation), -Manual_of_Style_(proper_names), -Manual_of_Style_(self-references_to_avoid), -Manual_of_Style_(spelling), -Manual_of_Style_(summary_style), -Manual_of_Style_(tables), -Manual_of_Style_(text_formatting), -Manual_of_Style_(titles), -Manual_of_Style_(trademarks), -Manual_of_Style_(trivia_sections), -Manual_of_Style_(words_to_watch), -Help_desk, -Reference_desk/Computing, -Reference_desk/Entertainment, -Reference_desk/Humanities, -Reference_desk/Language, -Reference_desk/Mathematics, -Reference_desk/Science, -Reference_desk/Miscellaneous, -Editor%27s_index_to_Wikipedia, -Copyright_problems, -Contributor_copyright_investigations, -External_links/Noticeboard, -Fringe_theories/Noticeboard, -Neutral_point_of_view/Noticeboard, -Reliable_sources/Noticeboard, -Administrator_intervention_against_vandalism, -Arbitration_Committee/Noticeboard, -Arbitration/Requests/Enforcement, -Arbitration/Requests, -Editor_review, -Dispute_resolution_noticeboard, -Wikiquette_assistance, -Requests_for_mediation, -Notability_(academics), -Notability_(books), -Notability_(events), -Notability_(films), -Notability_(music), -Notability_(numbers), -Notability_(people), -Notability_(sports), -Notability_(web), -Notability_(organizations_and_companies), -No_original_research/Noticeboard, -Fiction/Noticeboard, -Content_forking, -Autobiography, -Non-free_content_review, -Bureaucrats%27_noticeboard, -External_links, -Fringe_theories, -No_disclaimers_in_articles, -Offensive_material, -Patent_nonsense, -Plagiarism, -Spam, -Wikipedia_is_not_for_things_made_up_one_day, -Sexual_content, -Vandalism, -Please_do_not_bite_the_newcomers, -Arbitration/Policy, -Banning_policy, -Blocking_policy, -Administrators, -Bot_policy, -Copyright_violations, -Image_use_policy, -Non-free_content_criteria, -Be_bold, -Categorization/Ethnicity,_gender,_religion_and_sexuality, -
[MediaWiki-CVS] SVN: [94943] trunk/tools/wsor/contribution_inequality/contrib.sql
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94943 Revision: 94943 Author: giovanni Date: 2011-08-18 20:58:33 + (Thu, 18 Aug 2011) Log Message: --- added contrib.sql Added Paths: --- trunk/tools/wsor/contribution_inequality/contrib.sql Added: trunk/tools/wsor/contribution_inequality/contrib.sql === --- trunk/tools/wsor/contribution_inequality/contrib.sql (rev 0) +++ trunk/tools/wsor/contribution_inequality/contrib.sql2011-08-18 20:58:33 UTC (rev 94943) @@ -0,0 +1,9 @@ +-- user ranking by contribution per namespace per year for main, talk, +-- wikipedia, wikipedia talk +describe +select namespace, year, user_id, sum(edits) as total_contributions +from halfak.giovanni +where namespace in (0,1,4,5) +group by user_id, namespace, year +-- having total_contributions 10 +order by namespace asc, year asc, total_contributions desc; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94944] trunk/tools/wsor/contribution_inequality/contrib.sql
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94944 Revision: 94944 Author: giovanni Date: 2011-08-18 20:58:36 + (Thu, 18 Aug 2011) Log Message: --- fixed sort order Modified Paths: -- trunk/tools/wsor/contribution_inequality/contrib.sql Modified: trunk/tools/wsor/contribution_inequality/contrib.sql === --- trunk/tools/wsor/contribution_inequality/contrib.sql2011-08-18 20:58:33 UTC (rev 94943) +++ trunk/tools/wsor/contribution_inequality/contrib.sql2011-08-18 20:58:36 UTC (rev 94944) @@ -1,9 +1,9 @@ -- user ranking by contribution per namespace per year for main, talk, -- wikipedia, wikipedia talk -describe + select namespace, year, user_id, sum(edits) as total_contributions from halfak.giovanni -where namespace in (0,1,4,5) +where namespace in (0,1,4,5) and user_id 0 group by user_id, namespace, year --- having total_contributions 10 -order by namespace asc, year asc, total_contributions desc; +-- having total_contributions = 1000 +order by namespace, year, total_contributions; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94945] trunk/tools/wsor/contribution_inequality/ginichart.py
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94945 Revision: 94945 Author: giovanni Date: 2011-08-18 20:58:40 + (Thu, 18 Aug 2011) Log Message: --- added ginichart.py Added Paths: --- trunk/tools/wsor/contribution_inequality/ginichart.py Added: trunk/tools/wsor/contribution_inequality/ginichart.py === --- trunk/tools/wsor/contribution_inequality/ginichart.py (rev 0) +++ trunk/tools/wsor/contribution_inequality/ginichart.py 2011-08-18 20:58:40 UTC (rev 94945) @@ -0,0 +1,104 @@ +#!/usr/bin/python +''' computes gini coefficient of contribution to namespace per year ''' + +import os +import sys +import csv + +import numpy as np +import matplotlib.pyplot as pp + +from itertools import groupby +from contextlib import closing +from argparse import ArgumentParser +from matplotlib.font_manager import FontProperties + +parser = ArgumentParser(description=__doc__) +parser.add_argument('data_path', metavar='data') +parser.add_argument('-T', '--title') + +colors = 'bgrcmykw' +styles = ['-', '--', '-.', ':'] +markers = 'ov^1234' + +def gini(x): +''' +Computes an estimator of the Gini coefficient from an array x +Parameters +-- +x - a flat array of observations + +References +-- +http://mathworld.wolfram.com/GiniCoefficient.html +''' +x.sort() # sorts in non-decreasing order +n = float(len(x)) +i = np.arange(len(x)) + 1 +m = np.mean(x) +return np.sum((2 * i - n - 1) * x) / ( n ** 2 * m) * (n / (n - 1)) + +def igini(flatiter): +''' +Computes an estimator of the Gini coefficient from a sorted iterator on a +flat sample of observations + +Parameters +-- +flatiter - an iterator over observations, sorted in non-decreasing order + +References +-- +http://en.wikipedia.org/wiki/Gini_coefficient +http://mathworld.wolfram.com/GiniCoefficient.html +''' +den = 0.0 +num = 0.0 +for i, y in enumerate(flatiter): +num += (i + 1) * y +den += y +n = i + 1 +return 1 - (2.0 / (n - 1)) * (n - num / den) * (n / (n - 1)) + +if __name__ == '__main__': + +ns = parser.parse_args() + +g = [] + +with closing(open(ns.data_path)) as f: +reader = csv.DictReader(f, delimiter='\t', quoting=csv.QUOTE_NONE) +groupfunc = lambda row : map(int, (row['namespace'], row['year'])) +for key, subiter in groupby(reader, groupfunc): +flatiter = ( float(row['total_contributions']) for row in subiter ) +try: +g.append((tuple(key) + (igini(flatiter),))) +except ZeroDivisionError: # due to passing an empty iterator to igini +g.append((tuple(key) + (np.nan,))) + +figure = pp.figure(figsize=(8,4)) +ax = figure.add_axes(pp.axes([.1,.1,.8,.8], axisbg='whitesmoke')) +i = 0 +M = len(markers) +C = len(colors) +S = len(styles) + +for key, subiter in groupby(g, lambda k : k[0]): +data = np.asarray([ (y,g) for n, y, g in subiter ]) +label = 'NS %d' % key +ax.plot(data.T[0], data.T[1], label=label, marker=markers[i % M], +color=colors[i % C], linestyle=styles[i % S]) +i += 1 + +pp.ylabel('Gini coefficient') +pp.legend(loc='best', prop=FontProperties(size='small')) +pp.ylim(0,1) +pp.draw() +if ns.title: +pp.title(ns.title) +figure_path = 'gini_' + ns.title.replace(' ', '_') + '.pdf' +else: +figure_path = 'gini_' + os.path.splitext(ns.data_path)[0] + '.pdf' +pp.savefig(figure_path, fmt='pdf') +print 'output saved to %s' % figure_path +pp.show() Property changes on: trunk/tools/wsor/contribution_inequality/ginichart.py ___ Added: svn:executable + * ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94946] trunk/phase3/includes/ProxyTools.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94946 Revision: 94946 Author: ialex Date: 2011-08-18 21:04:29 + (Thu, 18 Aug 2011) Log Message: --- Removed mention of AOL, no longer true since r39892 Modified Paths: -- trunk/phase3/includes/ProxyTools.php Modified: trunk/phase3/includes/ProxyTools.php === --- trunk/phase3/includes/ProxyTools.php2011-08-18 20:58:40 UTC (rev 94945) +++ trunk/phase3/includes/ProxyTools.php2011-08-18 21:04:29 UTC (rev 94946) @@ -43,9 +43,10 @@ } /** - * Checks if an IP is a trusted proxy providor - * Useful to tell if X-Fowarded-For data is possibly bogus - * Squid cache servers for the site and AOL are whitelisted + * Checks if an IP is a trusted proxy providor. + * Useful to tell if X-Fowarded-For data is possibly bogus. + * Squid cache servers for the site are whitelisted. + * * @param $ip String * @return bool */ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94947] branches/wmf/1.17wmf1/resources/jquery.ui/themes/vector/jquery .ui.button.css
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94947 Revision: 94947 Author: catrope Date: 2011-08-18 21:13:17 + (Thu, 18 Aug 2011) Log Message: --- 1.17wmf1: MFT r91499, r92846 Modified Paths: -- branches/wmf/1.17wmf1/resources/jquery.ui/themes/vector/jquery.ui.button.css Modified: branches/wmf/1.17wmf1/resources/jquery.ui/themes/vector/jquery.ui.button.css === --- branches/wmf/1.17wmf1/resources/jquery.ui/themes/vector/jquery.ui.button.css 2011-08-18 21:04:29 UTC (rev 94946) +++ branches/wmf/1.17wmf1/resources/jquery.ui/themes/vector/jquery.ui.button.css 2011-08-18 21:13:17 UTC (rev 94947) @@ -9,22 +9,22 @@ /*button text element */ .ui-button .ui-button-text { display: block; line-height: 1.4em; } -.ui-button-text-only .ui-button-text { padding: .125em .25em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -999px; } -.ui-button-text-icon-primary .ui-button-text { padding: 0.1em 0.8em 0.1em 1.9em; } -.ui-button-text-icon-secondary .ui-button-text { padding: .1em 1.9em .1em 0.8em; } -.ui-button-text-icons .ui-button-text { padding: 0.1em 1.9em 0.1em 1.9em; } +.ui-button-text-only .ui-button-text { padding: 0.3em 1em 0.25em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: 0.3em; text-indent: -999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: 0.3em 1em 0.25em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: 0.3em 2.1em 0.25em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } /* for older versions of jQuery UI */ -.ui-button-text-icon .ui-button-text { padding: 0.1em 0.8em 0.1em 1.9em; } +.ui-button-text-icon .ui-button-text { padding: 0.3em 1em 0.3em 2.1em; } /* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } +input.ui-button { padding: 0.3em 1em; } /*button icon element(s) */ .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -9px; } .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: 0.5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icon .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: 0.5em; } /*button sets*/ .ui-buttonset { margin-right: 7px; } @@ -36,7 +36,7 @@ body .ui-button { -moz-border-radius: 4px; -webkit-border-radius: 4px; - padding: 0.2em 0.6em 0.15em !important; + border-radius: 4px; margin: 0.5em 0 0.5em 0.4em !important; border: 1px solid #a6a6a6 !important; /* @embed */ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94948] trunk/tools/planet/fr/config.ini
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94948 Revision: 94948 Author: ialex Date: 2011-08-18 21:17:44 + (Thu, 18 Aug 2011) Log Message: --- added blog per request on IRC Modified Paths: -- trunk/tools/planet/fr/config.ini Modified: trunk/tools/planet/fr/config.ini === --- trunk/tools/planet/fr/config.ini2011-08-18 21:13:17 UTC (rev 94947) +++ trunk/tools/planet/fr/config.ini2011-08-18 21:17:44 UTC (rev 94948) @@ -221,4 +221,7 @@ name=Wikitrekk [http://littletony87.unblog.fr/feed/] -name=littletony87 \ No newline at end of file +name=littletony87 + +[http://canardwp.wordpress.com/category/wikipedia/feed/atom/] +name=CanardWP ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94949] trunk/extensions/CodeReview
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94949 Revision: 94949 Author: hashar Date: 2011-08-18 21:28:40 + (Thu, 18 Aug 2011) Log Message: --- converts diff view from pre to tables The diff is now an HTML table with each diff lines converted from a span to a table line. CSS has been altered to offer a rendering much like the pre rendering with vector. Looks identical with Safari 5.1, Opera 10.63, Firefox 5 3.5. Modified Paths: -- trunk/extensions/CodeReview/backend/DiffHighlighter.php trunk/extensions/CodeReview/modules/ext.codereview.styles.css Modified: trunk/extensions/CodeReview/backend/DiffHighlighter.php === --- trunk/extensions/CodeReview/backend/DiffHighlighter.php 2011-08-18 21:17:44 UTC (rev 94948) +++ trunk/extensions/CodeReview/backend/DiffHighlighter.php 2011-08-18 21:28:40 UTC (rev 94949) @@ -12,9 +12,9 @@ * @return string */ function render( $text ) { - return 'pre class=mw-codereview-diff' . + return 'table class=mw-codereview-diff' . $this-splitLines( $text ) . - /pre\n; + /table\n; } /** @@ -41,7 +41,7 @@ return ; // don't create bogus spans } list( $element, $attribs ) = $this-tagForLine( $line ); - return Xml::element( $element, $attribs, $line ); + return tr.Xml::element( $element, $attribs, $line )./tr; } /** @@ -50,12 +50,12 @@ * @return array */ function tagForLine( $line ) { - static $default = array( 'span', array() ); + static $default = array( 'td', array() ); static $tags = array( - '-' = array( 'del', array() ), - '+' = array( 'ins', array() ), - '@' = array( 'span', array( 'class' = 'meta' ) ), - ' ' = array( 'span', array() ), + '-' = array( 'td', array( 'class' = 'del' ) ), + '+' = array( 'td', array( 'class' = 'ins' ) ), + '@' = array( 'td', array( 'class' = 'meta' ) ), + ' ' = array( 'td', array() ), ); $first = substr( $line, 0, 1 ); if ( isset( $tags[$first] ) ) { Modified: trunk/extensions/CodeReview/modules/ext.codereview.styles.css === --- trunk/extensions/CodeReview/modules/ext.codereview.styles.css 2011-08-18 21:17:44 UTC (rev 94948) +++ trunk/extensions/CodeReview/modules/ext.codereview.styles.css 2011-08-18 21:28:40 UTC (rev 94949) @@ -131,15 +131,47 @@ } /* Diffs */ -.mw-codereview-diff pre { +.mw-codereview-diff table { /* @noflip */direction: ltr; /* Source code is always LTR */ + + /* mimic MediaWiki pre style */ + font-family: monospace, Courer New; + line-height: 1.3em; + background-color: #F9F9F9; + border: 1px dashed #2F6FAB; + color: black; + + /* fix up space between tr */ + border-collapse: collapse; } -.mw-codereview-diff ins { +.mw-codereview-diff td { + margin:0; + + /* keep padding on left and right just like pre +* top bottom paddings are defined below for first/last childs +*/ + padding:0 1em; + + /* respect white spaces just like pre */ + white-space: pre; +} + +/* table border-collapse: collapse; overrides padding + * The two next rules mimic pre padding by applying one to the first + * and last childs + */ +.mw-codereview-diff tr:first-child td { + padding-top: 1em; +} +.mw-codereview-diff tr:last-child td { + padding-bottom: 1em; +} + +.mw-codereview-diff td.ins { text-decoration: none; color: green; } - -.mw-codereview-diff del { +.mw-codereview-diff td.del { text-decoration: none; color: red; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94950] trunk/extensions/CodeReview/tests/CodeReviewTest.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94950 Revision: 94950 Author: hashar Date: 2011-08-18 21:28:46 + (Thu, 18 Aug 2011) Log Message: --- update test to use MediaWikiTestCase class The CodeReview extension PHPUnit tests were still using the old PHPUnit_Framework_TestCase. Make it extends MediaWikiTestCase instead TEST PLAN: $ ./phpunit.php --filter CodeReview PHPUnit 3.5.14 by Sebastian Bergmann. .. Time: 5 seconds, Memory: 34.75Mb OK (2 tests, 9 assertions) $ Modified Paths: -- trunk/extensions/CodeReview/tests/CodeReviewTest.php Modified: trunk/extensions/CodeReview/tests/CodeReviewTest.php === --- trunk/extensions/CodeReview/tests/CodeReviewTest.php2011-08-18 21:28:40 UTC (rev 94949) +++ trunk/extensions/CodeReview/tests/CodeReviewTest.php2011-08-18 21:28:46 UTC (rev 94950) @@ -1,6 +1,6 @@ ?php -class CodeReviewTest extends PHPUnit_Framework_TestCase { +class CodeReviewTest extends MediaWikiTestCase { private function createRepo() { $row = new stdClass(); $row-repo_id = 1; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94951] trunk/extensions/CodeReview
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94951 Revision: 94951 Author: hashar Date: 2011-08-18 21:28:51 + (Thu, 18 Aug 2011) Log Message: --- new method to parse chunk delimiters Their format is a one liner: @@ -l,s +l,s @@ See http://en.wikipedia.org/wiki/Diff#Unified_format Modified Paths: -- trunk/extensions/CodeReview/CodeReview.php trunk/extensions/CodeReview/backend/DiffHighlighter.php Added Paths: --- trunk/extensions/CodeReview/tests/DiffHighlighterTest.php Modified: trunk/extensions/CodeReview/CodeReview.php === --- trunk/extensions/CodeReview/CodeReview.php 2011-08-18 21:28:46 UTC (rev 94950) +++ trunk/extensions/CodeReview/CodeReview.php 2011-08-18 21:28:51 UTC (rev 94951) @@ -311,6 +311,7 @@ function efCodeReviewUnitTests( $files ) { $files[] = dirname( __FILE__ ) . '/tests/CodeReviewTest.php'; + $files[] = dirname( __FILE__ ) . '/tests/DiffHighlighterTest.php'; return true; } Modified: trunk/extensions/CodeReview/backend/DiffHighlighter.php === --- trunk/extensions/CodeReview/backend/DiffHighlighter.php 2011-08-18 21:28:46 UTC (rev 94950) +++ trunk/extensions/CodeReview/backend/DiffHighlighter.php 2011-08-18 21:28:51 UTC (rev 94951) @@ -65,4 +65,36 @@ } } + /** +* Parse unified diff change chunk header. +* +* The format represents two ranges for the left (prefixed with -) and right +* file (prefixed with +). +* The format looks like: +* @@ -l,s +l,s @@ +* +* Where: +* - l is the starting line number +* - s is the number of lines the change hunk applies to +* +* NOTE: visibility is 'public' since the function covered by tests. +* +* @param $chunk string a one line chunk as described above +* @return array with the four values above as an array +*/ + static function parseChunkDelimiter( $chunkHeader ) { + # regex snippet to capture a number + $n = (\d+); + + $matches = preg_match( /^@@ -$n,$n \+$n,$n @@$/, $chunkHeader, $m ); + array_shift( $m ); + + if( $matches !== 1 ) { + # We really really should have matched something! + throw new MWException( + __METHOD__ . given an invalid chunk header \n + ); + } + return $m; + } } Added: trunk/extensions/CodeReview/tests/DiffHighlighterTest.php === --- trunk/extensions/CodeReview/tests/DiffHighlighterTest.php (rev 0) +++ trunk/extensions/CodeReview/tests/DiffHighlighterTest.php 2011-08-18 21:28:51 UTC (rev 94951) @@ -0,0 +1,28 @@ +?php + +class CodeDiffHighlighterTest extends MediaWikiTestCase { + + /** +* @dataProvider provideUnifiedDiffChunksDelimiters +*/ + function testParseChunkDelimiters( $expected, $delimiter ) { + $this-assertEquals( + $expected, + CodeDiffHighlighter::parseChunkDelimiter( $delimiter ) + ); + } + + function provideUnifiedDiffChunksDelimiters() { + return array( /* expected array, chunk delimiter */ + array( + array( 1, 3, 1, 4), + '@@ -1,3 +1,4 @@' + ), + array( + array( 76, 17, 76, 21 ), + '@@ -76,17 +76,21 @@' + ), + ); + } + +} ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94952] trunk/debs/varnish3/debian
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94952 Revision: 94952 Author: asher Date: 2011-08-18 21:38:49 + (Thu, 18 Aug 2011) Log Message: --- varnishncsa -f (use xff ip's) option changed default log format, now more like wmf squidlogs Modified Paths: -- trunk/debs/varnish3/debian/changelog trunk/debs/varnish3/debian/patches/01-varnishncsa-udp.dpatch Modified: trunk/debs/varnish3/debian/changelog === --- trunk/debs/varnish3/debian/changelog2011-08-18 21:28:51 UTC (rev 94951) +++ trunk/debs/varnish3/debian/changelog2011-08-18 21:38:49 UTC (rev 94952) @@ -1,3 +1,9 @@ +varnish3 (3.0.0-1wmf4) lucid; urgency=low + + * -f (xff ip's) option defaulted to ncsa log format, now like wmf squids + + -- Asher Feldman afled...@wikimedia.org Thu, 18 Aug 2011 21:32:29 + + varnish3 (3.0.0-1wmf3) lucid; urgency=low * Increase mcast ttl from 1 to 6 @@ -2,3 +8,3 @@ - -- Asher Feldman afled...@wikimedia.org Thu, 15 Aug 2011 20:32:29 + + -- Asher Feldman afled...@wikimedia.org Mon, 15 Aug 2011 20:32:29 + Modified: trunk/debs/varnish3/debian/patches/01-varnishncsa-udp.dpatch === --- trunk/debs/varnish3/debian/patches/01-varnishncsa-udp.dpatch 2011-08-18 21:28:51 UTC (rev 94951) +++ trunk/debs/varnish3/debian/patches/01-varnishncsa-udp.dpatch 2011-08-18 21:38:49 UTC (rev 94952) @@ -2,12 +2,12 @@ ## 01-varnishncsa-udp.dpatch by r...@ragweed.knams.wikimedia.org ## ## All lines beginning with `## DP:' are a description of the patch. -## DP: add udp multicast support, seq number +## DP: multicast udp logging w/seq numbering @DPATCH@ --- varnish3-3.0.0~/bin/varnishncsa/varnishncsa.c 2011-08-09 23:55:17.0 + -+++ varnish3-3.0.0/bin/varnishncsa/varnishncsa.c 2011-08-11 21:22:37.0 + varnish3-3.0.0/bin/varnishncsa/varnishncsa.c 2011-08-18 21:22:53.0 + @@ -79,6 +79,13 @@ #include varnishapi.h #include base64.h @@ -127,3 +127,12 @@ vd = VSM_New(); VSL_Setup(vd); +@@ -739,7 +794,7 @@ + fprintf(stderr, -f and -F can not be combined\n); + exit(1); + } +- format = %{X-Forwarded-For}i %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-agent}i\; ++ format = %{X-Forwarded-For}i %n %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-agent}i\; + format_flag = 1; + break; + case 'F': ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94953] branches/wmf/1.17wmf1/extensions/WikiLove/
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94953 Revision: 94953 Author: catrope Date: 2011-08-18 21:49:01 + (Thu, 18 Aug 2011) Log Message: --- 1.17wmf1: Delete WikiLove so I can rebranch it Removed Paths: - branches/wmf/1.17wmf1/extensions/WikiLove/ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94954] trunk/tools/wsor/contribution_inequality/topcontributors.py
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94954 Revision: 94954 Author: giovanni Date: 2011-08-18 21:49:56 + (Thu, 18 Aug 2011) Log Message: --- added script to list top contributors by year and namespace Added Paths: --- trunk/tools/wsor/contribution_inequality/topcontributors.py Added: trunk/tools/wsor/contribution_inequality/topcontributors.py === --- trunk/tools/wsor/contribution_inequality/topcontributors.py (rev 0) +++ trunk/tools/wsor/contribution_inequality/topcontributors.py 2011-08-18 21:49:56 UTC (rev 94954) @@ -0,0 +1,32 @@ +#!/usr/bin/python + +''' lists top contributors by year and namespace ''' + +import os +import sys +import csv + +from itertools import groupby +from contextlib import closing +from argparse import ArgumentParser +from collections import deque + +parser = ArgumentParser(description=__doc__) +parser.add_argument('data_path', metavar='data') +parser.add_argument('maxlen', metavar='number', type=int) + +if __name__ == '__main__': + +ns = parser.parse_args() + +with closing(open(ns.data_path)) as f: +reader = csv.DictReader(f, delimiter='\t', quoting=csv.QUOTE_NONE) +groupfunc = lambda row : (row['namespace'], row['year']) +for key, subiter in groupby(reader, groupfunc): +# smart way to keep only the tail +users = deque((row['user_id'] for row in subiter ), maxlen=ns.maxlen) +print '\t'.join(key + tuple(users)) +sys.stdout.flush() + + + Property changes on: trunk/tools/wsor/contribution_inequality/topcontributors.py ___ Added: svn:executable + * ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94955] branches/wmf/1.17wmf1/extensions/WikiLove/
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94955 Revision: 94955 Author: catrope Date: 2011-08-18 21:52:20 + (Thu, 18 Aug 2011) Log Message: --- 1.17wmf1: Rebranch WikiLove from trunk Added Paths: --- branches/wmf/1.17wmf1/extensions/WikiLove/ ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94956] trunk/extensions/UploadWizard/resources/jquery/jquery. mwCoolCats.css
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94956 Revision: 94956 Author: neilk Date: 2011-08-18 22:04:42 + (Thu, 18 Aug 2011) Log Message: --- fix bug #30453, categories button too small Modified Paths: -- trunk/extensions/UploadWizard/resources/jquery/jquery.mwCoolCats.css Modified: trunk/extensions/UploadWizard/resources/jquery/jquery.mwCoolCats.css === --- trunk/extensions/UploadWizard/resources/jquery/jquery.mwCoolCats.css 2011-08-18 21:52:20 UTC (rev 94955) +++ trunk/extensions/UploadWizard/resources/jquery/jquery.mwCoolCats.css 2011-08-18 22:04:42 UTC (rev 94956) @@ -50,12 +50,6 @@ position: static; } -/* Make category add button smaller */ -.cat-widget .ui-button-text { - padding: 0; -} - - /* Utilities */ .pkg:after, #content-inner:after { content: ; ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94957] trunk/tools/wsor/contribution_inequality/topcontributors.py
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94957 Revision: 94957 Author: giovanni Date: 2011-08-18 22:59:04 + (Thu, 18 Aug 2011) Log Message: --- now topcontributors.py plots the set similarity of top users over the years Modified Paths: -- trunk/tools/wsor/contribution_inequality/topcontributors.py Modified: trunk/tools/wsor/contribution_inequality/topcontributors.py === --- trunk/tools/wsor/contribution_inequality/topcontributors.py 2011-08-18 22:04:42 UTC (rev 94956) +++ trunk/tools/wsor/contribution_inequality/topcontributors.py 2011-08-18 22:59:04 UTC (rev 94957) @@ -8,25 +8,77 @@ from itertools import groupby from contextlib import closing -from argparse import ArgumentParser +from argparse import ArgumentParser, FileType from collections import deque +from matplotlib.font_manager import FontProperties +from datetime import date +import numpy as np +import matplotlib.pyplot as pp + parser = ArgumentParser(description=__doc__) parser.add_argument('data_path', metavar='data') -parser.add_argument('maxlen', metavar='number', type=int) +parser.add_argument('output_file', metavar='output_file', type=FileType('w')) +parser.add_argument('-t', '--top', dest='maxlen', type=int, default=100, +help='Top users to list. default: %(default)d', metavar='NUM') +colors = 'bgrcmykw' +styles = ['-', '--', '-.', ':'] +markers = 'ov^1234' + if __name__ == '__main__': ns = parser.parse_args() - +databyns = {} + with closing(open(ns.data_path)) as f: reader = csv.DictReader(f, delimiter='\t', quoting=csv.QUOTE_NONE) groupfunc = lambda row : (row['namespace'], row['year']) for key, subiter in groupby(reader, groupfunc): # smart way to keep only the tail users = deque((row['user_id'] for row in subiter ), maxlen=ns.maxlen) -print '\t'.join(key + tuple(users)) -sys.stdout.flush() +print ns.output_file, '\t'.join(key + tuple(users)) +ns.output_file.flush() +NS, year = map(int, key) +try: +databyns[NS].append((year, set(users))) +except KeyError: +databyns[NS] = [ (year, set(users)) ] + +figure = pp.figure(figsize=(8,4)) +ax = figure.add_axes(pp.axes([.1,.1,.8,.8], axisbg='whitesmoke')) +i = 0 +M = len(markers) +C = len(colors) +S = len(styles) + +for key in databyns: +years, users = zip(*databyns[key]) +years = [ date(year, 1, 1) for year in years ] +I = np.asfarray(map(len, map(set.intersection, users[1:], users[:-1]))) +U = np.asfarray(map(len, map(set.union, users[1:], users[:-1]))) +label = 'NS %s' % key + +ax.plot(years[1:], I / U, label=label, marker=markers[i % M], +color=colors[i % C], linestyle=styles[i % S]) +i += 1 + +pp.ylim(0,1) +pp.ylabel('similarity') +pp.title('Top %d contributors' % ns.maxlen) +pp.legend(loc='best', prop=FontProperties(size='small')) +pp.draw() + +if not ns.output_file.isatty(): +figure_path = os.path.splitext(ns.output_file.name)[0] + '.pdf' +pp.savefig(figure_path, fmt='pdf') +print 'figure saved to %s' % figure_path +print 'output saved to %s' % ns.output_file.name + +pp.show() +if not ns.output_file.isatty(): +ns.output_file.close() + ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94958] trunk/extensions/MobileFrontend
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94958 Revision: 94958 Author: preilly Date: 2011-08-18 23:08:56 + (Thu, 18 Aug 2011) Log Message: --- fix for bug 30118 provided by johnduhart Modified Paths: -- trunk/extensions/MobileFrontend/MobileFrontend.php trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php Modified: trunk/extensions/MobileFrontend/MobileFrontend.php === --- trunk/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 22:59:04 UTC (rev 94957) +++ trunk/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 23:08:56 UTC (rev 94958) @@ -42,11 +42,20 @@ $wgAutoloadClasses['DeviceDetection'] = $cwd . 'DeviceDetection.php'; $wgAutoloadClasses['CssDetection'] = $cwd . 'CssDetection.php'; +/** + * Path to the logo used in the mobile view + * + * Should be 22px tall at most + */ +$wgMobileFrontendLogo = false; + + $wgExtMobileFrontend = new ExtMobileFrontend(); $wgHooks['BeforePageDisplay'][] = array( $wgExtMobileFrontend, 'beforePageDisplayHTML' ); $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( $wgExtMobileFrontend, 'addMobileFooter' ); +$wgExtensionFunctions[] = array( $wgExtMobileFrontend, 'setDefaultLogo' ); /** * Make the classes stripped from page content configurable. Each item will @@ -61,7 +70,7 @@ ); class ExtMobileFrontend { - const VERSION = '0.5.36'; + const VERSION = '0.5.37'; /** * @var DOMDocument @@ -748,4 +757,14 @@ return $applicationHtml; } + + /** +* Sets up the default logo image used in mobile view if none is set +*/ + public function setDefaultLogo() { + global $wgMobileFrontendLogo, $wgExtensionAssetsPath; + if ( $wgMobileFrontendLogo === false ) { + $wgMobileFrontendLogo = $wgExtensionAssetsPath . '/MobileFrontend/stylesheets/images/mw.png'; + } + } } Modified: trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php === --- trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php 2011-08-18 22:59:04 UTC (rev 94957) +++ trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php 2011-08-18 23:08:56 UTC (rev 94958) @@ -1,5 +1,5 @@ ?php -global $wgExtensionAssetsPath; +global $wgExtensionAssetsPath, $wgMobileFrontendLogo; $searchField = self::$searchField; $mainPageUrl = self::$mainPageUrl; @@ -12,7 +12,7 @@ $searchWebkitHtml = EOD div id='header' div id='searchbox' -img alt='W logo' id='logo' src='{$wgExtensionAssetsPath}/MobileFrontend/stylesheets/images/w.gif' / + img alt='Logo' id='logo' src='{$wgMobileFrontendLogo}' / form action='{$scriptUrl}' class='search_bar' method='get' input type=hidden value=Special:Search name=title / input type=hidden value=Search name=fulltext / ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94959] branches/salvatoreingala/Gadgets
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94959 Revision: 94959 Author: salvatoreingala Date: 2011-08-18 23:09:32 + (Thu, 18 Aug 2011) Log Message: --- - Removed ugly alerts used by ext.gadgets.preferences.js when saving preferences, using pretty messages instead. - Now the Save button is disabled if there are no changes. - Minor improvements and documentation in jquery.formbuilder.js. Modified Paths: -- branches/salvatoreingala/Gadgets/Gadgets.i18n.php branches/salvatoreingala/Gadgets/backend/GadgetHooks.php branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.js branches/salvatoreingala/Gadgets/ui/resources/jquery.formBuilder.js Added Paths: --- branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.css Modified: branches/salvatoreingala/Gadgets/Gadgets.i18n.php === --- branches/salvatoreingala/Gadgets/Gadgets.i18n.php 2011-08-18 23:08:56 UTC (rev 94958) +++ branches/salvatoreingala/Gadgets/Gadgets.i18n.php 2011-08-18 23:09:32 UTC (rev 94959) @@ -46,8 +46,9 @@ 'gadgets-configure' = 'Configure', 'gadgets-configuration-of' = 'Configuration of $1', 'gadgets-prefs-save' = 'Save', - 'gadgets-prefs-cancel' = 'Cancel', + 'gadgets-prefs-close' = 'Close', 'gadgets-unexpected-error' = 'An unexpected error occurred. Please check your connection. If the problems persists, please contact the developers.', + 'gadgets-save-invalid' = 'There are fields with invalid value.', 'gadgets-save-success' = 'Settings saved successfully.', 'gadgets-save-failed' = 'Failed to save settings. If the problems persists, please contact the developers.', 'gadgets-ajax-wrongparams' = 'An AJAX request with wrong parameters has been made; this is most likely a bug.', Modified: branches/salvatoreingala/Gadgets/backend/GadgetHooks.php === --- branches/salvatoreingala/Gadgets/backend/GadgetHooks.php2011-08-18 23:08:56 UTC (rev 94958) +++ branches/salvatoreingala/Gadgets/backend/GadgetHooks.php2011-08-18 23:09:32 UTC (rev 94959) @@ -131,14 +131,15 @@ //Register the ext.gadgets.preferences module //TODO: fix caching issues for user-defined messages $resourceLoader-register( 'ext.gadgets.preferences', array( - 'scripts' = array( 'ext.gadgets.preferences.js' ), - 'dependencies' = array( + 'scripts' = array( 'ext.gadgets.preferences.js' ), + 'styles'= array( 'ext.gadgets.preferences.css' ), + 'dependencies' = array( 'jquery', 'jquery.json', 'jquery.ui.dialog', 'jquery.formBuilder', 'mediawiki.htmlform', 'ext.gadgets' ), 'messages' = array_merge( $messages, array( - 'gadgets-configure', 'gadgets-configuration-of', 'gadgets-prefs-save', 'gadgets-prefs-cancel', - 'gadgets-unexpected-error', 'gadgets-save-success', 'gadgets-save-failed' + 'gadgets-configure', 'gadgets-configuration-of', 'gadgets-prefs-save', 'gadgets-prefs-close', + 'gadgets-unexpected-error', 'gadgets-save-invalid', 'gadgets-save-success', 'gadgets-save-failed' ) ), 'localBasePath' = dirname( dirname( __FILE__ ) ) . '/ui/resources/', 'remoteExtPath' = 'Gadgets/ui/resources' Added: branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.css === --- branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.css (rev 0) +++ branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.css 2011-08-18 23:09:32 UTC (rev 94959) @@ -0,0 +1,17 @@ +/* + * Styles for ext.gadgets.preferences module + */ + +#mw-gadgets-prefsDialog-message { + float: right; + padding: 4px; + margin: 4px 25px 4px 4px; + -o-box-shadow: 2px 2px 4px 3px #aa; + -webkit-box-shadow: 2px 2px 3px 3px #aa; + -moz-box-shadow: 2px 2px 3px 3px #aa; + box-shadow: 2px 2px 3px 3px #aa; + -o-border-radius: 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} Property changes on: branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.css ___ Added: svn:eol-style + native Modified: branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.js
[MediaWiki-CVS] SVN: [94960] branches/wmf/1.17wmf1/extensions/MobileFrontend
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94960 Revision: 94960 Author: preilly Date: 2011-08-18 23:09:59 + (Thu, 18 Aug 2011) Log Message: --- mft r94958 Modified Paths: -- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/_search_webkit.html.php Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php === --- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 23:09:32 UTC (rev 94959) +++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 23:09:59 UTC (rev 94960) @@ -42,11 +42,20 @@ $wgAutoloadClasses['DeviceDetection'] = $cwd . 'DeviceDetection.php'; $wgAutoloadClasses['CssDetection'] = $cwd . 'CssDetection.php'; +/** + * Path to the logo used in the mobile view + * + * Should be 22px tall at most + */ +$wgMobileFrontendLogo = false; + + $wgExtMobileFrontend = new ExtMobileFrontend(); $wgHooks['BeforePageDisplay'][] = array( $wgExtMobileFrontend, 'beforePageDisplayHTML' ); $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( $wgExtMobileFrontend, 'addMobileFooter' ); +$wgExtensionFunctions[] = array( $wgExtMobileFrontend, 'setDefaultLogo' ); /** * Make the classes stripped from page content configurable. Each item will @@ -61,7 +70,7 @@ ); class ExtMobileFrontend { - const VERSION = '0.5.36'; + const VERSION = '0.5.37'; /** * @var DOMDocument @@ -748,4 +757,14 @@ return $applicationHtml; } + + /** +* Sets up the default logo image used in mobile view if none is set +*/ + public function setDefaultLogo() { + global $wgMobileFrontendLogo, $wgExtensionAssetsPath; + if ( $wgMobileFrontendLogo === false ) { + $wgMobileFrontendLogo = $wgExtensionAssetsPath . '/MobileFrontend/stylesheets/images/mw.png'; + } + } } Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/_search_webkit.html.php === --- branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/_search_webkit.html.php 2011-08-18 23:09:32 UTC (rev 94959) +++ branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/_search_webkit.html.php 2011-08-18 23:09:59 UTC (rev 94960) @@ -1,5 +1,5 @@ ?php -global $wgExtensionAssetsPath; +global $wgExtensionAssetsPath, $wgMobileFrontendLogo; $searchField = self::$searchField; $mainPageUrl = self::$mainPageUrl; @@ -12,7 +12,7 @@ $searchWebkitHtml = EOD div id='header' div id='searchbox' -img alt='W logo' id='logo' src='{$wgExtensionAssetsPath}/MobileFrontend/stylesheets/images/w.gif' / + img alt='Logo' id='logo' src='{$wgMobileFrontendLogo}' / form action='{$scriptUrl}' class='search_bar' method='get' input type=hidden value=Special:Search name=title / input type=hidden value=Search name=fulltext / ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94961] trunk/extensions/MobileFrontend/stylesheets/images/mw.png
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94961 Revision: 94961 Author: preilly Date: 2011-08-18 23:12:06 + (Thu, 18 Aug 2011) Log Message: --- adding default icon Added Paths: --- trunk/extensions/MobileFrontend/stylesheets/images/mw.png Added: trunk/extensions/MobileFrontend/stylesheets/images/mw.png === (Binary files differ) Property changes on: trunk/extensions/MobileFrontend/stylesheets/images/mw.png ___ Added: svn:mime-type + image/png ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94962] branches/wmf/1.17wmf1/extensions/MobileFrontend/stylesheets/ images/mw.png
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94962 Revision: 94962 Author: preilly Date: 2011-08-18 23:13:48 + (Thu, 18 Aug 2011) Log Message: --- mft r94961 Added Paths: --- branches/wmf/1.17wmf1/extensions/MobileFrontend/stylesheets/images/mw.png Added: branches/wmf/1.17wmf1/extensions/MobileFrontend/stylesheets/images/mw.png === (Binary files differ) Property changes on: branches/wmf/1.17wmf1/extensions/MobileFrontend/stylesheets/images/mw.png ___ Added: svn:mime-type + image/png ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94963] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94963 Revision: 94963 Author: reedy Date: 2011-08-18 23:16:11 + (Thu, 18 Aug 2011) Log Message: --- * (bug 30451) Add page_props to RefreshLinks::deleteLinksFromNonexistent Modified Paths: -- trunk/phase3/RELEASE-NOTES-1.19 trunk/phase3/maintenance/refreshLinks.php Modified: trunk/phase3/RELEASE-NOTES-1.19 === --- trunk/phase3/RELEASE-NOTES-1.19 2011-08-18 23:13:48 UTC (rev 94962) +++ trunk/phase3/RELEASE-NOTES-1.19 2011-08-18 23:16:11 UTC (rev 94963) @@ -43,6 +43,7 @@ NAMESPACE) now depend on the page content language instead of the site language. In theory this sets the right magic words in system messages, although they are not used there. +* (bug 30451) Add page_props to RefreshLinks::deleteLinksFromNonexistent === Bug fixes in 1.19 === * $wgUploadNavigationUrl should be used for file redlinks if Modified: trunk/phase3/maintenance/refreshLinks.php === --- trunk/phase3/maintenance/refreshLinks.php 2011-08-18 23:13:48 UTC (rev 94962) +++ trunk/phase3/maintenance/refreshLinks.php 2011-08-18 23:16:11 UTC (rev 94963) @@ -255,6 +255,7 @@ 'iwlinks' = 'iwl_from', 'langlinks' = 'll_from', 'redirect' = 'rd_from', + 'page_props' = 'pp_page', ); foreach ( $linksTables as $table = $field ) { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94964] trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud. php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94964 Revision: 94964 Author: jeroendedauw Date: 2011-08-18 23:25:02 + (Thu, 18 Aug 2011) Log Message: --- use setMessage instead of setDescripion Modified Paths: -- trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php Modified: trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php === --- trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php 2011-08-18 23:16:11 UTC (rev 94963) +++ trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php 2011-08-18 23:25:02 UTC (rev 94964) @@ -298,33 +298,33 @@ if ( defined( 'SMW_SUPPORTS_VALIDATOR' ) ) { $params['includesubject'] = new Parameter( 'includesubject', Parameter::TYPE_BOOLEAN ); - $params['includesubject']-setDescription( wfMsg( 'srf_paramdesc_includesubject' ) ); + $params['includesubject']-setMessage( 'srf_paramdesc_includesubject' ); $params['includesubject']-setDefault( false ); $params['increase'] = new Parameter( 'increase' ); - $params['increase']-setDescription( wfMsg( 'srf_paramdesc_increase' ) ); + $params['increase']-setMessage( 'srf_paramdesc_increase' ); $params['increase']-addCriteria( new CriterionInArray( 'linear', 'log' ) ); $params['increase']-setDefault( 'log' ); $params['tagorder'] = new Parameter( 'tagorder' ); - $params['tagorder']-setDescription( wfMsg( 'srf_paramdesc_tagorder' ) ); + $params['tagorder']-setMessage( 'srf_paramdesc_tagorder' ); $params['tagorder']-addCriteria( new CriterionInArray( 'alphabetical', 'asc', 'desc', 'random', 'unchanged' ) ); $params['tagorder']-setDefault( 'alphabetical' ); $params['mincount'] = new Parameter( 'mincount', Parameter::TYPE_INTEGER ); - $params['mincount']-setDescription( wfMsg( 'srf_paramdesc_mincount' ) ); + $params['mincount']-setMessage( 'srf_paramdesc_mincount' ); $params['mincount']-setDefault( 1 ); $params['maxtags'] = new Parameter( 'maxtags', Parameter::TYPE_INTEGER ); - $params['maxtags']-setDescription( wfMsg( 'srf_paramdesc_maxtags' ) ); + $params['maxtags']-setMessage( 'srf_paramdesc_maxtags' ); $params['maxtags']-setDefault( 1000 ); $params['minsize'] = new Parameter( 'minsize', Parameter::TYPE_INTEGER ); - $params['minsize']-setDescription( wfMsg( 'srf_paramdesc_minsize' ) ); + $params['minsize']-setMessage( 'srf_paramdesc_minsize' ); $params['minsize']-setDefault( 77 ); $params['maxsize'] = new Parameter( 'maxsize', Parameter::TYPE_INTEGER ); - $params['maxsize']-setDescription( wfMsg( 'srf_paramdesc_maxsize' ) ); + $params['maxsize']-setMessage( 'srf_paramdesc_maxsize' ); $params['maxsize']-setDefault( 242 ); } else { ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94965] trunk/extensions/SemanticResultFormats
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94965 Revision: 94965 Author: jeroendedauw Date: 2011-08-18 23:29:31 + (Thu, 18 Aug 2011) Log Message: --- rem compat code for tagcloud format Modified Paths: -- trunk/extensions/SemanticResultFormats/RELEASE-NOTES trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php Modified: trunk/extensions/SemanticResultFormats/RELEASE-NOTES === --- trunk/extensions/SemanticResultFormats/RELEASE-NOTES2011-08-18 23:25:02 UTC (rev 94964) +++ trunk/extensions/SemanticResultFormats/RELEASE-NOTES2011-08-18 23:29:31 UTC (rev 94965) @@ -6,7 +6,8 @@ * Fixed rendering bug in the tagcloud format occuring for inline queries. * Fixed jqPlotBar and jqPlotPie rendering on Special:Ask and other special pages. -Cleaned up the jqPlotBar format somewhat. +* Cleaned up the jqPlotBar format somewhat. +* Dropped compatibility with SMW 1.6 for the TagCloud format. == SRF 1.6 == Modified: trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php === --- trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php 2011-08-18 23:25:02 UTC (rev 94964) +++ trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php 2011-08-18 23:29:31 UTC (rev 94965) @@ -33,60 +33,6 @@ } /** -* This if for b/c with SMW 1.5.x; SMW 1.6 directly accepts Parameter objects. -* -* (non-PHPdoc) -* @see SMWResultPrinter::readParameters() -* -* @deprecated -*/ - protected function readParameters( $params, $outputmode ) { - parent::readParameters( $params, $outputmode ); - - if ( !array_key_exists( 'includesubject', $params ) || !in_array( $params['includesubject'], array( 'yes', 'no' ) ) ) { - $params['includesubject'] = 'no'; - } - - $this-includeName = $params['includesubject'] == 'yes'; - - if ( !array_key_exists( 'increase', $params ) || !in_array( $params['increase'], array( 'linear', 'log' ) ) ) { - $params['increase'] = 'log'; - } - - $this-sizeMode = $params['increase']; - - if ( !array_key_exists( 'tagorder', $params ) || !in_array( $params['tagorder'], array( 'alphabetical', 'asc', 'desc', 'random', 'unchanged' ) ) ) { - $params['tagorder'] = 'alphabetical'; - } - - $this-tagOrder = $params['tagorder']; - - if ( !array_key_exists( 'mincount', $params ) || !ctype_digit( (string)$params['mincount'] ) ) { - $params['mincount'] = 1; - } - - $this-minCount = $params['mincount']; - - if ( !array_key_exists( 'maxtags', $params ) || !ctype_digit( (string)$params['maxtags'] ) ) { - $params['maxtags'] = 1000; - } - - $this-maxTags = $params['maxtags']; - - if ( !array_key_exists( 'minsize', $params ) || !ctype_digit( (string)$params['minsize'] ) ) { - $params['minsize'] = 77; - } - - $this-minTagSize = $params['minsize']; - - if ( !array_key_exists( 'maxsize', $params ) || !ctype_digit( (string)$params['maxsize'] ) ) { - $params['maxsize'] = 242; - } - - $this-maxSize = $params['maxsize']; - } - - /** * @see SMWResultPrinter::handleParameters * * @since 1.6 @@ -296,48 +242,35 @@ public function getParameters() { $params = parent::getParameters(); - if ( defined( 'SMW_SUPPORTS_VALIDATOR' ) ) { - $params['includesubject'] = new Parameter( 'includesubject', Parameter::TYPE_BOOLEAN ); - $params['includesubject']-setMessage( 'srf_paramdesc_includesubject' ); - $params['includesubject']-setDefault( false ); - - $params['increase'] = new Parameter( 'increase' ); - $params['increase']-setMessage( 'srf_paramdesc_increase' ); - $params['increase']-addCriteria( new CriterionInArray( 'linear', 'log' ) ); - $params['increase']-setDefault( 'log' ); - - $params['tagorder'] = new Parameter( 'tagorder' ); - $params['tagorder']-setMessage( 'srf_paramdesc_tagorder' ); - $params['tagorder']-addCriteria(
[MediaWiki-CVS] SVN: [94966] trunk/phase3/includes/upload/UploadFromStash.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94966 Revision: 94966 Author: raindrift Date: 2011-08-18 23:36:24 + (Thu, 18 Aug 2011) Log Message: --- Two bugs: 1. When the user isn't passed to UploadFromStash::__construct(), it would break when it shouldn't. 2. When stashing files, sometimes an instance of UnregisteredLocalFile would be returned instead of UploadStashFile Modified Paths: -- trunk/phase3/includes/upload/UploadFromStash.php Modified: trunk/phase3/includes/upload/UploadFromStash.php === --- trunk/phase3/includes/upload/UploadFromStash.php2011-08-18 23:29:31 UTC (rev 94965) +++ trunk/phase3/includes/upload/UploadFromStash.php2011-08-18 23:36:24 UTC (rev 94966) @@ -29,7 +29,12 @@ if( $stash ) { $this-stash = $stash; } else { - wfDebug( __METHOD__ . creating new UploadStash instance for . $user-getId() . \n ); + if( $user ) { + wfDebug( __METHOD__ . creating new UploadStash instance for . $user-getId() . \n ); + } else { + wfDebug( __METHOD__ . creating new UploadStash instance with no user\n ); + } + $this-stash = new UploadStash( $this-repo, $this-user ); } @@ -100,13 +105,13 @@ } /** -* There is no need to stash the image twice +* Stash the file. */ public function stashFile() { - if ( $this-mLocalFile ) { - return $this-mLocalFile; - } - return parent::stashFile(); + // replace mLocalFile with an instance of UploadStashFile, which adds some methods + // that are useful for stashed files. + $this-mLocalFile = parent::stashFile(); + return $this-mLocalFile; } /** ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94967] trunk/phase3
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94967 Revision: 94967 Author: reedy Date: 2011-08-18 23:37:04 + (Thu, 18 Aug 2011) Log Message: --- * (bug 30450) Clear page_props table on page deletion Also clear them on a move over redirect Modified delete() calls in doDeleteArticle to pass __METHOD__ for the function name Modified Paths: -- trunk/phase3/RELEASE-NOTES-1.19 trunk/phase3/includes/Title.php trunk/phase3/includes/WikiPage.php Modified: trunk/phase3/RELEASE-NOTES-1.19 === --- trunk/phase3/RELEASE-NOTES-1.19 2011-08-18 23:36:24 UTC (rev 94966) +++ trunk/phase3/RELEASE-NOTES-1.19 2011-08-18 23:37:04 UTC (rev 94967) @@ -44,6 +44,7 @@ language. In theory this sets the right magic words in system messages, although they are not used there. * (bug 30451) Add page_props to RefreshLinks::deleteLinksFromNonexistent +* (bug 30450) Clear page_props table on page deletion === Bug fixes in 1.19 === * $wgUploadNavigationUrl should be used for file redlinks if Modified: trunk/phase3/includes/Title.php === --- trunk/phase3/includes/Title.php 2011-08-18 23:36:24 UTC (rev 94966) +++ trunk/phase3/includes/Title.php 2011-08-18 23:37:04 UTC (rev 94967) @@ -839,12 +839,12 @@ # Hand off all the decisions on urls to getLocalURL $url = $this-getLocalURL( $query, $variant ); - + # Expand the url to make it a full url. Note that getLocalURL has the # potential to output full urls for a variety of reasons, so we use # wfExpandUrl instead of simply prepending $wgServer $url = wfExpandUrl( $url, PROTO_RELATIVE ); - + # Finally, add the fragment. $url .= $this-getFragmentForURL(); @@ -923,7 +923,7 @@ $url = {$wgScript}?title={$dbkey}{$query}; } } - + wfRunHooks( 'GetLocalURL::Internal', array( $this, $url, $query, $variant ) ); // @todo FIXME: This causes breakage in various places when we @@ -1930,7 +1930,7 @@ /** * Does that page contain wikitext, or it is JS, CSS or whatever? -* +* * @return Bool */ public function isWikitextPage() { @@ -3306,6 +3306,7 @@ $dbw-delete( 'externallinks', array( 'el_from' = $newid ), __METHOD__ ); $dbw-delete( 'langlinks', array( 'll_from' = $newid ), __METHOD__ ); $dbw-delete( 'redirect', array( 'rd_from' = $newid ), __METHOD__ ); + $dbw-delete( 'page_props', array( 'pp_page' = $newid ), __METHOD__ ); } // If the target page was recently created, it may have an entry in recentchanges still $dbw-delete( 'recentchanges', Modified: trunk/phase3/includes/WikiPage.php === --- trunk/phase3/includes/WikiPage.php 2011-08-18 23:36:24 UTC (rev 94966) +++ trunk/phase3/includes/WikiPage.php 2011-08-18 23:37:04 UTC (rev 94967) @@ -1695,18 +1695,20 @@ if ( !$dbw-cascadingDeletes() ) { $dbw-delete( 'revision', array( 'rev_page' = $id ), __METHOD__ ); - if ( $wgUseTrackbacks ) + if ( $wgUseTrackbacks ) { $dbw-delete( 'trackbacks', array( 'tb_page' = $id ), __METHOD__ ); + } # Delete outgoing links - $dbw-delete( 'pagelinks', array( 'pl_from' = $id ) ); - $dbw-delete( 'imagelinks', array( 'il_from' = $id ) ); - $dbw-delete( 'categorylinks', array( 'cl_from' = $id ) ); - $dbw-delete( 'templatelinks', array( 'tl_from' = $id ) ); - $dbw-delete( 'externallinks', array( 'el_from' = $id ) ); - $dbw-delete( 'langlinks', array( 'll_from' = $id ) ); - $dbw-delete( 'iwlinks', array( 'iwl_from' = $id ) ); - $dbw-delete( 'redirect', array( 'rd_from' = $id ) ); + $dbw-delete( 'pagelinks', array( 'pl_from' = $id ), __METHOD__ ); + $dbw-delete( 'imagelinks', array( 'il_from' = $id ), __METHOD__ ); + $dbw-delete( 'categorylinks', array( 'cl_from' = $id ), __METHOD__ ); + $dbw-delete( 'templatelinks', array( 'tl_from' = $id ), __METHOD__ ); + $dbw-delete( 'externallinks', array( 'el_from' = $id ), __METHOD__
[MediaWiki-CVS] SVN: [94968] trunk/extensions/MobileFrontend/MobileFrontend.php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94968 Revision: 94968 Author: preilly Date: 2011-08-18 23:54:53 + (Thu, 18 Aug 2011) Log Message: --- remove these from default Modified Paths: -- trunk/extensions/MobileFrontend/MobileFrontend.php Modified: trunk/extensions/MobileFrontend/MobileFrontend.php === --- trunk/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 23:37:04 UTC (rev 94967) +++ trunk/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 23:54:53 UTC (rev 94968) @@ -62,15 +62,10 @@ * be stripped from the page. See $itemsToRemove for more info */ $wgMFRemovableClasses = array( - 'table.metadata', # ugly metadata - '.metadata mbox-small', - '.metadata plainlinks ambox ambox-content', - '.metadata plainlinks ambox ambox-move', - '.metadata plainlinks ambox ambox-style', ); class ExtMobileFrontend { - const VERSION = '0.5.37'; + const VERSION = '0.5.38'; /** * @var DOMDocument ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94969] branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend .php
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94969 Revision: 94969 Author: preilly Date: 2011-08-18 23:55:39 + (Thu, 18 Aug 2011) Log Message: --- mft r94968 Modified Paths: -- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php === --- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 23:54:53 UTC (rev 94968) +++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php 2011-08-18 23:55:39 UTC (rev 94969) @@ -62,15 +62,10 @@ * be stripped from the page. See $itemsToRemove for more info */ $wgMFRemovableClasses = array( - 'table.metadata', # ugly metadata - '.metadata mbox-small', - '.metadata plainlinks ambox ambox-content', - '.metadata plainlinks ambox ambox-move', - '.metadata plainlinks ambox ambox-style', ); class ExtMobileFrontend { - const VERSION = '0.5.37'; + const VERSION = '0.5.38'; /** * @var DOMDocument ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94970] trunk/debs/php5-fss/debian.lucid
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94970 Revision: 94970 Author: reedy Date: 2011-08-19 00:10:17 + (Fri, 19 Aug 2011) Log Message: --- php5-fss (0.0.1-5ubuntu1~lucid1) lucid-wikimedia; urgency=low * Remove deprecated hash comment from fss.ini Modified Paths: -- trunk/debs/php5-fss/debian.lucid/changelog trunk/debs/php5-fss/debian.lucid/fss.ini Modified: trunk/debs/php5-fss/debian.lucid/changelog === --- trunk/debs/php5-fss/debian.lucid/changelog 2011-08-18 23:55:39 UTC (rev 94969) +++ trunk/debs/php5-fss/debian.lucid/changelog 2011-08-19 00:10:17 UTC (rev 94970) @@ -1,3 +1,9 @@ +php5-fss (0.0.1-5ubuntu1~lucid1) lucid-wikimedia; urgency=low + + * Remove deprecated hash comment from fss.ini + + -- Sam Reed re...@wikimedia.org Fri, 19 Aug 2011 00:09:00 + + php5-fss (0.0.1-4ubuntu1~lucid1) lucid-wikimedia; urgency=low * Include patch for php 5.3 Modified: trunk/debs/php5-fss/debian.lucid/fss.ini === --- trunk/debs/php5-fss/debian.lucid/fss.ini2011-08-18 23:55:39 UTC (rev 94969) +++ trunk/debs/php5-fss/debian.lucid/fss.ini2011-08-19 00:10:17 UTC (rev 94970) @@ -1,2 +1 @@ -# Enable FastStringSearch extension extension=fss.so ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94971] trunk/extensions/UploadWizard/resources/uploadWizard.css
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94971 Revision: 94971 Author: kaldari Date: 2011-08-19 00:14:44 + (Fri, 19 Aug 2011) Log Message: --- this extra padding isnt needed any more per r92846 Modified Paths: -- trunk/extensions/UploadWizard/resources/uploadWizard.css Modified: trunk/extensions/UploadWizard/resources/uploadWizard.css === --- trunk/extensions/UploadWizard/resources/uploadWizard.css2011-08-19 00:10:17 UTC (rev 94970) +++ trunk/extensions/UploadWizard/resources/uploadWizard.css2011-08-19 00:14:44 UTC (rev 94971) @@ -234,7 +234,6 @@ } #mwe-upwiz-upload-ctrls button, .mwe-upwiz-buttons button { - padding: 0.25em 0.75em; font-size: 1em; } ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
[MediaWiki-CVS] SVN: [94972] trunk/debs/wikimedia-keyring/debian/changelog
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94972 Revision: 94972 Author: reedy Date: 2011-08-19 00:22:10 + (Fri, 19 Aug 2011) Log Message: --- Changed distro Modified Paths: -- trunk/debs/wikimedia-keyring/debian/changelog Modified: trunk/debs/wikimedia-keyring/debian/changelog === --- trunk/debs/wikimedia-keyring/debian/changelog 2011-08-19 00:14:44 UTC (rev 94971) +++ trunk/debs/wikimedia-keyring/debian/changelog 2011-08-19 00:22:10 UTC (rev 94972) @@ -1,3 +1,9 @@ +wikimedia-keyring (2011.08.19.1) lucid-wikimedia; urgency=low + + * Changing distro + + -- Sam Reed re...@wikimedia.org Thu, 19 Aug 2011 00:20:00 + + wikimedia-keyring (2006.10.11.1) hoary; urgency=low * Convert to Wikimedia ___ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs