aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-09-24 02:02:33 -0700
committerSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-09-24 02:02:33 -0700
commitfdc3c114d1617578e388147af138e8470d7b20b3 (patch)
tree15c1ee4122b1fea014227a0b999acaae7dd87575
parent5d48d5d06e5d38933c3415890d692d4b23febe06 (diff)
parentfc93ae1d1a661ff33d1f1ed1100ae09277a77456 (diff)
downloadShaarli-fdc3c114d1617578e388147af138e8470d7b20b3.tar.gz
Shaarli-fdc3c114d1617578e388147af138e8470d7b20b3.tar.zst
Shaarli-fdc3c114d1617578e388147af138e8470d7b20b3.zip
Merge pull request #126 from Alkarex/Milliseconds
Import: add compatibility for milliseconds in NETSCAPE-Bookmark
-rw-r--r--index.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/index.php b/index.php
index 2154c063..b402eba9 100644
--- a/index.php
+++ b/index.php
@@ -1695,7 +1695,11 @@ function importFile()
1695 { 1695 {
1696 $attr=$m[1]; $value=$m[2]; 1696 $attr=$m[1]; $value=$m[2];
1697 if ($attr=='HREF') $link['url']=html_entity_decode($value,ENT_QUOTES,'UTF-8'); 1697 if ($attr=='HREF') $link['url']=html_entity_decode($value,ENT_QUOTES,'UTF-8');
1698 elseif ($attr=='ADD_DATE') $raw_add_date=intval($value); 1698 elseif ($attr=='ADD_DATE')
1699 {
1700 $raw_add_date=intval($value);
1701 if ($raw_add_date>30000000000) $raw_add_date/=1000; //If larger than year 2920, then was likely stored in milliseconds instead of seconds
1702 }
1699 elseif ($attr=='PRIVATE') $link['private']=($value=='0'?0:1); 1703 elseif ($attr=='PRIVATE') $link['private']=($value=='0'?0:1);
1700 elseif ($attr=='TAGS') $link['tags']=html_entity_decode(str_replace(',',' ',$value),ENT_QUOTES,'UTF-8'); 1704 elseif ($attr=='TAGS') $link['tags']=html_entity_decode(str_replace(',',' ',$value),ENT_QUOTES,'UTF-8');
1701 } 1705 }