Index: trunk/extensions/AJAXPoll/AJAXPoll_body.php |
— | — | @@ -399,23 +399,38 @@ |
400 | 400 | } else { |
401 | 401 | // >= 1.17 support |
402 | 402 | |
403 | | - # poll_info.poll_title field was dropped in AJAXPoll version 1.72 |
404 | | - $updater->dropExtensionField( |
405 | | - 'poll_info', |
406 | | - 'poll_title', |
407 | | - dirname( __FILE__ ) . '/patches/drop-field--poll_info-poll_title.sql' |
408 | | - ); |
| 403 | + if ( $updater->extensionTableExists( 'poll_info' ) ) { |
| 404 | + # poll_info.poll_title field was dropped in AJAXPoll version 1.72 |
| 405 | + $updater->dropExtensionField( |
| 406 | + 'poll_info', |
| 407 | + 'poll_title', |
| 408 | + dirname( __FILE__ ) . '/patches/drop-field--poll_info-poll_title.sql' |
| 409 | + ); |
| 410 | + $updater->addExtensionTable( |
| 411 | + 'ajaxpoll_info', |
| 412 | + dirname( __FILE__ ) . '/patches/rename-table--poll_info.sql' |
| 413 | + ); |
| 414 | + } else { |
| 415 | + $updater->addExtensionTable( |
| 416 | + 'ajaxpoll_info', |
| 417 | + dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_info.sql' |
| 418 | + ); |
| 419 | + } |
409 | 420 | |
410 | | - $updater->addExtensionTable( |
411 | | - 'ajaxpoll_info', |
412 | | - dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_info.sql' |
413 | | - ); |
414 | | - $updater->addExtensionTable( |
415 | | - 'ajaxpoll_vote', |
416 | | - dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_vote.sql' |
417 | | - ); |
| 421 | + if ( $updater->extensionTableExists( 'poll_vote' ) ) { |
| 422 | + $updater->addExtensionTable( |
| 423 | + 'ajaxpoll_vote', |
| 424 | + dirname( __FILE__ ) . '/patches/rename-table--poll_vote.sql' |
| 425 | + ); |
| 426 | + } else { |
| 427 | + $updater->addExtensionTable( |
| 428 | + 'ajaxpoll_vote', |
| 429 | + dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_vote.sql' |
| 430 | + ); |
| 431 | + } |
418 | 432 | |
419 | 433 | } |
| 434 | + |
420 | 435 | return true; |
421 | 436 | } |
422 | 437 | |
Index: trunk/extensions/AJAXPoll/AJAXPoll.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | * @author Jack Phoenix <jack@countervandalism.net> |
21 | 21 | * @author Thomas Gries |
22 | 22 | * @maintainer Thomas Gries |
23 | | - * @version 1.72 |
| 23 | + * @version 1.73 |
24 | 24 | * @link http://www.mediawiki.org/wiki/Extension:AJAX_Poll Documentation |
25 | 25 | */ |
26 | 26 | |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | $wgExtensionCredits['parserhook'][] = array( |
33 | 33 | 'path' => __FILE__, |
34 | 34 | 'name' => 'AJAX Poll', |
35 | | - 'version' => '1.72 20120314', |
| 35 | + 'version' => '1.73 20120314', |
36 | 36 | 'author' => array( 'Dariusz Siedlecki', 'Jack Phoenix', 'Thomas Gries' ), |
37 | 37 | 'descriptionmsg' => 'ajaxpoll-desc', |
38 | 38 | 'url' => 'https://www.mediawiki.org/wiki/Extension:AJAX_Poll', |
Index: trunk/extensions/AJAXPoll/patches/create-table--ajaxpoll_info.sql |
— | — | @@ -1,4 +1,3 @@ |
2 | | -RENAME TABLE /*_*/poll_info TO /*_*/ajaxpoll_info; |
3 | 2 | CREATE TABLE IF NOT EXISTS /*_*/ajaxpoll_info ( |
4 | 3 | `poll_id` varchar(32) NOT NULL PRIMARY KEY default '', |
5 | 4 | `poll_txt` text, |
Index: trunk/extensions/AJAXPoll/patches/rename-table--poll_info.sql |
— | — | @@ -0,0 +1 @@ |
| 2 | +RENAME TABLE /*_*/poll_info TO /*_*/ajaxpoll_info; |
Property changes on: trunk/extensions/AJAXPoll/patches/rename-table--poll_info.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 3 | + native |
Index: trunk/extensions/AJAXPoll/patches/create-table--ajaxpoll_vote.sql |
— | — | @@ -1,4 +1,3 @@ |
2 | | -RENAME TABLE /*_*/poll_vote TO /*_*/ajaxpoll_vote; |
3 | 2 | CREATE TABLE IF NOT EXISTS /*_*/ajaxpoll_vote ( |
4 | 3 | `poll_id` varchar(32) NOT NULL default '', |
5 | 4 | `poll_user` varchar(255) NOT NULL default '', |
Index: trunk/extensions/AJAXPoll/patches/rename-table--poll_vote.sql |
— | — | @@ -0,0 +1 @@ |
| 2 | +RENAME TABLE /*_*/poll_vote TO /*_*/ajaxpoll_vote; |
Property changes on: trunk/extensions/AJAXPoll/patches/rename-table--poll_vote.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 3 | + native |