summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rwxr-xr-xapp/controllers/feedController.php4
-rwxr-xr-xapp/models/Entry.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php
index 02647e10f..a38614b3d 100755
--- a/app/controllers/feedController.php
+++ b/app/controllers/feedController.php
@@ -106,7 +106,7 @@ class feedController extends ActionController {
$feed->keepHistory ()) {
$values = $entry->toArray ();
$values['id_feed'] = $feed->id ();
- $values['id'] = min(time(), $entry->date (true)) . '.' . rand(0, 999999);
+ $values['id'] = min(time(), $entry->date (true)) . uSecString();
$values['is_read'] = $is_read;
$entryDAO->addEntry ($values);
}
@@ -229,7 +229,7 @@ class feedController extends ActionController {
$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);
+ $values['id'] = empty($existingGuids) ? min(time(), $entry->date (true)) . uSecString() : uTimeString();
$values['is_read'] = $is_read;
$entryDAO->addEntry ($values);
}
diff --git a/app/models/Entry.php b/app/models/Entry.php
index 33d0c66bb..103a90706 100755
--- a/app/models/Entry.php
+++ b/app/models/Entry.php
@@ -196,7 +196,7 @@ class Entry extends Model {
class EntryDAO extends Model_pdo {
public function addEntry ($valuesTmp) {
$sql = 'INSERT INTO `' . $this->prefix . 'entry`(id, guid, title, author, content_bin, link, date, is_read, is_favorite, id_feed, tags) '
- . 'VALUES(CAST(? * 1000000 AS SIGNED INTEGER), ?, ?, ?, COMPRESS(?), ?, ?, ?, ?, ?, ?)';
+ . 'VALUES(?, ?, ?, ?, COMPRESS(?), ?, ?, ?, ?, ?, ?)';
$stm = $this->bd->prepare ($sql);
$values = array (