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

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



Revision: 5623
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5623&view=rev
Author:   einhverfr
Date:     2013-01-24 06:17:34 +0000 (Thu, 24 Jan 2013)
Log Message:
-----------
merging from trunk: Fix for translation showing more translations than is appropriate

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/LedgerSMB/PE.pm

Property Changed:
----------------
    branches/1.3/
    branches/1.3/Changelog
    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,5569,5576,5579,5589-5590,5597,5602-5603,5608,5610,5615,5617,5620
   + /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,5579,5589-5590,5597,5602-5603,5608,5610,5615,5617,5620,5622

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2013-01-24 06:12:47 UTC (rev 5622)
+++ branches/1.3/Changelog	2013-01-24 06:17:34 UTC (rev 5623)
@@ -4,6 +4,7 @@
 
 Changelog for 1.3.30
 * Documented behavior of Outstanding Summary report (Chris T, 3601314)
+* Fix for translations showing multiple types (Chris T, 3601737)
 
 Changelog for 1.3.29
 * Added db routines for role backup and restore for shared hosting


Property changes on: branches/1.3/Changelog
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/Changelog:3711-3712,5424,5446-5448,5451,5457,5459,5461,5466,5473,5475,5482-5483,5485,5487,5489,5495-5496,5513,5515,5519,5524,5529,5548,5563,5565,5578-5579,5581,5583,5587,5590,5593,5595,5597,5608,5610,5612,5615,5617,5620
   + /trunk/Changelog:3711-3712,5424,5446-5448,5451,5457,5459,5461,5466,5473,5475,5482-5483,5485,5487,5489,5495-5496,5513,5515,5519,5524,5529,5548,5563,5565,5578-5579,5581,5583,5587,5590,5593,5595,5597,5608,5610,5612,5615,5617,5620,5622

Modified: branches/1.3/LedgerSMB/PE.pm
===================================================================
--- branches/1.3/LedgerSMB/PE.pm	2013-01-24 06:12:47 UTC (rev 5622)
+++ branches/1.3/LedgerSMB/PE.pm	2013-01-24 06:17:34 UTC (rev 5623)
@@ -1037,7 +1037,7 @@
     $sth   = $dbh->prepare($query);
     $sth->execute( $form->{id} ) || $form->dberror($query);
 
-    $query = qq|DELETE FROM translation WHERE trans_id = ?|;
+    $query = qq|DELETE FROM translation_partsgroup WHERE trans_id = ?|;
     $sth   = $dbh->prepare($query);
     $sth->execute( $form->{id} ) || $form->dberror($query);
 
@@ -1434,7 +1434,7 @@
     my $query = qq|
 		  SELECT l.description AS language, 
 		         t.description AS translation, l.code
-		    FROM translation t
+		    FROM parts_translation t
 		    JOIN language l ON (l.code = t.language_code)
 		   WHERE trans_id = ?
 		ORDER BY 1|;
@@ -1506,7 +1506,7 @@
     my $query = qq|
 		  SELECT l.description AS language, 
 		         t.description AS translation, l.code
-		    FROM translation t
+		    FROM partsgroup_translation t
 		    JOIN language l ON (l.code = t.language_code)
 		   WHERE trans_id = ?
 		ORDER BY 1|;
@@ -1562,6 +1562,7 @@
 $myconfig is unused.  $form->{trans_id} is set to the last encountered id.
 
 =cut
+
 sub project_translations {
     my ( $self, $myconfig, $form ) = @_;
     my $dbh = $form->{dbh};
@@ -1587,7 +1588,7 @@
     my $query = qq|
 		  SELECT l.description AS language, 
 		         t.description AS translation, l.code
-		    FROM translation t
+		    FROM project_translation t
 		    JOIN language l ON (l.code = t.language_code)
 		   WHERE trans_id = ?
 		ORDER BY 1|;
@@ -1710,7 +1711,15 @@
 
     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);
 


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,5576
   + /tags/1.3.22/LedgerSMB/PE.pm:5141
/trunk/LedgerSMB/PE.pm:3711-3978,5576,5622

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