From 5a6ebc836b1951d375a149321ddb3887d2c9a588 Mon Sep 17 00:00:00 2001
From: Alexandre Morignot <erdnaxeli@cervoi.se>
Date: Thu, 5 Feb 2015 15:57:12 +0100
Subject: [PATCH] when a content is posted, get the tags in all cases

---
 lib/sites/parser.pm | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/lib/sites/parser.pm b/lib/sites/parser.pm
index 8db61c7..6ad7912 100644
--- a/lib/sites/parser.pm
+++ b/lib/sites/parser.pm
@@ -85,20 +85,20 @@ sub parse {
 			    or $log->error("Couldn't finish transaction: " . $dbh->errstr);
 
 		    $id = $sth->fetch->[0];
+	    }
 
-            # get tags
-            $sth = $dbh->prepare("select tag
-                from playbot_tags
-                where id = ?
+        # get tags
+        $sth = $dbh->prepare("select tag
+            from playbot_tags
+            where id = ?
             ");
-            $sth->execute($id);
+        $sth->execute($id);
 
-            while (my $data = $sth->fetch) {
-                my $tag = $data->[0];
-                $tag =~ s/([a-zA-Z0-9_-]+)/#$1/;
-                push @tags, $tag;
-            }
-	    }
+        while (my $data = $sth->fetch) {
+            my $tag = $data->[0];
+            $tag =~ s/([a-zA-Z0-9_-]+)/#$1/;
+            push @tags, $tag;
+        }
 
         # insertion du chan
         my $sth = $dbh->prepare_cached('
-- 
GitLab