[Debian-l10n-commits] r1018 - /ddtss/trunk/ddtss-cgi

kleptog-guest at users.alioth.debian.org kleptog-guest at users.alioth.debian.org
Tue Feb 19 09:42:59 UTC 2008


Author: kleptog-guest
Date: Tue Feb 19 09:42:58 2008
New Revision: 1018

URL: http://svn.debian.org/wsvn/?sc=1&rev=1018
Log:
Add a test so that if a user tries to fetch a package that has already been fetched, it just jumps to the translation screen.

Modified:
    ddtss/trunk/ddtss-cgi

Modified: ddtss/trunk/ddtss-cgi
URL: http://svn.debian.org/wsvn/ddtss/trunk/ddtss-cgi?rev=1018&op=diff
==============================================================================
--- ddtss/trunk/ddtss-cgi (original)
+++ ddtss/trunk/ddtss-cgi Tue Feb 19 09:42:58 2008
@@ -857,6 +857,26 @@
     $db->get("config/clientemail", $email);
   }
 
+  my $temp;
+  if( not $force and $db->get( "$lang/packages/$package", $temp ) == 0 )
+  {
+    if( $db->get( "$lang/packages/$package/owner", $temp ) == 0 )  
+    {
+      $path = "forreview";
+    }
+    else
+    {
+      $path = "translate";
+    }
+    print $q->header( -type =>'text/html', -refresh => "5; url=$self/$path/$package" ),
+          $q->start_html( -title => "DDTSS", @html_headers ),
+          
+          $q->h1("$package was already in system"),
+          $q->a({-href => "$self/$path/$package"}, 'Goto translation screen'),
+          $q->end_html();
+    exit;
+  }
+
   DDTSS_Close($db);
 
   my $data;
@@ -896,7 +916,6 @@
 
   $db = DDTSS_Open_Write();
 
-  my $temp;
   my $path;
   # If we already have this package in the system, overwrite untranslated...
   if( $db->get( "$lang/packages/$package/data", $temp ) == 0 )




More information about the Debian-l10n-commits mailing list