Fix: Solve phpcodesniffer errors and warning
This commit is contained in:
parent
3a7285ae12
commit
3cdc7abf40
@ -40,21 +40,21 @@ class AccountancyAccount
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur de la classe
|
* Constructor
|
||||||
* \param DB handler acces base de donnees
|
*
|
||||||
* \param id id compte (0 par defaut)
|
* @param $DoliDB $DB Database handler
|
||||||
*/
|
*/
|
||||||
function AccountancyAccount($DB, $id=0)
|
function AccountancyAccount($DB)
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
$this->id = $id ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Ins<EFBFBD>re le compte en base
|
* Insert account into database
|
||||||
* \param user Utilisateur qui effectue l'insertion
|
*
|
||||||
* \return int <0 si ko, Id ligne ajout<EFBFBD>e si ok
|
* @param User $user User making add
|
||||||
|
* @return int <0 if KO, Id line added if OK
|
||||||
*/
|
*/
|
||||||
function create($user)
|
function create($user)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -108,9 +108,7 @@ if ($action == 'set')
|
|||||||
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||||
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
if ($db->query($sql))
|
$resql=$db->query($sql);
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'del')
|
if ($action == 'del')
|
||||||
|
|||||||
@ -208,9 +208,11 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'sendhtml')
|
|||||||
$body=make_substitutions($body,$substitutionarrayfortest);
|
$body=make_substitutions($body,$substitutionarrayfortest);
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||||
$mailfile = new CMailFile($subject, $sendto, $email_from, $body,
|
$mailfile = new CMailFile(
|
||||||
$filepath, $mimetype, $filename,
|
$subject, $sendto, $email_from, $body,
|
||||||
$sendtocc, $sendtoccc, $deliveryreceipt, $msgishtml, $errors_to);
|
$filepath, $mimetype, $filename,
|
||||||
|
$sendtocc, $sendtoccc, $deliveryreceipt, $msgishtml, $errors_to
|
||||||
|
);
|
||||||
|
|
||||||
$result=$mailfile->sendfile();
|
$result=$mailfile->sendfile();
|
||||||
|
|
||||||
@ -270,10 +272,10 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
{
|
{
|
||||||
$html=new Form($db);
|
$html=new Form($db);
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
print "\n".'<script type="text/javascript" language="javascript">';
|
print "\n".'<script type="text/javascript" language="javascript">';
|
||||||
print 'jQuery(document).ready(function () {
|
print 'jQuery(document).ready(function () {
|
||||||
function initfields()
|
function initfields()
|
||||||
{
|
{
|
||||||
if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'mail\')
|
if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'mail\')
|
||||||
@ -282,12 +284,12 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
jQuery("#MAIN_MAIL_EMAIL_TLS").val(0);
|
jQuery("#MAIN_MAIL_EMAIL_TLS").val(0);
|
||||||
jQuery("#MAIN_MAIL_EMAIL_TLS").attr(\'disabled\', \'disabled\');
|
jQuery("#MAIN_MAIL_EMAIL_TLS").attr(\'disabled\', \'disabled\');
|
||||||
';
|
';
|
||||||
if ($linuxlike)
|
if ($linuxlike)
|
||||||
{
|
{
|
||||||
print ' jQuery("#MAIN_MAIL_SMTP_SERVER").attr(\'disabled\', \'disabled\');';
|
print ' jQuery("#MAIN_MAIL_SMTP_SERVER").attr(\'disabled\', \'disabled\');';
|
||||||
print ' jQuery("#MAIN_MAIL_SMTP_PORT").attr(\'disabled\', \'disabled\');';
|
print ' jQuery("#MAIN_MAIL_SMTP_PORT").attr(\'disabled\', \'disabled\');';
|
||||||
}
|
}
|
||||||
print '
|
print '
|
||||||
}
|
}
|
||||||
if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'smtps\')
|
if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'smtps\')
|
||||||
{
|
{
|
||||||
@ -303,8 +305,8 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
initfields();
|
initfields();
|
||||||
});
|
});
|
||||||
})';
|
})';
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -357,8 +359,8 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$smtpserver = ini_get('SMTP')?ini_get('SMTP'):$langs->transnoentities("Undefined");
|
$smtpserver = ini_get('SMTP')?ini_get('SMTP'):$langs->transnoentities("Undefined");
|
||||||
if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
|
if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
|
||||||
else print $langs->trans("MAIN_MAIL_SMTP_SERVER",$smtpserver);
|
else print $langs->trans("MAIN_MAIL_SMTP_SERVER",$smtpserver);
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
// SuperAdministrator access only
|
// SuperAdministrator access only
|
||||||
if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity))
|
if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity))
|
||||||
@ -590,15 +592,15 @@ else
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
if ($linuxlike && $conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
if ($linuxlike && $conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
||||||
{
|
{
|
||||||
$sendmailoption=ini_get('mail.force_extra_parameters');
|
$sendmailoption=ini_get('mail.force_extra_parameters');
|
||||||
//print 'x'.$sendmailoption;
|
//print 'x'.$sendmailoption;
|
||||||
if (empty($sendmailoption) || ! preg_match('/ba/',$sendmailoption))
|
if (empty($sendmailoption) || ! preg_match('/ba/',$sendmailoption))
|
||||||
{
|
{
|
||||||
print '<br>'.info_admin($langs->trans("SendmailOptionNotComplete"));
|
print '<br>'.info_admin($langs->trans("SendmailOptionNotComplete"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Boutons actions
|
// Boutons actions
|
||||||
@ -711,8 +713,8 @@ else
|
|||||||
$formmail->withfrom=1;
|
$formmail->withfrom=1;
|
||||||
$formmail->witherrorsto=1;
|
$formmail->witherrorsto=1;
|
||||||
$formmail->withto=(! empty($_POST['sendto'])?$_POST['sendto']:($user->email?$user->email:1));
|
$formmail->withto=(! empty($_POST['sendto'])?$_POST['sendto']:($user->email?$user->email:1));
|
||||||
$formmail->withtocc=(! empty($_POST['sendtocc'])?$_POST['sendtocc']:1); // ! empty to keep field if empty
|
$formmail->withtocc=(! empty($_POST['sendtocc'])?$_POST['sendtocc']:1); // ! empty to keep field if empty
|
||||||
$formmail->withtoccc=(! empty($_POST['sendtoccc'])?$_POST['sendtoccc']:1); // ! empty to keep field if empty
|
$formmail->withtoccc=(! empty($_POST['sendtoccc'])?$_POST['sendtoccc']:1); // ! empty to keep field if empty
|
||||||
$formmail->withtopic=(isset($_POST['subject'])?$_POST['subject']:$langs->trans("Test"));
|
$formmail->withtopic=(isset($_POST['subject'])?$_POST['subject']:$langs->trans("Test"));
|
||||||
$formmail->withtopicreadonly=0;
|
$formmail->withtopicreadonly=0;
|
||||||
$formmail->withfile=2;
|
$formmail->withfile=2;
|
||||||
|
|||||||
@ -310,22 +310,16 @@ if ($mode != 4)
|
|||||||
if ($objMod->special == $mode)
|
if ($objMod->special == $mode)
|
||||||
{
|
{
|
||||||
$atleastoneforfamily++;
|
$atleastoneforfamily++;
|
||||||
$var=!$var;
|
|
||||||
|
|
||||||
print '<tr height="18" '.$bc[$var].">\n";
|
|
||||||
|
|
||||||
//print ' <td valign="top" nowrap="nowrap">';
|
|
||||||
if ($family!=$oldfamily)
|
if ($family!=$oldfamily)
|
||||||
{
|
{
|
||||||
$familytext=empty($familylib[$family])?$family:$familylib[$family];
|
$familytext=empty($familylib[$family])?$family:$familylib[$family];
|
||||||
//print $familytext;
|
//print $familytext;
|
||||||
$oldfamily=$family;
|
$oldfamily=$family;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
$var=!$var;
|
||||||
//print ' ';
|
print '<tr height="18" '.$bc[$var].">\n";
|
||||||
}
|
|
||||||
//print "</td>\n";
|
|
||||||
|
|
||||||
// Picto
|
// Picto
|
||||||
print ' <td valign="top" width="14" align="center">';
|
print ' <td valign="top" width="14" align="center">';
|
||||||
|
|||||||
@ -53,14 +53,13 @@ $offset = $limit * $page ;
|
|||||||
print_barre_liste("Liste des langues oscommerce", $page, "osc-languages.php");
|
print_barre_liste("Liste des langues oscommerce", $page, "osc-languages.php");
|
||||||
|
|
||||||
$sql = "SELECT l.languages_id, l.name, l.code FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."languages as l";
|
$sql = "SELECT l.languages_id, l.name, l.code FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."languages as l";
|
||||||
|
$sql.= $db->plimit($limit, $offset);
|
||||||
$sql .= $db->plimit( $limit ,$offset);
|
|
||||||
|
|
||||||
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||||
print "<TR class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print "<td>id</td>";
|
print "<td>id</td>";
|
||||||
print "<td>Name</td>";
|
print "<td>Name</td>";
|
||||||
print "<TD>Code</TD>";
|
print "<td>Code</td>";
|
||||||
print "</TR>\n";
|
print "</TR>\n";
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
|
|||||||
@ -162,9 +162,9 @@ if ($result)
|
|||||||
|
|
||||||
// Check if permission is inside module definition
|
// Check if permission is inside module definition
|
||||||
// TODO If not, we remove it
|
// TODO If not, we remove it
|
||||||
foreach($objMod->rights as $key => $val)
|
/*foreach($objMod->rights as $key => $val)
|
||||||
{
|
{
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// Break found, it's a new module to catch
|
// Break found, it's a new module to catch
|
||||||
if ($old <> $obj->module)
|
if ($old <> $obj->module)
|
||||||
|
|||||||
@ -107,10 +107,7 @@ if ($action == 'set')
|
|||||||
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||||
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
if ($db->query($sql))
|
$resql=$db->query($sql);
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'del')
|
if ($action == 'del')
|
||||||
|
|||||||
@ -184,10 +184,7 @@ if ($action == 'set')
|
|||||||
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||||
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
if ($db->query($sql))
|
$resql=$db->query($sql);
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ($action == 'del')
|
if ($action == 'del')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -161,7 +161,7 @@ if ($action == 'edit')
|
|||||||
{
|
{
|
||||||
$html=new Form($db);
|
$html=new Form($db);
|
||||||
|
|
||||||
if (! sizeof($listofmethods)) print '<div class="error">'.$langs->trans("NoSmsEngine").'</div>';
|
if (! count($listofmethods)) print '<div class="error">'.$langs->trans("NoSmsEngine").'</div>';
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -205,7 +205,7 @@ if ($action == 'edit')
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br><center>';
|
print '<br><center>';
|
||||||
print '<input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"'.(!sizeof($listofmethods)?' disabled="disbaled"':'').'>';
|
print '<input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"'.(!count($listofmethods)?' disabled="disbaled"':'').'>';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</center>';
|
print '</center>';
|
||||||
|
|||||||
@ -134,11 +134,8 @@ if ($action== 'del')
|
|||||||
$type='company';
|
$type='company';
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
$sql.= " WHERE nom='".$db->escape($value)."' AND type='".$type."' AND entity=".$conf->entity;
|
$sql.= " WHERE nom='".$db->escape($value)."' AND type='".$type."' AND entity=".$conf->entity;
|
||||||
if ($db->query($sql))
|
$resql=$db->query($sql);
|
||||||
{
|
if (! $resql) dol_print_error($db);
|
||||||
|
|
||||||
}
|
|
||||||
else dol_print_error($db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define default generator
|
// Define default generator
|
||||||
|
|||||||
@ -138,7 +138,7 @@ if ($action == 'update')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Suppression attribut
|
// Suppression attribut
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
if(isset($_GET["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_GET["attrname"]))
|
if(isset($_GET["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_GET["attrname"]))
|
||||||
|
|||||||
@ -61,7 +61,6 @@ else if ($conf->db->type == 'pgsql')
|
|||||||
}
|
}
|
||||||
else if ($conf->db->type == 'mssql')
|
else if ($conf->db->type == 'mssql')
|
||||||
{
|
{
|
||||||
//TODO: recuperer les infos du serveur
|
|
||||||
//$sqls[0] = "";
|
//$sqls[0] = "";
|
||||||
//$base=3;
|
//$base=3;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,7 +111,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
|
|||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="300">'.$key.'</td>';
|
print '<tr '.$bc[$var].'><td width="300">'.$key.'</td>';
|
||||||
print '<td>'.sizeof($val).'</td>';
|
print '<td>'.count($val).'</td>';
|
||||||
print '<td align="right">'.dol_getshmopaddress($key).'</td>';
|
print '<td align="right">'.dol_getshmopaddress($key).'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
@ -180,13 +180,12 @@ $var=!$var;
|
|||||||
print '<tr '.$bc[$var].'><td width="300">=> dol_get_first_day(1970,1,false)</td><td>'.dol_get_first_day(1970,1,false).' (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,false),'dayhour').')</td>';
|
print '<tr '.$bc[$var].'><td width="300">=> dol_get_first_day(1970,1,false)</td><td>'.dol_get_first_day(1970,1,false).' (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,false),'dayhour').')</td>';
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="300">=> dol_get_first_day(1970,1,true)</td><td>'.dol_get_first_day(1970,1,true).' (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,true),'dayhour').')</td>';
|
print '<tr '.$bc[$var].'><td width="300">=> dol_get_first_day(1970,1,true)</td><td>'.dol_get_first_day(1970,1,true).' (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,true),'dayhour').')</td>';
|
||||||
# Parent company
|
// Parent company
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CompanyTZ").'</td><td>'.$langs->trans("FeatureNotYetAvailable").'</td></tr>'."\n";
|
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CompanyTZ").'</td><td>'.$langs->trans("FeatureNotYetAvailable").'</td></tr>'."\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
#print "<tr ".$bc[$var]."><td width=\"300\">=> ".$langs->trans("CompanyHour")."</td><td>".dol_print_date(dol_now('tzuser'),'dayhour')."</td></tr>\n";
|
|
||||||
print '<tr '.$bc[$var].'><td width="300">=> '.$langs->trans("CompanyHour").'</td><td>'.$langs->trans("FeatureNotYetAvailable").'</td></tr>'."\n";
|
print '<tr '.$bc[$var].'><td width="300">=> '.$langs->trans("CompanyHour").'</td><td>'.$langs->trans("FeatureNotYetAvailable").'</td></tr>'."\n";
|
||||||
# Client
|
// Client
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("ClientTZ").'</td><td>'.($_SESSION['dol_tz']!=''?($_SESSION['dol_tz']>=0?'+':'').$_SESSION['dol_tz']:'').' ('.($_SESSION['dol_tz']>=0?'+':'').($_SESSION['dol_tz']*60*60).')</td></tr>'."\n";
|
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("ClientTZ").'</td><td>'.($_SESSION['dol_tz']!=''?($_SESSION['dol_tz']>=0?'+':'').$_SESSION['dol_tz']:'').' ('.($_SESSION['dol_tz']>=0?'+':'').($_SESSION['dol_tz']*60*60).')</td></tr>'."\n";
|
||||||
//$var=!$var;
|
//$var=!$var;
|
||||||
@ -195,7 +194,6 @@ $var=!$var;
|
|||||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("DaylingSavingTime").'</td><td>'.($_SESSION['dol_dst']>=0?yn(1):yn(0)).' ('.($_SESSION['dol_dst']>=0?'+':'').($_SESSION['dol_dst']*60*60).')</td></tr>'."\n";
|
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("DaylingSavingTime").'</td><td>'.($_SESSION['dol_dst']>=0?yn(1):yn(0)).' ('.($_SESSION['dol_dst']>=0?'+':'').($_SESSION['dol_dst']*60*60).')</td></tr>'."\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="300">=> '.$langs->trans("ClientHour").'</td><td>'.dol_print_date(dol_now(),'dayhour','tzuser').'</td></tr>'."\n";
|
print '<tr '.$bc[$var].'><td width="300">=> '.$langs->trans("ClientHour").'</td><td>'.dol_print_date(dol_now(),'dayhour','tzuser').'</td></tr>'."\n";
|
||||||
#print "<tr ".$bc[$var]."><td width=\"300\">=> ".$langs->trans("ClientHour")."</td><td>".$langs->trans("FeatureNotYetAvailable")."</td></tr>\n";
|
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$filesystemencoding=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0
|
$filesystemencoding=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0
|
||||||
|
|||||||
@ -83,7 +83,13 @@ function compare($x, $y)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare revisions
|
||||||
|
*
|
||||||
|
* @param array $x Parts of version 1
|
||||||
|
* @param array $y Parts of version 2
|
||||||
|
* @return int 1 if 1<2, 0 if 1=2, -1 if 1>2
|
||||||
|
*/
|
||||||
function revcompare($x, $y)
|
function revcompare($x, $y)
|
||||||
{
|
{
|
||||||
global $sortby, $langs;
|
global $sortby, $langs;
|
||||||
@ -96,7 +102,12 @@ function revcompare($x, $y)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output table
|
||||||
|
*
|
||||||
|
* @param array $list Array of records
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function create_script_table($list)
|
function create_script_table($list)
|
||||||
{
|
{
|
||||||
global $sortby,$bc,$langs;
|
global $sortby,$bc,$langs;
|
||||||
@ -127,15 +138,15 @@ function create_script_table($list)
|
|||||||
<table class="noborder">
|
<table class="noborder">
|
||||||
<tr>
|
<tr>
|
||||||
<th><a
|
<th><a
|
||||||
href="<?php print $_SERVER['PHP_SELF']?>?sort=file&order=<?php print ($order == "asc" ? "desc" : "asc")?>"><?php print $langs->trans("Filename"); ?></a> <? if($sortby == "file") print ($order == "asc" ? "↓" : "↑")?></th>
|
href="<?php print $_SERVER['PHP_SELF']?>?sort=file&order=<?php print ($order == "asc" ? "desc" : "asc")?>"><?php print $langs->trans("Filename"); ?></a> <?php if($sortby == "file") print ($order == "asc" ? "↓" : "↑") ?></th>
|
||||||
<th><a
|
<th><a
|
||||||
href="<?php print $_SERVER['PHP_SELF']?>?sort=mtime&order=<?php print ($order == "asc" ? "desc" : "asc")?>"><?php print $langs->trans("Date"); ?></a> <? if($sortby == "mtime") print ($order == "asc" ? "↓" : "↑")?></th>
|
href="<?php print $_SERVER['PHP_SELF']?>?sort=mtime&order=<?php print ($order == "asc" ? "desc" : "asc")?>"><?php print $langs->trans("Date"); ?></a> <?php if($sortby == "mtime") print ($order == "asc" ? "↓" : "↑") ?></th>
|
||||||
<th><a
|
<th><a
|
||||||
href="<?php print $_SERVER['PHP_SELF']?>?sort=size&order=<?php print ($order == "asc" ? "desc" : "asc")?>"><?php print $langs->trans("Size"); ?></a> <? if($sortby == "size") print ($order == "asc" ? "↓" : "↑")?></th>
|
href="<?php print $_SERVER['PHP_SELF']?>?sort=size&order=<?php print ($order == "asc" ? "desc" : "asc")?>"><?php print $langs->trans("Size"); ?></a> <?php if($sortby == "size") print ($order == "asc" ? "↓" : "↑") ?></th>
|
||||||
<th><a
|
<th><a
|
||||||
href="<?php print $_SERVER['PHP_SELF']?>?sort=reloads&order=<?php print ($order == "asc" ? "desc" : "asc")?>"><?php print $langs->trans("Reloads"); ?></a> <? if($sortby == "reloads") print ($order == "asc" ? "↓" : "↑")?></th>
|
href="<?php print $_SERVER['PHP_SELF']?>?sort=reloads&order=<?php print ($order == "asc" ? "desc" : "asc")?>"><?php print $langs->trans("Reloads"); ?></a> <?php if($sortby == "reloads") print ($order == "asc" ? "↓" : "↑") ?></th>
|
||||||
<th><a
|
<th><a
|
||||||
href="<?php print $_SERVER['PHP_SELF']?>?sort=hits&order=<?php print ($order == "asc" ? "desc" : "asc")?>"><?php print $langs->trans("Hits"); ?></a> <? if($sortby == "hits") print ($order == "asc" ? "↓" : "↑")?></th>
|
href="<?php print $_SERVER['PHP_SELF']?>?sort=hits&order=<?php print ($order == "asc" ? "desc" : "asc")?>"><?php print $langs->trans("Hits"); ?></a> <?php if($sortby == "hits") print ($order == "asc" ? "↓" : "↑") ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
switch ($sortby) {
|
switch ($sortby) {
|
||||||
@ -166,8 +177,12 @@ function create_script_table($list)
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output table
|
||||||
|
*
|
||||||
|
* @param array $list Array of records
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function create_key_table($list)
|
function create_key_table($list)
|
||||||
{
|
{
|
||||||
global $bc,$langs;
|
global $bc,$langs;
|
||||||
|
|||||||
@ -257,11 +257,11 @@ if ($what == 'postgresql')
|
|||||||
//if ($compression == 'bz')
|
//if ($compression == 'bz')
|
||||||
$paramcrypted=$param;
|
$paramcrypted=$param;
|
||||||
$paramclear=$param;
|
$paramclear=$param;
|
||||||
if (! empty($dolibarr_main_db_pass))
|
/*if (! empty($dolibarr_main_db_pass))
|
||||||
{
|
{
|
||||||
//$paramcrypted.=" -W".preg_replace('/./i','*',$dolibarr_main_db_pass);
|
$paramcrypted.=" -W".preg_replace('/./i','*',$dolibarr_main_db_pass);
|
||||||
//$paramclear.=" -W".$dolibarr_main_db_pass;
|
$paramclear.=" -W".$dolibarr_main_db_pass;
|
||||||
}
|
}*/
|
||||||
$paramcrypted.=" -w ".$dolibarr_main_db_name;
|
$paramcrypted.=" -w ".$dolibarr_main_db_name;
|
||||||
$paramclear.=" -w ".$dolibarr_main_db_name;
|
$paramclear.=" -w ".$dolibarr_main_db_name;
|
||||||
|
|
||||||
|
|||||||
@ -167,7 +167,7 @@ if ($savehandler == 'files')
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($listofsessions) == 0)
|
if (count($listofsessions) == 0)
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="6">'.$langs->trans("NoSessionFound",$savepath,$openbasedir).'</td></tr>';
|
print '<tr><td colspan="6">'.$langs->trans("NoSessionFound",$savepath,$openbasedir).'</td></tr>';
|
||||||
}
|
}
|
||||||
@ -197,7 +197,7 @@ else
|
|||||||
|
|
||||||
if ($savehandler == 'files')
|
if ($savehandler == 'files')
|
||||||
{
|
{
|
||||||
if (sizeof($listofsessions))
|
if (count($listofsessions))
|
||||||
{
|
{
|
||||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=purge">'.$langs->trans("PurgeSessions").'</a>';
|
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=purge">'.$langs->trans("PurgeSessions").'</a>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,7 @@ if ($_REQUEST["action"]=='purge' && ! preg_match('/^confirm/i',$_REQUEST["choice
|
|||||||
}
|
}
|
||||||
|
|
||||||
$count=0;
|
$count=0;
|
||||||
if (sizeof($filesarray))
|
if (count($filesarray))
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach($filesarray as $key => $value)
|
foreach($filesarray as $key => $value)
|
||||||
|
|||||||
@ -111,7 +111,7 @@ print $langs->trans("UnpackPackageInDolibarrRoot",$dolibarrroot).'<br>';
|
|||||||
print '<b>'.$langs->trans("StepNb",3).'</b>: ';
|
print '<b>'.$langs->trans("StepNb",3).'</b>: ';
|
||||||
print $langs->trans("RemoveLock",$dolibarrroot.'install.lock').'<br>';
|
print $langs->trans("RemoveLock",$dolibarrroot.'install.lock').'<br>';
|
||||||
print '<b>'.$langs->trans("StepNb",4).'</b>: ';
|
print '<b>'.$langs->trans("StepNb",4).'</b>: ';
|
||||||
$fullurl='<a href="'.DOL_URL_ROOT.'/install/'.'" target="_blank">'.DOL_URL_ROOT.'/install/'.'</a>';
|
$fullurl='<a href="'.DOL_URL_ROOT.'/install/" target="_blank">'.DOL_URL_ROOT.'/install/</a>';
|
||||||
print $langs->trans("CallUpdatePage",$fullurl).'<br>';
|
print $langs->trans("CallUpdatePage",$fullurl).'<br>';
|
||||||
print '<b>'.$langs->trans("StepNb",5).'</b>: ';
|
print '<b>'.$langs->trans("StepNb",5).'</b>: ';
|
||||||
print $langs->trans("RestoreLock",$dolibarrroot.'install.lock').'<br>';
|
print $langs->trans("RestoreLock",$dolibarrroot.'install.lock').'<br>';
|
||||||
|
|||||||
@ -97,7 +97,7 @@ if ($conf->propal->enabled && $conf->commande->enabled) $workflowcodes['WORKFLOW
|
|||||||
//if ($conf->contrat->enabled && $conf->facture->enabled) $workflowcodes['WORKFLOW_CONTRACT_AUTOCREATE_INVOICE']='WORKFLOW_CONTRACT_AUTOCREATE_INVOICE';
|
//if ($conf->contrat->enabled && $conf->facture->enabled) $workflowcodes['WORKFLOW_CONTRACT_AUTOCREATE_INVOICE']='WORKFLOW_CONTRACT_AUTOCREATE_INVOICE';
|
||||||
if ($conf->commande->enabled && $conf->facture->enabled) $workflowcodes['WORKFLOW_ORDER_AUTOCREATE_INVOICE']='WORKFLOW_ORDER_AUTOCREATE_INVOICE';
|
if ($conf->commande->enabled && $conf->facture->enabled) $workflowcodes['WORKFLOW_ORDER_AUTOCREATE_INVOICE']='WORKFLOW_ORDER_AUTOCREATE_INVOICE';
|
||||||
|
|
||||||
if (sizeof($workflowcodes) > 0)
|
if (count($workflowcodes) > 0)
|
||||||
{
|
{
|
||||||
foreach($workflowcodes as $code)
|
foreach($workflowcodes as $code)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user