aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 9abc2e330..ca8cbdfc0 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1486,6 +1486,15 @@ function item_store($arr,$force_parent = false) {
$arr['item_flags'] = $arr['item_flags'] | ITEM_UNSEEN;
+
+ // handle time travelers
+ // Allow a bit of fudge in case somebody just has a slightly slow/fast clock
+
+ $d1 = new DateTime('now +10 minutes');
+ $d2 = new DateTime($arr['created']);
+ if($d2 > $d1)
+ $arr['item_restrict'] = $arr['item_restrict'] | ITEM_DELAYED_PUBLISH;
+
$arr['llink'] = z_root() . '/display/' . $arr['mid'];
if(! $arr['plink'])