]> 91.132.146.200 Git - insipid.git/commitdiff
code cleanup and export only if authenticated
authorBanana <banana@starscream.de>
Wed, 15 Jun 2011 10:39:31 +0000 (12:39 +0200)
committerBanana <banana@starscream.de>
Wed, 15 Jun 2011 10:39:31 +0000 (12:39 +0200)
lib/Insipid/Main.pm

index bfb983f41a663c0469965b503e254c43b618ef07..6101b65d2df1768a1d8d20e2ff0f9389ff134483 100755 (executable)
@@ -114,6 +114,12 @@ sub main {
 
     if ( defined( url_param('op') ) ) {
         if ( url_param('op') eq 'export' ) {
+                       
+                       if ( logged_in() ne 1 ) {
+                push( @errors,"You have to be logged in to perform that operation." );
+                #return;
+            }
+       
             my $sn = 'n';
             if ( defined( param('snapshots') ) ) {
                 $sn = 'y';
@@ -140,16 +146,14 @@ sub main {
         # JSON
         # JSON Show tags:
         if ( url_param('op') eq 'json_tags' ) {
-            print
-              "Content-Type: application/x-javascript;charset=UTF-8\r\n\r\n";
+            print "Content-Type: application/x-javascript;charset=UTF-8\r\n\r\n";
             send_json_tags();
             exit;
         }
 
         # JSON Show bookmarks:
         if ( url_param('op') eq 'json_posts' ) {
-            print
-              "Content-Type: application/x-javascript;charset=UTF-8\r\n\r\n";
+            print "Content-Type: application/x-javascript;charset=UTF-8\r\n\r\n";
             send_json_posts();
             exit;
         }
@@ -282,9 +286,7 @@ IFORM
         {
 
             if ( logged_in() ne 1 ) {
-                push( @errors,
-                    "You have to be logged in to perform that operation." );
-
+                push( @errors,"You have to be logged in to perform that operation." );
                 #return;
             }