Skip to content

Commit

Permalink
I renamed translang into forcelangprod to be sure to not forget that
Browse files Browse the repository at this point in the history
this
is not an error and is specific to translation product page.
  • Loading branch information
eldy committed Jan 19, 2012
1 parent 697f46b commit 61da750
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions htdocs/product/traduction.php
@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2010 Destailleur Laurent <eldy@users.sourceforge.net>
* Copyright (C) 2010-2012 Destailleur Laurent <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -63,17 +63,17 @@
$current_lang = $langs->getDefaultLang();

// update de l'objet
if ( $_POST["translang"] == $current_lang )
if ( $_POST["forcelangprod"] == $current_lang )
{
$product->libelle = $_POST["libelle"];
$product->description = dol_htmlcleanlastbr($_POST["desc"]);
$product->note = dol_htmlcleanlastbr($_POST["note"]);
}
else
{
$product->multilangs[$_POST["translang"]]["libelle"] = $_POST["libelle"];
$product->multilangs[$_POST["translang"]]["description"] = dol_htmlcleanlastbr($_POST["desc"]);
$product->multilangs[$_POST["translang"]]["note"] = dol_htmlcleanlastbr($_POST["note"]);
$product->multilangs[$_POST["forcelangprod"]]["libelle"] = $_POST["libelle"];
$product->multilangs[$_POST["forcelangprod"]]["description"] = dol_htmlcleanlastbr($_POST["desc"]);
$product->multilangs[$_POST["forcelangprod"]]["note"] = dol_htmlcleanlastbr($_POST["note"]);
}

// sauvegarde en base
Expand Down Expand Up @@ -240,7 +240,7 @@

print '<table class="border" width="100%">';
print '<tr><td valign="top" width="15%" class="fieldrequired">'.$langs->trans('Translation').'</td><td>';
print $formadmin->select_language('','translang',0,$product->multilangs);
print $formadmin->select_language('','forcelangprod',0,$product->multilangs);
print '</td></tr>';
print '<tr><td valign="top" width="15%" class="fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle" size="40"></td></tr>';
print '<tr><td valign="top" width="15%">'.$langs->trans('Description').'</td><td>';
Expand Down

0 comments on commit 61da750

Please sign in to comment.