clean indent

This commit is contained in:
Frédéric FRANCE 2019-10-27 08:50:32 +01:00
parent 2cce624623
commit 5006001753
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
17 changed files with 199 additions and 185 deletions

View File

@ -65,21 +65,33 @@ $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
while ($i < $num) {
$row = $db->fetch_row($resql);
$productsid[$i] = $row[0];
$i++;
}
}
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; }
while ($i < $num) {
$row = $db->fetch_row($resql);
$societesid[$i] = $row[0];
$i++;
}
} else { print "err"; }
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql); $i = 0;
while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; }
while ($i < $num) {
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
$i++;
}
} else { print "err"; }

View File

@ -555,7 +555,9 @@ if ( $object->socid && ! empty($conf->societe->enabled) && ! empty($conf->global
// Country
print '<tr><td class="titlefieldcreate">'.$langs->trans('Country').'</td><td>';
print $form->select_country((!empty($object->country_id)?$object->country_id:$mysoc->country_code), 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}
print '</td></tr>';
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" class="maxwidth200" value="'.dol_escape_htmltag($object->email).'"></td></tr>';
@ -642,8 +644,9 @@ if (! empty($id) && $action != 'edit')
$morehtmlref.=$langs->trans('Project') . ' ';
if ($user->rights->don->creer)
{
if ($action != 'classify')
if ($action != 'classify') {
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
}
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';

View File

@ -124,8 +124,9 @@ if ($object->id)
$morehtmlref.=$langs->trans('Project') . ' ';
if ($user->rights->don->creer)
{
if ($action != 'classify')
if ($action != 'classify') {
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
}
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';

View File

@ -79,8 +79,9 @@ if (! empty($conf->projet->enabled))
$morehtmlref.=$langs->trans('Project') . ' ';
if ($user->rights->don->creer)
{
if ($action != 'classify')
if ($action != 'classify') {
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
}
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';

View File

@ -95,8 +95,9 @@ if ($id > 0 || ! empty($ref))
$morehtmlref.=$langs->trans('Project') . ' ';
if ($user->rights->don->creer)
{
if ($action != 'classify')
if ($action != 'classify') {
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
}
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';

View File

@ -18,11 +18,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
?>
<!-- BEGIN PHP TEMPLATE -->
<?php
print "<!-- BEGIN PHP TEMPLATE -->\n";
global $user;
global $noMoreLinkedObjectBlockAfter;
@ -32,26 +29,25 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
$langs->load("donations");
$total=0; $ilink=0;
$total=0;
$ilink=0;
foreach($linkedObjectBlock as $key => $objectlink) {
$ilink++;
$trclass='oddeven';
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
?>
<tr class="<?php echo $trclass; ?>">
<td><?php echo $langs->trans("Donation"); ?></td>
<td><?php echo $objectlink->getNomUrl(1); ?></td>
<td class="center"><?php echo $objectlink->ref_client; ?></td>
<td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
<td class="right"><?php
print '<tr class="'.$trclass.'">';
print '<td>'.$langs->trans("Donation").'</td>';
print '<td>'.$objectlink->getNomUrl(1).'</td>';
print '<td class="center">'.$objectlink->ref_client.'</td>';
print '<td class="center">'.dol_print_date($objectlink->date, 'day').'</td>';
print '<td class="right">';
$total = $total + $objectlink->total_ht;
echo price($objectlink->total_ht);
} ?>
</td>
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
</tr>
<?php
}
print '</td>';
print '<td class="right">'.$objectlink->getLibStatut(3).'</td>';
print '</tr>';
if (count($linkedObjectBlock) > 1)
{
@ -67,6 +63,5 @@ if (count($linkedObjectBlock) > 1)
</tr>
<?php
}
?>
<!-- END PHP TEMPLATE -->
print "<!-- END PHP TEMPLATE -->\n";

View File

@ -1886,11 +1886,12 @@ class EmailCollector extends CommonObject
// BODY
$s = imap_fetchstructure($mbox, $mid);
if (!$s->parts) // simple
if (!$s->parts) {
// simple
$this->getpart($mbox, $mid, $s, 0); // pass 0 as part-number
else { // multipart: cycle through each part
foreach ($s->parts as $partno0=>$p)
{
} else {
// multipart: cycle through each part
foreach ($s->parts as $partno0 => $p) {
$this->getpart($mbox, $mid, $p, $partno0+1);
}
}