diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php index e9703fbfd6e..83951c57df7 100755 --- a/dev/initdata/generate-product.php +++ b/dev/initdata/generate-product.php @@ -61,8 +61,8 @@ $user->getrights(); $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++; } + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } } $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index f1e0f4f360b..9f740b5705d 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -64,22 +64,34 @@ $user->getrights(); $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++; } + $num = $db->num_rows($resql); $i = 0; + 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"; } diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index 7f095a744db..f568ba2b04b 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -149,9 +149,9 @@ foreach ($langstrings_3d AS $filename => $file) $keys = array_keys($langstrings_full, $value); if (count($keys)>1) { - foreach ($keys AS $key) { - $dups[$value][$filename][$linenum] = trim($langstrings_3dtrans[$filename][$linenum]); - } + foreach ($keys AS $key) { + $dups[$value][$filename][$linenum] = trim($langstrings_3dtrans[$filename][$linenum]); + } } } } diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index a367ad822ab..2779363004e 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -411,34 +411,34 @@ if (preg_match('/fr/i', $conf->global->MAIN_INFO_SOCIETE_COUNTRY)) print ''; print '' . $langs->trans("DONATION_ART200") . ''; print ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('DONATION_ART200'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("DONATION_ART200", $arrval, $conf->global->DONATION_ART200); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('DONATION_ART200'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("DONATION_ART200", $arrval, $conf->global->DONATION_ART200); + } print ''; print ''; print '' . $langs->trans("DONATION_ART238") . ''; print ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('DONATION_ART238'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("DONATION_ART238", $arrval, $conf->global->DONATION_ART238); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('DONATION_ART238'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("DONATION_ART238", $arrval, $conf->global->DONATION_ART238); + } print ''; print ''; print '' . $langs->trans("DONATION_ART885") . ''; print ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('DONATION_ART885'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("DONATION_ART885", $arrval, $conf->global->DONATION_ART885); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('DONATION_ART885'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("DONATION_ART885", $arrval, $conf->global->DONATION_ART885); + } print ''; print "\n"; } diff --git a/htdocs/don/card.php b/htdocs/don/card.php index d3f37771dd7..54d4e392f61 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -532,35 +532,37 @@ if (! empty($id) && $action == 'edit') print ""; print "\n"; -if ( $object->socid && ! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES) ) { - $company=new Societe($db); - $result=$company->fetch($object->socid); + if ( $object->socid && ! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES) ) { + $company=new Societe($db); + $result=$company->fetch($object->socid); - print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; -} else { - $langs->load("companies"); - print ''.$langs->trans("Company").''; - print ''.$langs->trans("Lastname").''; - print ''.$langs->trans("Firstname").''; - print ''.$langs->trans("Address").''; - print ''; + print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; + } else { + $langs->load("companies"); + print ''.$langs->trans("Company").''; + print ''.$langs->trans("Lastname").''; + print ''.$langs->trans("Firstname").''; + print ''.$langs->trans("Address").''; + print ''; - // Zip / Town - print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; - print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip), 'zipcode', array('town','selectcountry_id','state_id'), 6); - print ' '; - print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town), 'town', array('zipcode','selectcountry_id','state_id')); - print ''; + // Zip / Town + print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; + print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip), 'zipcode', array('town','selectcountry_id','state_id'), 6); + print ' '; + print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town), 'town', array('zipcode','selectcountry_id','state_id')); + print ''; - // Country - print ''.$langs->trans('Country').''; - 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); - print ''; + // Country + print ''.$langs->trans('Country').''; + 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); + } + print ''; - print "".''.$langs->trans("EMail").''; -} - // Payment mode + print "".''.$langs->trans("EMail").''; + } + // Payment mode print "".$langs->trans("PaymentMode")."\n"; if ($object->modepaymentid) $selected = $object->modepaymentid; else $selected = ''; @@ -642,19 +644,20 @@ if (! empty($id) && $action != 'edit') $morehtmlref.=$langs->trans('Project') . ' '; if ($user->rights->don->creer) { - if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { if (! empty($object->fk_project)) { $proj = new Project($db); @@ -692,16 +695,16 @@ if (! empty($id) && $action != 'edit') print yn($object->public); print ''; -if ($object->socid) { - $company=new Societe($db); - $result=$company->fetch($object->socid); + if ($object->socid) { + $company=new Societe($db); + $result=$company->fetch($object->socid); - print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; -} else { - print ''.$langs->trans("Company").''.$object->societe.''; - print ''.$langs->trans("Lastname").''.$object->lastname.''; - print ''.$langs->trans("Firstname").''.$object->firstname.''; -} + print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; + } else { + print ''.$langs->trans("Company").''.$object->societe.''; + print ''.$langs->trans("Lastname").''.$object->lastname.''; + print ''.$langs->trans("Firstname").''.$object->firstname.''; + } // Payment mode print "".$langs->trans("PaymentMode").""; @@ -861,15 +864,15 @@ if ($object->socid) { $linktoelem = $form->showLinkToObjectBlock($object, null, array('don')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - // Show online payment link - $useonlinepayment = (! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled)); + // Show online payment link + $useonlinepayment = (! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled)); - if ($useonlinepayment) //$object->statut != Facture::STATUS_DRAFT && - { - print '
'."\n"; - require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; - print showOnlinePaymentUrl('donation', $object->ref).'
'; - } + if ($useonlinepayment) //$object->statut != Facture::STATUS_DRAFT && + { + print '
'."\n"; + require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; + print showOnlinePaymentUrl('donation', $object->ref).'
'; + } print '
'; diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index fc95009846b..43bdcead36f 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -651,7 +651,7 @@ class Don extends CommonObject return 1; } else - { + { foreach($this->errors as $errmsg) { dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR); diff --git a/htdocs/don/document.php b/htdocs/don/document.php index 485a457cdce..93004163b2e 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -124,19 +124,20 @@ if ($object->id) $morehtmlref.=$langs->trans('Project') . ' '; if ($user->rights->don->creer) { - if ($action != 'classify') - // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { if (! empty($object->fk_project)) { $proj = new Project($db); diff --git a/htdocs/don/info.php b/htdocs/don/info.php index 1806e1b0ca5..12444938fdf 100644 --- a/htdocs/don/info.php +++ b/htdocs/don/info.php @@ -79,19 +79,20 @@ if (! empty($conf->projet->enabled)) $morehtmlref.=$langs->trans('Project') . ' '; if ($user->rights->don->creer) { - if ($action != 'classify') - // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { if (! empty($object->fk_project)) { $proj = new Project($db); diff --git a/htdocs/don/list.php b/htdocs/don/list.php index bdc6c45168d..7d20dc93032 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -171,13 +171,13 @@ if ($resql) print ''; print ''; if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; } else { - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; } print ''; print ''; @@ -202,9 +202,9 @@ if ($resql) print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder); if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { - print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder); } else { - print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder); } print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center '); @@ -228,17 +228,17 @@ if ($resql) $donationstatic->lastname=$objp->lastname; $donationstatic->firstname=$objp->firstname; print "".$donationstatic->getNomUrl(1).""; - if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { - $company=new Societe($db); - $result=$company->fetch($objp->socid); - if (!empty($objp->socid) && $company->id > 0) { - print "".$company->getNomUrl(1).""; - } else { - print "".$objp->societe.""; - } - } else { - print "".$objp->societe.""; - } + if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { + $company=new Societe($db); + $result=$company->fetch($objp->socid); + if (!empty($objp->socid) && $company->id > 0) { + print "".$company->getNomUrl(1).""; + } else { + print "".$objp->societe.""; + } + } else { + print "".$objp->societe.""; + } print "".$donationstatic->getFullName($langs).""; print ''.dol_print_date($db->jdate($objp->datedon), 'day').''; if (! empty($conf->projet->enabled)) diff --git a/htdocs/don/note.php b/htdocs/don/note.php index 0aae234687f..b076ce60350 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -95,19 +95,20 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.=$langs->trans('Project') . ' '; if ($user->rights->don->creer) { - if ($action != 'classify') - // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { if (! empty($object->fk_project)) { $proj = new Project($db); diff --git a/htdocs/don/tpl/linkedobjectblock.tpl.php b/htdocs/don/tpl/linkedobjectblock.tpl.php index 0b4d4f94574..94a676f964d 100644 --- a/htdocs/don/tpl/linkedobjectblock.tpl.php +++ b/htdocs/don/tpl/linkedobjectblock.tpl.php @@ -18,11 +18,8 @@ * along with this program. If not, see . * */ -?> - - -\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'; -?> - - trans("Donation"); ?> - getNomUrl(1); ?> - ref_client; ?> - date, 'day'); ?> - '; + print ''.$langs->trans("Donation").''; + print ''.$objectlink->getNomUrl(1).''; + print ''.$objectlink->ref_client.''; + print ''.dol_print_date($objectlink->date, 'day').''; + print ''; $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); -} ?> - - getLibStatut(3); ?> - -'; +print ''.$objectlink->getLibStatut(3).''; +print ''; if (count($linkedObjectBlock) > 1) { @@ -67,6 +63,5 @@ if (count($linkedObjectBlock) > 1) - +print "\n"; diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index 49074af89db..4c28e4c159d 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -141,10 +141,10 @@ if ($action == 'add' && $permtoadd) { if ($module == 'ecm') { - $ecmdir->ref = $ref; - $ecmdir->label = $label; - $ecmdir->description = $desc; - $ecmdir->fk_parent = (int) $catParent; + $ecmdir->ref = $ref; + $ecmdir->label = $label; + $ecmdir->description = $desc; + $ecmdir->fk_parent = (int) $catParent; $id = $ecmdir->create($user); if ($id <= 0) @@ -277,14 +277,14 @@ if (empty($action) || $action == 'delete_section') print load_fiche_titre($langs->trans("ECMSectionOfDocuments")); print '
'; -/* + /* $ecmdir->ref=$ecmdir->label; print $langs->trans("ECMSection").': '; print img_picto('','object_dir').' '; print ''.$langs->trans("ECMRoot").''; //print ' -> '.$ecmdir->getNomUrl(1).'
'; print "

"; -*/ + */ // Confirmation de la suppression d'une ligne categorie if ($action == 'delete_section') diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index 6bf50ed306d..d0ebba5c543 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -484,14 +484,14 @@ if ($action != 'edit' && $action != 'delete') //if (count($filearrayall) == 0) //{ - if ($permtoadd) - { - print ''.$langs->trans('Delete').''; - } - else - { - print ''.$langs->trans('Delete').''; - } + if ($permtoadd) + { + print ''.$langs->trans('Delete').''; + } + else + { + print ''.$langs->trans('Delete').''; + } /*} else { diff --git a/htdocs/ecm/file_card.php b/htdocs/ecm/file_card.php index 38504088068..4e8585508c6 100644 --- a/htdocs/ecm/file_card.php +++ b/htdocs/ecm/file_card.php @@ -401,7 +401,7 @@ if ($action != 'edit') { print ''.$langs->trans('Edit').''; } -/* + /* if ($user->rights->ecm->setup) { print ''.$langs->trans('Delete').''; @@ -410,7 +410,7 @@ if ($action != 'edit') { print ''.$langs->trans('Delete').''; } -*/ + */ print '
'; } diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 8e4d4660768..9d78ad5fd32 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -113,7 +113,7 @@ if (GETPOST("sendit", 'none') && ! empty($conf->global->MAIN_UPLOAD_DOC)) $res = dol_add_file_process($upload_dir, 0, 1, 'userfile', '', null, '', $generatethumbs); if ($res > 0) { - $result=$ecmdir->changeNbOfFiles('+'); + $result=$ecmdir->changeNbOfFiles('+'); } } } @@ -253,7 +253,7 @@ if ($action == 'refreshmanual') } } else - { + { dol_syslog("Parent is root"); $fk_parent=0; // Parent is root } diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 7e8d9232d8f..86d34080789 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -228,7 +228,7 @@ if ($action == 'refreshmanual') } } else - { + { dol_syslog("Parent is root"); $fk_parent=0; // Parent is root } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 0b4f57c5d6a..7469faaa356 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1886,12 +1886,13 @@ 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) - { - $this->getpart($mbox, $mid, $p, $partno0+1); + } else { + // multipart: cycle through each part + foreach ($s->parts as $partno0 => $p) { + $this->getpart($mbox, $mid, $p, $partno0+1); } } } @@ -1949,7 +1950,7 @@ class EmailCollector extends CommonObject { foreach ($p->dparameters as $x) { - $params[strtolower($x->attribute)] = $x->value; + $params[strtolower($x->attribute)] = $x->value; } }