Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2019-05-22 11:48:43 +02:00
commit 2162f48ab1
10 changed files with 20 additions and 30 deletions

View File

@ -616,7 +616,7 @@ class AccountancyExport
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
print $date . $separator;
print $line->code_journal;
print $line->code_journal . $separator;
if (empty($line->subledger_account)) {
print length_accountg($line->numero_compte) . $separator;
} else {

View File

@ -137,7 +137,7 @@ if ($object->id > 0)
print '<div class="underbanner clearboth"></div>';
$object->info($id);
print dol_print_object_info($object, 1);
dol_print_object_info($object, 1);
print '</div>';

View File

@ -65,7 +65,7 @@ class AdherentType extends CommonObject
* @var string Adherent type label
*/
public $label;
/**
* @var string Adherent type nature
*/
@ -410,7 +410,7 @@ class AdherentType extends CommonObject
return -1;
}
}
/**
* Return translated label by the nature of a adherent (physical or moral)
*
@ -422,7 +422,7 @@ class AdherentType extends CommonObject
global $langs;
if ($morphy == 'phy') { return $langs->trans("Physical"); }
elseif ($morphy == 'mor') { return $langs->trans("Moral"); }
else return $langs->trans("Physical & Morale");
else return $langs->trans("Physical & Morale");
//return $morphy;
}
@ -463,6 +463,7 @@ class AdherentType extends CommonObject
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/**
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
*
@ -472,7 +473,7 @@ class AdherentType extends CommonObject
* 2=Return key only (uid=qqq)
* @return string DN
*/
private function _load_ldap_dn($info, $mode = 0)
public function _load_ldap_dn($info, $mode = 0)
{
// phpcs:enable
global $conf;
@ -485,12 +486,13 @@ class AdherentType extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/**
* Initialize the info array (array of LDAP values) that will be used to call LDAP functions
*
* @return array Tableau info des attributs
*/
private function _load_ldap_info()
public function _load_ldap_info()
{
// phpcs:enable
global $conf,$langs;

View File

@ -23,25 +23,12 @@
*/
// Load Dolibarr environment
$res=0;
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
if (! $res && ! empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res=@include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
$tmp=empty($_SERVER['SCRIPT_FILENAME'])?'':$_SERVER['SCRIPT_FILENAME'];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;
while($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i]==$tmp2[$j]) { $i--; $j--; }
if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/main.inc.php")) $res=@include substr($tmp, 0, ($i+1))."/main.inc.php";
if (! $res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i+1)))."/main.inc.php")) $res=@include dirname(substr($tmp, 0, ($i+1)))."/main.inc.php";
// Try main.inc.php using relative path
if (! $res && file_exists("../main.inc.php")) $res=@include "../main.inc.php";
if (! $res && file_exists("../../main.inc.php")) $res=@include "../../main.inc.php";
if (! $res && file_exists("../../../main.inc.php")) $res=@include "../../../main.inc.php";
if (! $res) die("Include of main fails");
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
dol_include_once('/bom/class/bom.class.php');
dol_include_once('/bom/lib/bom.lib.php');
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
// Load translation files required by the page
@ -196,7 +183,7 @@ if ($object->id > 0)
print '<div class="underbanner clearboth"></div>';
$object->info($object->id);
print dol_print_object_info($object, 1);
dol_print_object_info($object, 1);
print '</div>';

View File

@ -1679,7 +1679,7 @@ if ($action == 'create')
print '<tr>';
print '<td>' . $langs->trans("Project") . '</td><td>';
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("AddProject") . '</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("AddProject") . '</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
print '</td>';
print '</tr>';
}

View File

@ -227,7 +227,7 @@ else
print '<div class="underbanner clearboth"></div>';
$object->info($id);
print dol_print_object_info($object, 1);
dol_print_object_info($object, 1);
print '</div>';

View File

@ -196,7 +196,7 @@ if ($object->id > 0)
print '<div class="underbanner clearboth"></div>';
$object->info($object->id);
print dol_print_object_info($object, 1);
dol_print_object_info($object, 1);
print '</div>';

View File

@ -389,7 +389,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (! empty($object->lines))
{
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
// printObjectLines return void
$object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
}
// Form to add new line

View File

@ -141,7 +141,7 @@ if ($id > 0 || $ref)
print '<div class="underbanner clearboth"></div>';
$object->info($object->id);
print dol_print_object_info($object, 1);
dol_print_object_info($object, 1);
print '</div>';

View File

@ -127,7 +127,7 @@ if ($socid > 0)
print '<div class="underbanner clearboth"></div>';
$object->info($socid);
print dol_print_object_info($object, 1);
dol_print_object_info($object, 1);
print '</div>';