Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Jun 18, 2018
2 parents d81398e + 62307b7 commit da16805
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 22 deletions.
1 change: 0 additions & 1 deletion htdocs/admin/barcode.php
Expand Up @@ -369,7 +369,6 @@
}

$modBarCode = new $file();
$var = !$var;

print '<tr class="oddeven">';
print '<td>'.(isset($modBarCode->name)?$modBarCode->name:$modBarCode->nom)."</td><td>\n";
Expand Down
Expand Up @@ -452,11 +452,9 @@ function write_file($object,$outputlangs,$srctemplatepath)
if (! is_object($outputlangs)) $outputlangs=$langs;
$sav_charset_output=$outputlangs->charset_output;
$outputlangs->charset_output='UTF-8';

$outputlangs->load("main");
$outputlangs->load("dict");
$outputlangs->load("companies");
$outputlangs->load("projects");

// Load translation files required by the page
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));

if ($conf->projet->dir_output)
{
Expand Down Expand Up @@ -951,7 +949,6 @@ function write_file($object,$outputlangs,$srctemplatepath)
$elementarray = $object->get_element_list($keyref, $tablename);
if (count($elementarray)>0 && is_array($elementarray))
{
$var=true;
$total_ht = 0;
$total_ttc = 0;
$num=count($elementarray);
Expand Down
9 changes: 3 additions & 6 deletions htdocs/core/modules/societe/doc/doc_generic_odt.modules.php
Expand Up @@ -197,11 +197,9 @@ function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidede
if (! is_object($outputlangs)) $outputlangs=$langs;
$sav_charset_output=$outputlangs->charset_output;
$outputlangs->charset_output='UTF-8';

$outputlangs->load("main");
$outputlangs->load("dict");
$outputlangs->load("companies");
$outputlangs->load("projects");

// Load translation files required by the page
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));

if ($conf->societe->multidir_output[$object->entity])
{
Expand Down Expand Up @@ -282,7 +280,6 @@ function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidede
$result = $this->db->query($sql);
$num = $this->db->num_rows($result);

$var=true;
if ($num)
{
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
Expand Down
6 changes: 1 addition & 5 deletions htdocs/core/tpl/contacts.tpl.php
Expand Up @@ -78,7 +78,6 @@

<?php

$var=true;
if (empty($hideaddcontactforuser))
{

Expand Down Expand Up @@ -157,8 +156,6 @@
<div class="tagtd liste_titre">&nbsp;</div>
</form>

<?php $var=true; ?>

<?php
$arrayofsource=array('internal','external'); // Show both link to user and thirdparties contacts
foreach($arrayofsource as $source) {
Expand All @@ -171,10 +168,9 @@

$i = 0;
while ($i < $num) {
$var = !$var;
?>

<form class="tagtr <?php echo $var?"pair":"impair"; ?>">
<form class="tagtr oddeven">
<div class="tagtd" align="left">
<?php if ($tab[$i]['source']=='internal') echo $langs->trans("User"); ?>
<?php if ($tab[$i]['source']=='external') echo $langs->trans("ThirdPartyContact"); ?>
Expand Down
7 changes: 3 additions & 4 deletions htdocs/core/tpl/resource_view.tpl.php
Expand Up @@ -36,7 +36,6 @@

if( (array) $linked_resources && count($linked_resources) > 0)
{
$var=true;

foreach ($linked_resources as $linked_resource)
{
Expand All @@ -48,7 +47,7 @@
if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid'))
{

print '<form class="tagtr '.($var==true?'pair':'impair').'" action="'.$_SERVER["PHP_SELF"].'?element='.$element.'&element_id='.$element_id.'" method="POST">';
print '<form class="tagtr oddeven" action="'.$_SERVER["PHP_SELF"].'?element='.$element.'&element_id='.$element_id.'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
print '<input type="hidden" name="id" value="'.$object->id.'" />';
print '<input type="hidden" name="action" value="update_linked_resource" />';
Expand All @@ -68,7 +67,7 @@
if ($linked_resource['rowid'] == GETPOST('lineid'))
$style='style="background: orange;"';

print '<form class="tagtr '.($var==true?"pair":"impair").'" '.$style.'>';
print '<form class="tagtr oddeven" '.$style.'>';

print '<div class="tagtd">';
print $object_resource->getNomUrl(1);
Expand Down Expand Up @@ -102,7 +101,7 @@

}
else {
print '<form class="tagtr '.($var==true?"pair":"impair").'">';
print '<form class="tagtr oddeven">';
print '<div class="tagtd opacitymedium">'.$langs->trans('NoResourceLinked').'</div>';
print '<div class="tagtd opacitymedium"></div>';
print '<div class="tagtd opacitymedium"></div>';
Expand Down

0 comments on commit da16805

Please sign in to comment.