Including other.lang in files using FeaturesSupported string, also removed duplicated code

This commit is contained in:
Marcos García 2012-07-30 20:39:47 +02:00
parent a71840bbd9
commit 237d7b744c
9 changed files with 13 additions and 5 deletions

View File

@ -36,6 +36,7 @@ require_once(DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php');
$langs->load("admin");
$langs->load("errors");
$langs->load("orders");
$langs->load('other');
if (! $user->admin) accessforbidden();
@ -289,7 +290,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; }
if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";

View File

@ -27,6 +27,7 @@ require_once(DOL_DOCUMENT_ROOT."/compta/dons/class/don.class.php");
$langs->load("admin");
$langs->load("donations");
$langs->load('other');
if (!$user->admin) accessforbidden();

View File

@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php');
$langs->load("admin");
$langs->load("sendings");
$langs->load("deliveries");
$langs->load('other');
if (!$user->admin) accessforbidden();

View File

@ -32,6 +32,7 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php');
$langs->load("admin");
$langs->load("errors");
$langs->load('other');
if (! $user->admin) accessforbidden();
@ -368,7 +369,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; }
if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";

View File

@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php');
$langs->load("admin");
$langs->load("errors");
$langs->load("interventions");
$langs->load('other');
if (! $user->admin) accessforbidden();
@ -251,7 +252,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; }
if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";

View File

@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php');
require_once(DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php');
$langs->load("admin");
$langs->load('other');
if (!$user->admin)
accessforbidden();

View File

@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/livraison/class/livraison.class.php");
$langs->load("admin");
$langs->load("sendings");
$langs->load("deliveries");
$langs->load('other');
if (!$user->admin) accessforbidden();

View File

@ -216,7 +216,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; }
if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";

View File

@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
$langs->load("admin");
$langs->load("errors");
$langs->load('other');
if (! $user->admin) accessforbidden();
@ -274,7 +275,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '<td nowrap="nowrap">';
$tmp=$module->getExample();
if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; }
if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print '</td>'."\n";