aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/NetscapeBookmarkUtils.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/NetscapeBookmarkUtils.php')
-rw-r--r--application/NetscapeBookmarkUtils.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/application/NetscapeBookmarkUtils.php b/application/NetscapeBookmarkUtils.php
index dd7057f8..b4d16d00 100644
--- a/application/NetscapeBookmarkUtils.php
+++ b/application/NetscapeBookmarkUtils.php
@@ -108,7 +108,7 @@ class NetscapeBookmarkUtils
108 $filesize = $files['filetoupload']['size']; 108 $filesize = $files['filetoupload']['size'];
109 $data = file_get_contents($files['filetoupload']['tmp_name']); 109 $data = file_get_contents($files['filetoupload']['tmp_name']);
110 110
111 if (strpos($data, '<!DOCTYPE NETSCAPE-Bookmark-file-1>') === false) { 111 if (preg_match('/<!DOCTYPE NETSCAPE-Bookmark-file-1>/i', $data) === 0) {
112 return self::importStatus($filename, $filesize); 112 return self::importStatus($filename, $filesize);
113 } 113 }
114 114
@@ -154,13 +154,13 @@ class NetscapeBookmarkUtils
154 if (empty($post['privacy']) || $post['privacy'] == 'default') { 154 if (empty($post['privacy']) || $post['privacy'] == 'default') {
155 // use value from the imported file 155 // use value from the imported file
156 $private = $bkm['pub'] == '1' ? 0 : 1; 156 $private = $bkm['pub'] == '1' ? 0 : 1;
157 } else if ($post['privacy'] == 'private') { 157 } elseif ($post['privacy'] == 'private') {
158 // all imported links are private 158 // all imported links are private
159 $private = 1; 159 $private = 1;
160 } else if ($post['privacy'] == 'public') { 160 } elseif ($post['privacy'] == 'public') {
161 // all imported links are public 161 // all imported links are public
162 $private = 0; 162 $private = 0;
163 } 163 }
164 164
165 $newLink = array( 165 $newLink = array(
166 'title' => $bkm['title'], 166 'title' => $bkm['title'],