]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge branch 'dev' of git://github.com/mariroz/wallabag into dev
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Fri, 21 Feb 2014 12:44:30 +0000 (13:44 +0100)
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Fri, 21 Feb 2014 12:44:30 +0000 (13:44 +0100)
inc/poche/Poche.class.php
themes/baggy/css/font.css
themes/baggy/fonts/icomoon.eot [moved from themes/baggy/font/icomoon.eot with 100% similarity]
themes/baggy/fonts/icomoon.svg [moved from themes/baggy/font/icomoon.svg with 100% similarity]
themes/baggy/fonts/icomoon.ttf [moved from themes/baggy/font/icomoon.ttf with 100% similarity]
themes/baggy/fonts/icomoon.woff [moved from themes/baggy/font/icomoon.woff with 100% similarity]
themes/baggy/fonts/ptsans.woff [moved from themes/baggy/font/ptsans.woff with 100% similarity]
themes/dmagenta/theme.ini
themes/solarized-dark/theme.ini

index 23e51c7e5467a523ad921d465b3bcc43114dfdad..33dddf1ec51d6c63e72950e399de182f9a5a5677 100755 (executable)
@@ -307,6 +307,8 @@ class Poche
             $themes[$theme] = $this->getThemeInfo($theme);
         }
 
+        ksort($themes);
+
         return $themes;
     }
 
@@ -403,7 +405,7 @@ class Poche
     /**
      * Call action (mark as fav, archive, delete, etc.)
      */
-    public function action($action, Url $url, $id = 0, $import = FALSE, $autoclose = FALSE)
+    public function action($action, Url $url, $id = 0, $import = FALSE, $autoclose = FALSE, $tags = null)
     {
         switch ($action)
         {
@@ -499,8 +501,14 @@ class Poche
                 }
                 break;
             case 'add_tag' :
-                $tags = explode(',', $_POST['value']);
-                $entry_id = $_POST['entry_id'];
+                if($import){
+                    $entry_id = $id;
+                    $tags = explode(',', $tags);
+                }
+                else{
+                    $tags = explode(',', $_POST['value']);
+                    $entry_id = $_POST['entry_id'];
+                }
                 $entry = $this->store->retrieveOneById($entry_id, $this->user->getId());
                 if (!$entry) {
                     $this->messages->add('e', _('Article not found!'));
@@ -527,7 +535,9 @@ class Poche
                     # we assign the tag to the article
                     $this->store->setTagToEntry($tag_id, $entry_id);
                 }
-                Tools::redirect();
+                if(!$import) {
+                    Tools::redirect();
+                }
                 break;
             case 'remove_tag' :
                 $tag_id = $_GET['tag_id'];
@@ -889,14 +899,18 @@ class Poche
                 $a = $li->find('a');
                 $url = new Url(base64_encode($a[0]->href));
                 $this->action('add', $url, 0, TRUE);
+                $sequence = '';
+                if (STORAGE == 'postgres') {
+                    $sequence = 'entries_id_seq';
+                }
+                $last_id = $this->store->getLastId($sequence);
                 if ($read == '1') {
-                        $sequence = '';
-                        if (STORAGE == 'postgres') {
-                            $sequence = 'entries_id_seq';
-                        }
-                    $last_id = $this->store->getLastId($sequence);
                     $this->action('toggle_archive', $url, $last_id, TRUE);
                 }
+                $tags = $a[0]->tags;
+                if(!empty($tags)) {
+                    $this->action('add_tag',$url,$last_id,true,false,$tags);
+                }
             }
             
             # the second <ul> is for read links
index ec6621585df6c4b07803ee4a6c18a274d581d0d7..7c02a16fb7517cc8c6edc6f714cf5b027864db3a 100755 (executable)
@@ -2,5 +2,5 @@
   font-family: 'PT Sans';
   font-style: normal;
   font-weight: 700;
-  src: local('PT Sans Bold'), local('PTSans-Bold'), url(/themes/baggy/fonts/ptsans.woff) format('woff');
+  src: local('PT Sans Bold'), local('PTSans-Bold'), url(../fonts/ptsans.woff) format('woff');
 }
index 24ff3c4a139f718be7fa37f19ec7f15499caf0c6..78fa3a9c958adb6bc9232e4605bbcd0b2013f43f 100644 (file)
@@ -1,2 +1,2 @@
-name = Dark Magenta
+name = Dmagenta
 requirements[] = default
index 7b6b341ecb7e60b5227855f0bcd706e4ca38b5ae..c994814645f91a980cd8ae65b6500e8a67258f6f 100644 (file)
@@ -1,2 +1,2 @@
-name = Dark Solarized
+name = Solarized Dark
 requirements[] = default