plugin spamblock: if forcemoderation is set, activate the new option moderation_auto
This commit is contained in:
parent
c1908949fc
commit
722c1cf7f8
@ -270,6 +270,11 @@ $tasks = array(array('version' => '0.5.1',
|
||||
'function' => 'serendipity_installFiles',
|
||||
'title' => 'Update .htaccess file',
|
||||
'desc' => 'Adds a new "documentation.*.html" rewrite rule exception to allow calling plugin documentation URLs.'),
|
||||
|
||||
array('version' => '2.2.1-alpha2',
|
||||
'function' => 'serendipity_upgrader_spamblock_moveForce',
|
||||
'title' => 'Swap value forcemoderation',
|
||||
'desc' => 'If force moderation of comments is activated, activate the new option moderation_auto'),
|
||||
);
|
||||
|
||||
/* Fetch SQL files which needs to be run */
|
||||
|
@ -419,6 +419,15 @@ function serendipity_upgrader_rewriteFeedIcon() {
|
||||
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}config SET value = '" . serendipity_db_escape_string($path) . "' WHERE name LIKE '%serendipity_plugin_syndication%big_img'");
|
||||
}
|
||||
|
||||
function serendipity_upgrader_spamblock_moveForce() {
|
||||
global $serendipity;
|
||||
|
||||
$force = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE name LIKE '%serendipity_event_spamblock%forcemoderation'", true);
|
||||
if ($force > 0) {
|
||||
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}config SET value = 'true' WHERE name LIKE '%serendipity_event_spamblock%moderation_auto'" );
|
||||
}
|
||||
}
|
||||
|
||||
function serendipity_upgrader_move_syndication_config() {
|
||||
global $serendipity;
|
||||
$optionsToPort = array( 'bannerURL' => 'feedBannerURL',
|
||||
|
Loading…
x
Reference in New Issue
Block a user