Merge pull request #8648 from grandoc/new_branch_20_04_2018
clean and update code
This commit is contained in:
commit
68a0b45141
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2018 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2018 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2012-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -41,11 +41,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("bills");
|
$langs->loadLangs(array("companies","bills","members","users","other"));
|
||||||
$langs->load("members");
|
|
||||||
$langs->load("users");
|
|
||||||
$langs->load('other');
|
|
||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$cancel=GETPOST('cancel','alpha');
|
$cancel=GETPOST('cancel','alpha');
|
||||||
@ -1387,7 +1384,7 @@ else
|
|||||||
$outputlangs = new Translate('', $conf);
|
$outputlangs = new Translate('', $conf);
|
||||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||||
$outputlangs->loadLangs(array("main", "members"));
|
$outputlangs->loadLangs(array("main", "members"));
|
||||||
// Get email content fro mtemplae
|
// Get email content from template
|
||||||
$arraydefaultmessage=null;
|
$arraydefaultmessage=null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION;
|
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION;
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -31,11 +31,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/bank.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("admin","companies","bills","other","banks"));
|
||||||
$langs->load("bills");
|
|
||||||
$langs->load("other");
|
|
||||||
$langs->load("banks");
|
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -178,10 +175,6 @@ print load_fiche_titre($langs->trans("BankSetupModule"), $linkback,
|
|||||||
$head = bank_admin_prepare_head(null);
|
$head = bank_admin_prepare_head(null);
|
||||||
dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account');
|
dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account');
|
||||||
|
|
||||||
$var = true;
|
|
||||||
|
|
||||||
$var = !$var;
|
|
||||||
|
|
||||||
//Show bank account order
|
//Show bank account order
|
||||||
print load_fiche_titre($langs->trans("BankOrderShow"), '', '');
|
print load_fiche_titre($langs->trans("BankOrderShow"), '', '');
|
||||||
|
|
||||||
@ -201,12 +194,10 @@ $bankorder[1][0] = $langs->trans("BankOrderES");
|
|||||||
$bankorder[1][1] = $langs->trans("BankOrderESDesc");
|
$bankorder[1][1] = $langs->trans("BankOrderESDesc");
|
||||||
$bankorder[1][2] = 'BankCode DeskCode BankAccountNumberKey BankAccountNumber';
|
$bankorder[1][2] = 'BankCode DeskCode BankAccountNumberKey BankAccountNumber';
|
||||||
|
|
||||||
$var = true;
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$nbofbank = count($bankorder);
|
$nbofbank = count($bankorder);
|
||||||
while ($i < $nbofbank) {
|
while ($i < $nbofbank) {
|
||||||
$var = !$var;
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>' . $bankorder[$i][0] . "</td><td>\n";
|
print '<td>' . $bankorder[$i][0] . "</td><td>\n";
|
||||||
@ -238,7 +229,6 @@ while ($i < $nbofbank) {
|
|||||||
|
|
||||||
print '</table>' . "\n";
|
print '</table>' . "\n";
|
||||||
|
|
||||||
|
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
|
|
||||||
@ -430,7 +420,8 @@ if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
print '<td align="center">' . "\n";
|
print '<td align="center">' . "\n";
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"),
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"),
|
||||||
'switch_off') . '</a>';
|
'switch_off') . '</a>';
|
||||||
|
|||||||
@ -30,11 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_ik.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_ik.class.php';
|
||||||
|
|
||||||
$langs->load('admin');
|
// Load traductions files requiredby by page
|
||||||
$langs->load('other');
|
$langs->loadLangs(array("admin","trips","errors","other","dict"));
|
||||||
$langs->load('trips');
|
|
||||||
$langs->load('errors');
|
|
||||||
$langs->load('dict');
|
|
||||||
|
|
||||||
if (!$user->admin) accessforbidden();
|
if (!$user->admin) accessforbidden();
|
||||||
|
|
||||||
@ -129,7 +126,7 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab)
|
|||||||
if ($Tab['active'] == 0) continue;
|
if ($Tab['active'] == 0) continue;
|
||||||
|
|
||||||
$tranche=1;
|
$tranche=1;
|
||||||
$var = true;
|
|
||||||
foreach ($Tab['ranges'] as $k => $range)
|
foreach ($Tab['ranges'] as $k => $range)
|
||||||
{
|
{
|
||||||
if (isset($Tab['ranges'][$k+1])) $label = $langs->trans('expenseReportRangeFromTo', $range->range_ik, ($Tab['ranges'][$k+1]->range_ik-1));
|
if (isset($Tab['ranges'][$k+1])) $label = $langs->trans('expenseReportRangeFromTo', $range->range_ik, ($Tab['ranges'][$k+1]->range_ik-1));
|
||||||
@ -137,7 +134,7 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab)
|
|||||||
|
|
||||||
if ($range->range_active == 0) $label = $form->textwithpicto($label, $langs->trans('expenseReportRangeDisabled'), 1, 'help', '', 0, 3);
|
if ($range->range_active == 0) $label = $form->textwithpicto($label, $langs->trans('expenseReportRangeDisabled'), 1, 'help', '', 0, 3);
|
||||||
|
|
||||||
echo '<tr '.$bc[$var].'>';
|
echo '<tr class="oddeven">';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
echo '<td width="20%"><b>['.$langs->trans('RangeNum', $tranche++).']</b> - '.$label.'</td>';
|
echo '<td width="20%"><b>['.$langs->trans('RangeNum', $tranche++).']</b> - '.$label.'</td>';
|
||||||
@ -175,7 +172,6 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab)
|
|||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
$var=!$var;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("withdrawals");
|
$langs->loadLangs(array("admin","withdrawals"));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (!$user->admin) accessforbidden();
|
if (!$user->admin) accessforbidden();
|
||||||
@ -417,7 +417,6 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION))
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$var = true;
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -31,8 +31,8 @@ global $conf;
|
|||||||
|
|
||||||
if (!$user->admin) accessforbidden();
|
if (!$user->admin) accessforbidden();
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("other");
|
$langs->loadLangs(array("admin","other"));
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$action = GETPOST('action','aZ09');
|
$action = GETPOST('action','aZ09');
|
||||||
@ -50,7 +50,6 @@ foreach ($dirsyslogs as $reldir) {
|
|||||||
$handle = opendir($newdir);
|
$handle = opendir($newdir);
|
||||||
|
|
||||||
if (is_resource($handle)) {
|
if (is_resource($handle)) {
|
||||||
$var = true;
|
|
||||||
|
|
||||||
while (($file = readdir($handle)) !== false) {
|
while (($file = readdir($handle)) !== false) {
|
||||||
if (substr($file, 0, 11) == 'mod_syslog_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
|
if (substr($file, 0, 11) == 'mod_syslog_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
|
||||||
|
|||||||
@ -269,7 +269,6 @@ foreach ($dirmodels as $reldir) {
|
|||||||
if (is_dir($dir)) {
|
if (is_dir($dir)) {
|
||||||
$handle = opendir($dir);
|
$handle = opendir($dir);
|
||||||
if (is_resource($handle)) {
|
if (is_resource($handle)) {
|
||||||
$var = true;
|
|
||||||
|
|
||||||
while (($file = readdir($handle)) !== false) {
|
while (($file = readdir($handle)) !== false) {
|
||||||
if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) {
|
if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) {
|
||||||
@ -290,8 +289,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($module->isEnabled()) {
|
if ($module->isEnabled()) {
|
||||||
$var = !$var;
|
print '<tr class="oddeven"><td>' . $module->name . "</td><td>\n";
|
||||||
print '<tr ' . $bc[$var] . '><td>' . $module->name . "</td><td>\n";
|
|
||||||
print $module->info();
|
print $module->info();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -595,7 +595,7 @@ class FormFile
|
|||||||
$file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);
|
$file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);
|
||||||
$res=include_once $file;
|
$res=include_once $file;
|
||||||
}
|
}
|
||||||
$class='Modele'.ucfirst($modulepart);
|
$class='ModelePDF'.ucfirst($modulepart);
|
||||||
if (class_exists($class))
|
if (class_exists($class))
|
||||||
{
|
{
|
||||||
$modellist=call_user_func($class.'::liste_modeles',$this->db);
|
$modellist=call_user_func($class.'::liste_modeles',$this->db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user