summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-11-28 15:32:27 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-11-28 15:32:27 +0100
commitcec39d14f12068bf25e9611fd235f347222b2c02 (patch)
tree6af1dc600bbca16999205a6f212ba9208110c19b
parent1e9ccb1da9f38ca983258b983e156d56a2887bc9 (diff)
parent27456258e6da5d274ee881c95760c51506479a2b (diff)
Merge branch 'dev' into sharing
-rwxr-xr-xapp/controllers/feedController.php3
-rw-r--r--app/layout/layout.phtml2
-rwxr-xr-xapp/models/Entry.php2
-rwxr-xr-xpublic/index.php6
4 files changed, 8 insertions, 5 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php
index cd252b086..2bbd5ab49 100755
--- a/app/controllers/feedController.php
+++ b/app/controllers/feedController.php
@@ -97,6 +97,7 @@ class feedController extends ActionController {
if ($entry->date (true) >= $date_min ||
$feed->keepHistory ()) {
$values = $entry->toArray ();
+ $values['id'] = min(time(), $entry->date (true)) . '.' . rand(0, 999999);
$entryDAO->addEntry ($values);
}
}
@@ -196,6 +197,8 @@ class feedController extends ActionController {
($entry->date (true) >= $date_min ||
$feed->keepHistory ())) {
$values = $entry->toArray ();
+ //Use declared date at first import, otherwise use discovery date
+ $values['id'] = empty($existingGuids) ? min(time(), $entry->date (true)) . '.' . rand(0, 999999) : microtime(true);
$entryDAO->addEntry ($values);
}
}
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml
index ac0031355..c53b28841 100644
--- a/app/layout/layout.phtml
+++ b/app/layout/layout.phtml
@@ -32,7 +32,7 @@
<?php
if (isset ($this->notification)) {
- touch(DATA_PATH . '/touch.txt', time() + 1);
+ touch(DATA_PATH . '/touch.txt');
?>
<div class="notification <?php echo $this->notification['type']; ?>">
<?php echo $this->notification['content']; ?>
diff --git a/app/models/Entry.php b/app/models/Entry.php
index 80e8d7b6e..f8ec1287c 100755
--- a/app/models/Entry.php
+++ b/app/models/Entry.php
@@ -203,7 +203,7 @@ class EntryDAO extends Model_pdo {
$stm = $this->bd->prepare ($sql);
$values = array (
- microtime(true),
+ $valuesTmp['id'],
substr($valuesTmp['guid'], 0, 760),
substr($valuesTmp['title'], 0, 255),
substr($valuesTmp['author'], 0, 255),
diff --git a/public/index.php b/public/index.php
index 5728d981b..9d1ee711c 100755
--- a/public/index.php
+++ b/public/index.php
@@ -26,9 +26,9 @@ if (file_exists ('install.php')) {
session_cache_limiter('');
require (LIB_PATH . '/http-conditional.php');
$dateLastModification = max(
- @filemtime(DATA_PATH . '/touch.txt'),
- @filemtime(LOG_PATH . '/application.log'),
- @filemtime(DATA_PATH . '/application.ini')
+ @filemtime(DATA_PATH . '/touch.txt') - 1,
+ @filemtime(LOG_PATH . '/application.log') - 1,
+ @filemtime(DATA_PATH . '/application.ini') - 1
);
if (httpConditional($dateLastModification, 0, 0, false, false, true)) {
exit(); //No need to send anything