Import Delicious private settings import-private
authorTarek Soliman <tarek@bashasoliman.com>
Wed, 19 Oct 2011 05:47:36 +0000 (00:47 -0500)
committerBenjamin Mako Hill <mako@atdot.cc>
Tue, 8 Nov 2011 15:28:09 +0000 (10:28 -0500)
import.php

index 9f2972859b2dbe0168e980aacbcf1ff7acf11fd4..5f0c5eeadbb8104a9818a7890db12b18b43f6eec 100644 (file)
@@ -80,6 +80,9 @@ function startElement($parser, $name, $attrs) {
                 case 'TIME':
                     $bDatetime = $attrVal;
                     break;
                 case 'TIME':
                     $bDatetime = $attrVal;
                     break;
+                case 'PRIVATE':
+                    $bStatus = (strcasecmp('yes', $attrVal) == 0) ? 2 : $status ;
+                    break;
                 case 'TAG':
                     $tags = strtolower($attrVal);
                     break;
                 case 'TAG':
                     $tags = strtolower($attrVal);
                     break;
@@ -96,7 +99,7 @@ function startElement($parser, $name, $attrs) {
                 $bDatetime = gmdate('Y-m-d H:i:s');
             }
 
                 $bDatetime = gmdate('Y-m-d H:i:s');
             }
 
-            if ($bookmarkservice->addBookmark($bAddress, $bTitle, $bDescription, $status, $tags, $bDatetime, true, true))
+            if ($bookmarkservice->addBookmark($bAddress, $bTitle, $bDescription, $bStatus, $tags, $bDatetime, true, true))
                 $tplVars['msg'] = T_('Bookmark imported.');
             else
                 $tplVars['error'] = T_('There was an error saving your bookmark. Please try again or contact the administrator.');
                 $tplVars['msg'] = T_('Bookmark imported.');
             else
                 $tplVars['error'] = T_('There was an error saving your bookmark. Please try again or contact the administrator.');

Benjamin Mako Hill || Want to submit a patch?