r92413 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92412‎ | r92413 | r92414 >
Date:21:04, 17 July 2011
Author:jeroendedauw
Status:ok (Comments)
Tags:neilk, schema 
Comment:
some work on adding configurable campaigns
Modified paths:
  • /trunk/extensions/UploadWizard/SpecialUploadCampaigns.php (modified) (history)
  • /trunk/extensions/UploadWizard/UploadWizard.config.php (modified) (history)
  • /trunk/extensions/UploadWizard/UploadWizard.i18n.php (modified) (history)
  • /trunk/extensions/UploadWizard/UploadWizard.php (modified) (history)
  • /trunk/extensions/UploadWizard/UploadWizard.sql (added) (history)
  • /trunk/extensions/UploadWizard/UploadWizardHooks.php (modified) (history)
  • /trunk/extensions/UploadWizard/sql (added) (history)
  • /trunk/extensions/UploadWizard/sql/UW_IndexCampaignsName.sql (added) (history)
  • /trunk/extensions/UploadWizard/sql/UW_IndexConfIdProp.sql (added) (history)
  • /trunk/extensions/UploadWizard/sql/UW_IndexConfProp.sql (added) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/UploadWizard.php
@@ -67,6 +67,7 @@
6868 // for ResourceLoader
6969 $wgHooks['ResourceLoaderRegisterModules'][] = 'UploadWizardHooks::resourceLoaderRegisterModules';
7070 $wgHooks['CanonicalNamespaces'][] = 'UploadWizardHooks::canonicalNamespaces';
 71+$wgHooks['LoadExtensionSchemaUpdates'][] = 'UploadWizardHooks::onSchemaUpdate';
7172
7273 // Init the upload wizard config array
7374 // UploadWizard.config.php includes default configuration
Index: trunk/extensions/UploadWizard/SpecialUploadCampaigns.php
@@ -1,4 +1,5 @@
22 <?php
 3+
34 /**
45 * Special:UploadCampaigns
56 *
@@ -7,36 +8,513 @@
89 * @file
910 * @ingroup SpecialPage
1011 * @ingroup Upload
 12+ *
 13+ * @since 1.2
 14+ *
 15+ * @licence GNU GPL v3+
 16+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
1117 */
12 -
1318 class SpecialUploadCampaigns extends SpecialPage {
1419
1520 /**
1621 * Constructor.
1722 *
1823 * @param $request is the request (usually wgRequest)
19 - * @param $par is everything in the URL after Special:UploadWizard. Not sure what we can use it for
 24+ * @param $par is everything in the URL after Special:UploadCampaigns. Not sure what we can use it for
2025 */
2126 public function __construct( $request = null, $par = null ) {
2227 global $wgRequest;
2328
2429 parent::__construct( 'UploadCampaigns', 'delete' );
25 -
26 - // TODO
2730 }
2831
2932 /**
3033 * Main method.
3134 *
32 - * @param string $subPage, e.g. the "foo" in Special:UploadWizard/foo.
 35+ * @param string $subPage, e.g. the "foo" in Special:UploadCampaigns/foo.
3336 */
3437 public function execute( $subPage ) {
 38+ $this->setHeaders();
 39+ $this->outputHeader();
 40+
3541 // If the user is authorized, display the page, if not, show an error.
3642 if ( $this->userCanExecute( $GLOBALS['wgUser'] ) ) {
37 - // TODO
 43+ if ( $GLOBALS['wgRequest']->wasPosted() && $GLOBALS['wgUser']->matchEditToken( $GLOBALS['wgRequest']->getVal( 'wpEditToken' ) ) ) {
 44+ $this->handleSubmission();
 45+ }
 46+
 47+ if ( !is_null( $subPage ) && trim( $subPage ) != '' ) {
 48+ if ( $subPage == 'new' ) {
 49+ $this->displayCampaign( new UWCampaign( null, '', true, array() ), true );
 50+ }
 51+ else {
 52+ $campaign = UWCampaign::newFromName( $subPage );
 53+
 54+ if ( $campaign === false ) {
 55+ $this->displayCampaignList();
 56+ }
 57+ else {
 58+ $this->displayCampaign( $campaign );
 59+ }
 60+ }
 61+ }
 62+ else {
 63+ $this->displayCampaignList();
 64+ }
3865 } else {
3966 $this->displayRestrictionError();
40 - }
 67+ }
4168 }
 69+
 70+ protected function handleSubmission() {
 71+ global $wgOut;
 72+
 73+ // TODO
 74+ }
 75+
 76+ /**
 77+ * Displays a list of all campaigns.
 78+ *
 79+ * @since 1.2
 80+ */
 81+ protected function displayCampaignList() {
 82+ $this->displayAddNewControl();
 83+
 84+ $dbr = wfGetDB( DB_SLAVE );
 85+
 86+ $campaigns = $dbr->select(
 87+ 'uw_campaigns',
 88+ array(
 89+ 'campaign_id',
 90+ 'campaign_name',
 91+ 'campaign_enabled',
 92+ )
 93+ );
 94+
 95+ if ( $campaigns->numRows() > 0 ) {
 96+ $this->displayCampaignTable( $campaigns );
 97+ }
 98+ }
 99+
 100+ protected function displayAddNewControl() {
 101+ global $wgOut;
 102+
 103+ $wgOut->addHTML( Html::openElement(
 104+ 'form',
 105+ array(
 106+ 'method' => 'post',
 107+ 'action' => $this->getTitle()->getLocalURL(),
 108+ )
 109+ ) );
 110+
 111+ $wgOut->addHTML( '<fieldset>' );
 112+
 113+ $wgOut->addHTML( '<legend>' . htmlspecialchars( wfMsg( 'mwe-upwiz-campaigns-addnew' ) ) . '</legend>' );
 114+
 115+ $wgOut->addHTML( Html::element( 'p', array(), wfMsg( 'mwe-upwiz-campaigns-namedoc' ) ) );
 116+
 117+ $wgOut->addHTML( Html::element( 'label', array( 'for' => 'newcampaign' ), wfMsg( 'mwe-upwiz-campaigns-newname' ) ) );
 118+
 119+ $wgOut->addHTML( Html::input( 'newcampaign' ) . '&#160;' );
 120+
 121+ $wgOut->addHTML( Html::input(
 122+ 'addnewcampaign',
 123+ wfMsg( 'mwe-upwiz-campaigns-add' ),
 124+ 'submit'
 125+ ) );
 126+
 127+ $wgOut->addHTML( Html::hidden( 'wpEditToken', $GLOBALS['wgUser']->editToken() ) );
 128+
 129+ $wgOut->addHTML( '</fieldset></form>' );
 130+ }
 131+
 132+ protected function displayCampaignTable( ResultWrapper $campaigns ) {
 133+ global $wgOut;
 134+
 135+ $wgOut->addHTML( Html::element( 'h2', array(), wfMsg( 'mwe-upwiz-campaigns-existing' ) ) );
 136+
 137+ $wgOut->addHTML( '<table>' );
 138+
 139+ $wgOut->addHTML(
 140+ '<tr>' .
 141+ Html::element( 'th', array(), wfMsg( 'mwe-upwiz-campaigns-name' ) ) .
 142+ Html::element( 'th', array(), wfMsg( 'mwe-upwiz-campaigns-status' ) ) .
 143+ Html::element( 'th', array(), wfMsg( 'mwe-upwiz-campaigns-edit' ) ) .
 144+ '</tr>'
 145+ );
 146+
 147+ foreach ( $campaigns as $campaign ) {
 148+ $wgOut->addHTML(
 149+ '<tr>' .
 150+ Html::element( 'td', array(), $campaign->campaign_name ) .
 151+ Html::element( 'td', array(), wfMsg( 'mwe-upwiz-campaigns-' . ( $campaign->campaign_enabled ? 'enabled' : 'disabled' ) ) ) .
 152+ Html::element( 'td', array(), wfMsg( 'mwe-upwiz-campaigns-edit' ) ) .
 153+ '</tr>'
 154+ );
 155+ }
 156+
 157+ $wgOut->addHTML( '</table>' );
 158+ }
 159+
 160+ /**
 161+ * Displays a form to modify a single campaign.
 162+ *
 163+ * @since 1.2
 164+ *
 165+ * @param UWCampaign $campaign
 166+ * @param boolean $isInsert
 167+ */
 168+ protected function displayCampaign( UWCampaign $campaign, $isInsert = false ) {
 169+ global $wgOut;
 170+
 171+ // TODO
 172+ }
42173
43 -}
\ No newline at end of file
 174+}
 175+
 176+class UWCampaign {
 177+
 178+ /**
 179+ * If the ID of the campaign.
 180+ * Either this matched a record in the uw_campaigns table or is null.
 181+ *
 182+ * @since 1.2
 183+ * @var integer or null
 184+ */
 185+ protected $id;
 186+
 187+ /**
 188+ * If the name of the campaign.
 189+ * This name is the string used to invoke the campaign via campaign=name.
 190+ *
 191+ * @since 1.2
 192+ * @var string
 193+ */
 194+ protected $name;
 195+
 196+ /**
 197+ * If the campaign is enabled or not.
 198+ *
 199+ * @since 1.2
 200+ * @var boolean
 201+ */
 202+ protected $isEnabled;
 203+
 204+ /**
 205+ * The campaign configuration.
 206+ *
 207+ * @since 1.2
 208+ * @var array
 209+ */
 210+ protected $config;
 211+
 212+ /**
 213+ * Create a new instance of $campaignName.
 214+ *
 215+ * @since 1.2
 216+ *
 217+ * @param integer $id
 218+ * @param string $name
 219+ * @param boolean $isEnabled
 220+ * @param array $config
 221+ */
 222+ public function __construct( $id, $name, $isEnabled, array $config ) {
 223+ $this->id = $id;
 224+ $this->name = $name;
 225+ $this->isEnabled = $isEnabled;
 226+ $this->config = $config;
 227+ }
 228+
 229+ /**
 230+ * Returns the UWCampaign with specified name, or false if there is no such campaign.
 231+ *
 232+ * @since 1.2
 233+ *
 234+ * @param string $campaignName
 235+ *
 236+ * @return UWCampaign or false
 237+ */
 238+ public static function newFromName( $campaignName ) {
 239+ return self::newFromDB( array( 'campaign_name' => $campaignName ) );
 240+ }
 241+
 242+ /**
 243+ * Returns the UWCampaign with specified ID, or false if there is no such campaign.
 244+ *
 245+ * @since 1.2
 246+ *
 247+ * @param integer $campaignId
 248+ *
 249+ * @return UWCampaign or false
 250+ */
 251+ public static function newFromId( $campaignId ) {
 252+ return self::newFromDB( array( 'campaign_id' => $campaignId ) );
 253+ }
 254+
 255+ /**
 256+ * Returns a new instance of UWCampaign build from a database result
 257+ * obtained by doing a select with the porvided conditions on the uw_campaigns table.
 258+ * If no campaign matches the conditions, false will be returned.
 259+ *
 260+ * @since 1.2
 261+ *
 262+ * @param array $conditions
 263+ *
 264+ * @return UWCampaign or false
 265+ */
 266+ protected static function newFromDB( array $conditions ) {
 267+ $dbr = wfGetDB( DB_SLAVE );
 268+
 269+ $campaign = $dbr->selectRow(
 270+ 'uw_campaigns',
 271+ array(
 272+ 'campaign_id',
 273+ 'campaign_name',
 274+ 'campaign_enabled',
 275+ ),
 276+ $conditions
 277+ );
 278+
 279+ if ( !$campaign ) {
 280+ return false;
 281+ }
 282+
 283+ $confProps = $dbr->select(
 284+ 'uw_campaign_conf',
 285+ array( 'cc_property', 'cc_value' ),
 286+ array( 'cc_campaign_id' => $campaign->campaign_id )
 287+ );
 288+
 289+ $config = array();
 290+
 291+ foreach ( $confProps as $confProp ) {
 292+ $config[$confProp->cc_property] = $confProp->cc_value;
 293+ }
 294+
 295+ return new self(
 296+ $campaign->campaign_id,
 297+ $campaign->campaign_name,
 298+ $campaign->campaign_enabled,
 299+ $config
 300+ );
 301+ }
 302+
 303+ /**
 304+ * Returns the id of the campaign.
 305+ *
 306+ * @since 1.2
 307+ *
 308+ * @return intgere
 309+ */
 310+ public function getId() {
 311+ return $this->id;
 312+ }
 313+
 314+ /**
 315+ * Returns the name of the campaign.
 316+ *
 317+ * @since 1.2
 318+ *
 319+ * @return string
 320+ */
 321+ public function getName() {
 322+ return $this->name;
 323+ }
 324+
 325+ /**
 326+ * Returns if the campaign is enabled.
 327+ *
 328+ * @since 1.2
 329+ *
 330+ * @return boolean
 331+ */
 332+ public function getIsEnabled() {
 333+ return $this->isEnabled;
 334+ }
 335+
 336+ /**
 337+ * Sets all config properties.
 338+ *
 339+ * @since 1.2
 340+ *
 341+ * @param array $config
 342+ */
 343+ public function setConfig( array $config ) {
 344+ $this->config = $config;
 345+ }
 346+
 347+ /**
 348+ * Returns all config properties.
 349+ *
 350+ * @since 1.2
 351+ *
 352+ * @return array
 353+ */
 354+ public function getConfig() {
 355+ return $this->config;
 356+ }
 357+
 358+ /**
 359+ * Returns the value of the specified config property.
 360+ *
 361+ * @since 1.2
 362+ *
 363+ * @param string $property
 364+ *
 365+ * @return mixed
 366+ */
 367+ public function getProperty( $property ) {
 368+ global $wgUploadWizardConfig;
 369+
 370+ if ( array_key_exists( $property, $this->config ) ) {
 371+ return $this->config[$property];
 372+ }
 373+ elseif ( array_key_exists( $property, $wgUploadWizardConfig['campaignDefaults'] ) ) {
 374+ return $wgUploadWizardConfig['campaignDefaults'][$property];
 375+ }
 376+ else {
 377+ return null;
 378+ }
 379+ }
 380+
 381+ /**
 382+ * Set the value of a config property.
 383+ *
 384+ * @since 1.2
 385+ *
 386+ * @param string $property
 387+ * @param mixed $value
 388+ */
 389+ public function setProperty( $property, $value ) {
 390+ $this->config[$property] = $value;
 391+ }
 392+
 393+ /**
 394+ * Write the campaign to the DB.
 395+ * If it's already there, it'll be updated, else it'll be inserted.
 396+ *
 397+ * @since 1.2
 398+ *
 399+ * @return boolean Success indicator
 400+ */
 401+ public function writeToDB() {
 402+ if ( is_null( $this->id ) ) {
 403+ return $this->insertIntoDB();
 404+ }
 405+ else {
 406+ return $this->updateInDB();
 407+ }
 408+ }
 409+
 410+ /**
 411+ * Insert the campaign into the DB.
 412+ *
 413+ * @since 1.2
 414+ *
 415+ * @return boolean Success indicator
 416+ */
 417+ protected function insertIntoDB() {
 418+ $dbw = wfGetDB( DB_MASTER );
 419+
 420+ $success = $dbw->insert(
 421+ 'uw_campaigns',
 422+ array(
 423+ 'campaign_name' => $this->name,
 424+ 'campaign_enabled' => $this->isEnabled,
 425+ ),
 426+ array( 'campaign_id' => $this->id )
 427+ );
 428+
 429+ if ( $success ) {
 430+ $this->id = $dbr->insertId();
 431+ $success &= $this->writePropsToDB( $dbw );
 432+ }
 433+
 434+ return $success;
 435+ }
 436+
 437+ /**
 438+ * Update the campaign in the DB.
 439+ *
 440+ * @since 1.2
 441+ *
 442+ * @return boolean Success indicator
 443+ */
 444+ protected function updateInDB() {
 445+ $dbw = wfGetDB( DB_MASTER );
 446+
 447+ $success = $dbw->update(
 448+ 'uw_campaigns',
 449+ array(
 450+ 'campaign_name' => $this->name,
 451+ 'campaign_enabled' => $this->isEnabled,
 452+ ),
 453+ array( 'campaign_id' => $this->id )
 454+ );
 455+
 456+ // Delete and insert instead of update.
 457+ // This will not result into dead-data when config vars are removed.
 458+ $success &= $dbw->delete(
 459+ 'uw_campaign_conf',
 460+ array( 'cc_campaign_id' => $this->id )
 461+ );
 462+
 463+ $success &= $this->writePropsToDB( $dbw );
 464+
 465+ return $success;
 466+ }
 467+
 468+ /**
 469+ * Write (insert) the properties into the DB.
 470+ *
 471+ * @since 1.2
 472+ *
 473+ * @param Database $dbw
 474+ *
 475+ * @return boolean Success indicator
 476+ */
 477+ protected function writePropsToDB( Database $dbw ) {
 478+ $success = true;
 479+
 480+ foreach ( $this->config as $prop => $value ) {
 481+ $success &= $dbw->insert(
 482+ 'uw_campaign_conf',
 483+ array(
 484+ 'cc_campaign_id' => $this->id,
 485+ 'cc_property' => $prop,
 486+ 'cc_value' => $value
 487+ )
 488+ );
 489+ }
 490+
 491+ return $success;
 492+ }
 493+
 494+ /**
 495+ * Delete the campaign from the DB (when present).
 496+ *
 497+ * @since 1.2
 498+ *
 499+ * @return boolean Success indicator
 500+ */
 501+ public function deleteFromDB() {
 502+ if ( is_null( $this->id ) ) {
 503+ return true;
 504+ }
 505+
 506+ $dbw = wfGetDB( DB_MASTER );
 507+
 508+ $d1 = $dbw->delete(
 509+ 'uw_campaigns',
 510+ array( 'campaign_id' => $this->id )
 511+ );
 512+
 513+ $d2 = $dbw->delete(
 514+ 'uw_campaign_conf',
 515+ array( 'cc_campaign_id' => $this->id )
 516+ );
 517+
 518+ return $d1 && $d2;
 519+ }
 520+
 521+}
Index: trunk/extensions/UploadWizard/UploadWizard.config.php
@@ -285,5 +285,10 @@
286286
287287 // URL for alternative uploading form
288288 'altUploadForm' => '',
 289+
 290+ 'campaignDefaults' => array(
 291+ 'skiptutorial' => false,
 292+
 293+ ),
289294
290295 );
Index: trunk/extensions/UploadWizard/UploadWizardHooks.php
@@ -385,4 +385,52 @@
386386 }
387387 return true;
388388 }
 389+
 390+ /**
 391+ * Schema update to set up the needed database tables.
 392+ *
 393+ * @since 1.2
 394+ *
 395+ * @param DatabaseUpdater $updater
 396+ *
 397+ * @return true
 398+ */
 399+ public static function onSchemaUpdate( /* DatabaseUpdater */ $updater = null ) {
 400+ $updater->addExtensionUpdate( array(
 401+ 'addTable',
 402+ 'uw_campaigns',
 403+ dirname( __FILE__ ) . '/UploadWizard.sql',
 404+ true
 405+ ) );
 406+ $updater->addExtensionUpdate( array(
 407+ 'addTable',
 408+ 'uw_campaign_conf',
 409+ dirname( __FILE__ ) . '/UploadWizard.sql',
 410+ true
 411+ ) );
 412+ $updater->addExtensionUpdate( array(
 413+ 'addIndex',
 414+ 'uw_campaigns',
 415+ 'uw_campaigns_name',
 416+ dirname( __FILE__ ) . '/sql/UW_IndexCampaignsName.sql',
 417+ true
 418+ ) );
 419+ $updater->addExtensionUpdate( array(
 420+ 'addIndex',
 421+ 'uw_campaign_conf',
 422+ 'uw_cc_id_property',
 423+ dirname( __FILE__ ) . '/sql/UW_IndexConfIdProp.sql',
 424+ true
 425+ ) );
 426+ $updater->addExtensionUpdate( array(
 427+ 'addIndex',
 428+ 'uw_campaign_conf',
 429+ 'uw_cc_property',
 430+ dirname( __FILE__ ) . '/sql/UW_IndexConfProp.sql',
 431+ true
 432+ ) );
 433+
 434+ return true;
 435+ }
 436+
389437 }
Index: trunk/extensions/UploadWizard/sql/UW_IndexCampaignsName.sql
@@ -0,0 +1 @@
 2+CREATE UNIQUE INDEX /*i*/uw_campaigns_name ON /*_*/uw_campaigns (campaign_name);
\ No newline at end of file
Property changes on: trunk/extensions/UploadWizard/sql/UW_IndexCampaignsName.sql
___________________________________________________________________
Added: svn:eol-style
13 + native
Index: trunk/extensions/UploadWizard/sql/UW_IndexConfIdProp.sql
@@ -0,0 +1 @@
 2+CREATE UNIQUE INDEX /*i*/uw_cc_id_property ON /*_*/uw_campaign_conf (cc_campaign_id,cc_property);
\ No newline at end of file
Property changes on: trunk/extensions/UploadWizard/sql/UW_IndexConfIdProp.sql
___________________________________________________________________
Added: svn:eol-style
13 + native
Index: trunk/extensions/UploadWizard/sql/UW_IndexConfProp.sql
@@ -0,0 +1 @@
 2+CREATE INDEX /*i*/uw_cc_property ON /*_*/uw_campaign_conf (cc_property);
\ No newline at end of file
Property changes on: trunk/extensions/UploadWizard/sql/UW_IndexConfProp.sql
___________________________________________________________________
Added: svn:eol-style
13 + native
Index: trunk/extensions/UploadWizard/UploadWizard.sql
@@ -0,0 +1,17 @@
 2+-- MySQL version of the database schema for the Upload Wizard extension.
 3+-- Licence: GNU GPL v3+
 4+-- Author: Jeroen De Dauw < jeroendedauw@gmail.com >
 5+
 6+-- Upload wizard campaigns
 7+CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/uw_campaigns (
 8+ campaign_id SMALLINT unsigned NOT NULL auto_increment PRIMARY KEY,
 9+ campaign_name VARCHAR(255) NOT NULL,
 10+ campaign_enabled TINYINT NOT NULL default '0'
 11+) /*$wgDBTableOptions*/;
 12+
 13+-- Upload wizard campaign config
 14+CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/uw_campaign_conf (
 15+ cc_campaign_id SMALLINT unsigned NOT NULL auto_increment PRIMARY KEY,
 16+ cc_property VARCHAR(255) NULL,
 17+ cc_value BLOB NULL
 18+) /*$wgDBTableOptions*/;
Property changes on: trunk/extensions/UploadWizard/UploadWizard.sql
___________________________________________________________________
Added: svn:eol-style
119 + native
Index: trunk/extensions/UploadWizard/UploadWizard.i18n.php
@@ -271,8 +271,19 @@
272272 'mwe-upwiz-feedback-adding' => 'Adding feedback to page...',
273273 'mwe-upwiz-feedback-error1' => 'Error: Unrecognized result from API',
274274 'mwe-upwiz-feedback-error2' => 'Error: Edit failed',
275 - 'mwe-upwiz-feedback-error3' => 'Error: No response from API'
 275+ 'mwe-upwiz-feedback-error3' => 'Error: No response from API',
276276
 277+ // Special:UploadCampaigns
 278+ 'mwe-upwiz-campaigns-name' => 'Campaign name',
 279+ 'mwe-upwiz-campaigns-status' => 'Status',
 280+ 'mwe-upwiz-campaigns-enabled' => 'Enabled',
 281+ 'mwe-upwiz-campaigns-disabled' => 'Disabled',
 282+ 'mwe-upwiz-campaigns-edit' => 'Edit',
 283+ 'mwe-upwiz-campaigns-add' => 'Add',
 284+ 'mwe-upwiz-campaigns-addnew' => 'Add a new campaign',
 285+ 'mwe-upwiz-campaigns-newname' => 'Campaign name: ',
 286+ 'mwe-upwiz-campaigns-namedoc' => 'The name of the campaign is the identifier used in URLs. ie "name" in ?campaign=name',
 287+ 'mwe-upwiz-campaigns-existing' => 'Existing campaigns',
277288 );
278289
279290 /** Message documentation (Message documentation)

Follow-up revisions

RevisionCommit summaryAuthorDate
r93384fu r92413jeroendedauw11:34, 28 July 2011

Comments

#Comment by Nikerabbit (talk | contribs)   09:41, 28 July 2011

Messages (mwe-upwiz-campaigns-newname) cannot contain trailing whitespace. Please add the space into the output manually.

#Comment by Jeroen De Dauw (talk | contribs)   11:34, 28 July 2011

Fixed in follow up. Doesn't hardcoding the spaces like that cause problems for LTR?

#Comment by Nikerabbit (talk | contribs)   11:37, 28 July 2011

In this case I don't see why it would cause any problems. Adding the nbsp between label and input element is a standard practice.

#Comment by NeilK (talk | contribs)   20:22, 28 July 2011

Don't use GPL v3 -- although it is the most recent version of the GPL, it is not backwards compatible with the GPL v2 in the rest of the code. Projects need to be all v2 or all v3.

RMS says so, himself: http://gplv3.fsf.org/rms-why.html

There is some ambiguity in how we word our license, so I'm proposing a fix there. (bug 30106).

#Comment by NeilK (talk | contribs)   20:23, 28 July 2011

In fact, it's usually better to omit it altogether, or put a "licensed under the same terms as MediaWiki" in the README of the whole extension.

#Comment by Jeroen De Dauw (talk | contribs)   20:51, 28 July 2011

I changed it to v2+, which also allows taking out components and using it in GPL v3 licenced software. Fine for you?

#Comment by NeilK (talk | contribs)   22:32, 28 July 2011

Where is it defined that v2+ means that?

#Comment by NeilK (talk | contribs)   23:30, 28 July 2011

Ok, RobLa explained this to me -- I didn't quite understand how the combination of GPLv2 + v3 worked out in practice. v2+ should be okay.

Status & tagging log