[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5577] branches/1.3



Revision: 5577
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5577&view=rev
Author:   einhverfr
Date:     2013-01-15 08:51:37 +0000 (Tue, 15 Jan 2013)
Log Message:
-----------
merging from trunk: Correcting error, access denied to translations, when saving a translation

Modified Paths:
--------------
    branches/1.3/LedgerSMB/PE.pm
    branches/1.3/bin/io.pl

Property Changed:
----------------
    branches/1.3/
    branches/1.3/LedgerSMB/PE.pm


Property changes on: branches/1.3
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:3711-3712,5424,5446-5448,5451,5457,5459,5461,5466,5473,5475,5482-5483,5485,5487,5489,5495-5496,5515,5519,5524,5526,5528-5529,5533,5544-5546,5548-5549,5554-5555,5563,5565
   + /trunk:3711-3712,5424,5446-5448,5451,5457,5459,5461,5466,5473,5475,5482-5483,5485,5487,5489,5495-5496,5515,5519,5524,5526,5528-5529,5533,5544-5546,5548-5549,5554-5555,5563,5565,5569,5576

Modified: branches/1.3/LedgerSMB/PE.pm
===================================================================
--- branches/1.3/LedgerSMB/PE.pm	2013-01-15 08:48:29 UTC (rev 5576)
+++ branches/1.3/LedgerSMB/PE.pm	2013-01-15 08:51:37 UTC (rev 5577)
@@ -1,4 +1,5 @@
 
+
 =head1 NAME
 
 LedgerSMB::PE - Support functions for projects, partsgroups, and parts
@@ -1665,12 +1666,20 @@
 
     my $dbh = $form->{dbh};
 
-    my $query = qq|DELETE FROM translation WHERE trans_id = ?|;
+    my %tables = (
+        partsgroup => 'partsgroup_translation',
+        description => 'parts_translation'
+    );
+
+    my $table = $tables{$form->{translation}};
+
+    # table is whitelisted below, so safe.
+    my $query = qq|DELETE FROM $table WHERE trans_id = ?|;
     $sth = $dbh->prepare($query);
     $sth->execute( $form->{id} ) || $form->dberror($query);
 
     $query = qq|
-		INSERT INTO translation (trans_id, language_code, description)
+		INSERT INTO $table (trans_id, language_code, description)
 		     VALUES (?, ?, ?)|;
     my $sth = $dbh->prepare($query) || $form->dberror($query);
 


Property changes on: branches/1.3/LedgerSMB/PE.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /tags/1.3.22/LedgerSMB/PE.pm:5141
/trunk/LedgerSMB/PE.pm:3711-3978
   + /tags/1.3.22/LedgerSMB/PE.pm:5141
/trunk/LedgerSMB/PE.pm:3711-3978,5576

Modified: branches/1.3/bin/io.pl
===================================================================
--- branches/1.3/bin/io.pl	2013-01-15 08:48:29 UTC (rev 5576)
+++ branches/1.3/bin/io.pl	2013-01-15 08:51:37 UTC (rev 5577)
@@ -2312,10 +2312,10 @@
 sub validatelocation
 {
 
-   	my @Newlocation=("shiptoaddress1_new","shiptoaddress2_new","shiptoaddress3_new","shiptocity_new","shiptostate_new","shiptozipcode_new","shiptocountry_new");
+   	my @Newlocation=("shiptoaddress1_new","shiptocity_new","shiptostate_new","shiptocountry_new");
         foreach(@Newlocation)
 	{
-		$form->error( " Don not keep field empty $_") unless($form->{"$_"});
+		$form->error( $locale->text("Do not keep field empty [_1]", $_)) unless($form->{"$_"});
 	}
 
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.