aboutsummaryrefslogtreecommitdiff
path: root/p/i/install.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-27 12:30:57 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-27 12:30:57 +0100
commitf8b8dc7a23f6c1d5d328c91a25c682c62d6f3649 (patch)
tree5b404fb6eb9bb2dbc25cc54e1fae3a20c37fdb2e /p/i/install.php
parent3cbcc9f1b3c7b93b85c951a005f205fdab8d475e (diff)
Mise à jour possible depuis v0.7-beta[1-2] + correction message
+ Correction message lorsqu'on clique sur "enregistrer" un flux où rien n'a changé et qui disait qu'une erreur était survenue alors que simplement rien n'avait changé
Diffstat (limited to 'p/i/install.php')
-rw-r--r--p/i/install.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/p/i/install.php b/p/i/install.php
index fa37ae19a..8db372fef 100644
--- a/p/i/install.php
+++ b/p/i/install.php
@@ -117,7 +117,9 @@ WHERE e1.content_bin IS NULL');
define('SQL_CONVERT_UPDATEv006', 'UPDATE `%1$sentry` SET content_bin=COMPRESS(?) WHERE id=?;');
-define('SQL_UPDATE_CACHED_VALUESv006', '
+define('SQL_DROP_BACKUPv006', 'DROP TABLE IF EXISTS `%1$sentry006`, `%1$sfeed006`, `%1$scategory006`;');
+
+define('SQL_UPDATE_CACHED_VALUES', '
UPDATE `%1$sfeed` f
INNER JOIN (
SELECT e.id_feed,
@@ -129,7 +131,7 @@ INNER JOIN (
SET f.cache_nbEntries=x.nbEntries, f.cache_nbUnreads=x.nbUnreads
');
-define('SQL_DROP_BACKUPv006', 'DROP TABLE IF EXISTS `%1$sentry006`, `%1$sfeed006`, `%1$scategory006`;');
+define('SQL_UPDATE_HISTORYv007b', 'UPDATE `%1$sfeed` SET keep_history = CASE WHEN keep_history = 0 THEN -2 WHEN keep_history = 1 THEN -1 ELSE keep_history END;');
//</updates>
function writeLine ($f, $line) {
@@ -349,7 +351,11 @@ function updateDatabase($perform = false) {
$stm->execute();
}
- $sql = sprintf(SQL_UPDATE_CACHED_VALUESv006, $_SESSION['bd_prefix_user']);
+ $sql = sprintf(SQL_UPDATE_HISTORYv007b, $_SESSION['bd_prefix_user']);
+ $stm = $c->prepare($sql);
+ $stm->execute();
+
+ $sql = sprintf(SQL_UPDATE_CACHED_VALUES, $_SESSION['bd_prefix_user']);
$stm = $c->prepare($sql);
$stm->execute();