bayes 0.4.23: Fix sqlite throwing error message for setup routine
This commit is contained in:
parent
236cf57251
commit
6b06582e17
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
0.4.23:
|
||||
* Add "IF NOT EXISTS" to sqlite-upgrade function, preventing
|
||||
a php error
|
||||
|
||||
0.4.22:
|
||||
* Use parseTemplate method to be compatible with s9y 2.1-beta1, some
|
||||
template files needed to be moved from admin/ to the root dir
|
||||
|
|
|
@ -42,7 +42,7 @@ class serendipity_event_spamblock_bayes extends serendipity_event {
|
|||
$this->title = PLUGIN_EVENT_SPAMBLOCK_BAYES_NAME;
|
||||
$propbag->add ( 'description', PLUGIN_EVENT_SPAMBLOCK_BAYES_DESC);
|
||||
$propbag->add ( 'name', $this->title);
|
||||
$propbag->add ( 'version', '0.4.22' );
|
||||
$propbag->add ( 'version', '0.4.23' );
|
||||
$propbag->add ( 'event_hooks', array ('frontend_saveComment' => true,
|
||||
'backend_spamblock_comments_shown' => true,
|
||||
'external_plugin' => true,
|
||||
|
@ -509,6 +509,9 @@ class serendipity_event_spamblock_bayes extends serendipity_event {
|
|||
$sql = $sql[0][0];
|
||||
}
|
||||
$sql = str_replace("{$serendipity['dbPrefix']}comments", "{$serendipity['dbPrefix']}spamblock_bayes_recycler", $sql);
|
||||
if (strpos("sql", "NOT EXISTS") === false) {
|
||||
$sql = str_replace("CREATE TABLE", "CREATE TABLE IF NOT EXISTS", $sql);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$sql = "CREATE TABLE IF NOT EXISTS
|
||||
|
|
Loading…
Reference in a new issue