Revision: 50364 Author: siebrand Date: 2009-05-09 11:37:43 +0000 (Sat, 09 May 2009)
Log Message: ----------- * fix typos in messages, shorter where possible * remove empty README * styilize.php, trailing whitespace removed, updated indentation * add FIXME for no $wgSpecialPageGroups * bumped version Modified Paths: -------------- trunk/extensions/Poll/Poll.alias.php trunk/extensions/Poll/Poll.i18n.php trunk/extensions/Poll/Poll.php trunk/extensions/Poll/Poll_body.php Removed Paths: ------------- trunk/extensions/Poll/README Modified: trunk/extensions/Poll/Poll.alias.php =================================================================== --- trunk/extensions/Poll/Poll.alias.php 2009-05-09 11:29:33 UTC (rev 50363) +++ trunk/extensions/Poll/Poll.alias.php 2009-05-09 11:37:43 UTC (rev 50364) @@ -10,11 +10,10 @@ /** English */ $aliases['en'] = array( - 'Poll' => array( 'Poll' ), + 'Poll' => array( 'Poll' ), ); /** German(Deutsch) */ $aliases['de'] = array( - 'Poll' => array( 'Umfrage' ,'Poll' ), + 'Poll' => array( 'Umfrage' , 'Poll' ), ); - Modified: trunk/extensions/Poll/Poll.i18n.php =================================================================== --- trunk/extensions/Poll/Poll.i18n.php 2009-05-09 11:29:33 UTC (rev 50363) +++ trunk/extensions/Poll/Poll.i18n.php 2009-05-09 11:37:43 UTC (rev 50364) @@ -1,6 +1,6 @@ <?php /** - * Internationalisation file for TSPoll extension. + * Internationalisation file for Poll extension. * * @file * @ingroup Extensions @@ -8,12 +8,12 @@ $messages = array(); -$messages['en'] = array( - 'poll' => 'Polls', - 'poll-desc' => 'Add a [[Special:Poll|specialpage]] to MediaWiki for useing polls in MediaWiki', +$messages['en'] = array( + 'poll' => 'Polls', + 'poll-desc' => 'Add a [[Special:Poll|special page]] for using polls', ); -$messages['de'] = array( - 'poll' => 'Umfragen', - 'poll-desc' => 'Erstellt eine [[Special:Poll|Spezialsite]], um Umfragen in MedaWiki zu nutzen', +$messages['de'] = array( + 'poll' => 'Umfragen', + 'poll-desc' => 'Erstellt eine [[Special:Poll|Spezialsite]], um Umfragen zu nutzen', ); Modified: trunk/extensions/Poll/Poll.php =================================================================== --- trunk/extensions/Poll/Poll.php 2009-05-09 11:29:33 UTC (rev 50363) +++ trunk/extensions/Poll/Poll.php 2009-05-09 11:37:43 UTC (rev 50364) @@ -20,22 +20,23 @@ // Die the extension, if not MediaWiki is used if ( !defined( 'MEDIAWIKI' ) ) { echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" ); - die( - 1 ); + die( -1 ); } // Extension credits that will show up on Special:Version $wgExtensionCredits['specialpage'][] = array( - 'name' => 'Poll', - 'version' => '0.0', - 'path' => __FILE__, - 'author' => 'Jan Luca', - 'url' => 'http://www.mediawiki.org/wiki/Extension:Poll2', + 'name' => 'Poll', + 'version' => '0.0.1', + 'path' => __FILE__, + 'author' => 'Jan Luca', + 'url' => 'http://www.mediawiki.org/wiki/Extension:Poll2', 'descriptionmsg' => 'poll-desc' ); -$dir = dirname(__FILE__) . '/'; - +$dir = dirname( __FILE__ ) . '/'; + $wgAutoloadClasses['Poll'] = $dir . 'Poll_body.php'; # Tell MediaWiki to load the extension body. $wgExtensionMessagesFiles['Poll'] = $dir . 'Poll.i18n.php'; $wgExtensionAliasesFiles['Poll'] = $dir . 'Poll.alias.php'; $wgSpecialPages['Poll'] = 'Poll'; # Let MediaWiki know about your new special page. +// FIXME: add $wgSpecialPageGroups Modified: trunk/extensions/Poll/Poll_body.php =================================================================== --- trunk/extensions/Poll/Poll_body.php 2009-05-09 11:29:33 UTC (rev 50363) +++ trunk/extensions/Poll/Poll_body.php 2009-05-09 11:37:43 UTC (rev 50364) @@ -1,18 +1,19 @@ <?php + class Poll extends SpecialPage { function __construct() { parent::__construct( 'Poll' ); - wfLoadExtensionMessages('Poll'); + wfLoadExtensionMessages( 'Poll' ); } - + function execute( $par ) { global $wgRequest, $wgOut; - + $this->setHeaders(); - + # Get request data from, e.g. - $action = htmlentities($wgRequest->getText('action')); - $id = htmlentities($wgRequest->getText('id')); - + $action = htmlentities( $wgRequest->getText( 'action' ) ); + $id = htmlentities( $wgRequest->getText( 'id' ) ); + } } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs