Fix: Checkstyle
This commit is contained in:
parent
6ed75123d8
commit
a3216ee0c6
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.org>
|
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -25,12 +25,12 @@
|
|||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
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."/core/lib/security2.lib.php");
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin) accessforbidden();
|
||||||
accessforbidden();
|
|
||||||
|
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
|
|
||||||
@ -67,11 +67,7 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
//Create temporary encryption key if nedded
|
//Create temporary encryption key if nedded
|
||||||
if (($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1) && (empty($checkread_key)))
|
if (($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1) && (empty($checkread_key)))
|
||||||
{
|
{
|
||||||
$chars = "abcdef(ghijklmnopqrstuvwxyz;!ABCDEFGH,IJKLMNOPQRSTUVWXYZ01_23456789";
|
$checkread_key=getRandomPassword(true);
|
||||||
mt_srand(10000000*(double)microtime());
|
|
||||||
for ($i = 0, $str = '', $lc = strlen($chars)-1; $i < 30; $i++) {
|
|
||||||
$checkread_key .= $chars[mt_rand(0, $lc)];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
|||||||
@ -223,7 +223,7 @@ if (($action == 'send' || $action == 'sendhtml') && ! $_POST['addfile'] && ! $_P
|
|||||||
$deliveryreceipt,
|
$deliveryreceipt,
|
||||||
$msgishtml,
|
$msgishtml,
|
||||||
$errors_to
|
$errors_to
|
||||||
);
|
);
|
||||||
|
|
||||||
$result=$mailfile->sendfile();
|
$result=$mailfile->sendfile();
|
||||||
|
|
||||||
|
|||||||
@ -682,7 +682,7 @@ class Commande extends CommonObject
|
|||||||
$this->lines[$i]->remise_percent,
|
$this->lines[$i]->remise_percent,
|
||||||
$this->lines[$i]->info_bits,
|
$this->lines[$i]->info_bits,
|
||||||
$this->lines[$i]->fk_remise_except,
|
$this->lines[$i]->fk_remise_except,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
$this->lines[$i]->date_start,
|
$this->lines[$i]->date_start,
|
||||||
$this->lines[$i]->date_end,
|
$this->lines[$i]->date_end,
|
||||||
@ -2122,11 +2122,11 @@ class Commande extends CommonObject
|
|||||||
* @param int $skip_update_total Skip update of total
|
* @param int $skip_update_total Skip update of total
|
||||||
* @return int < 0 if KO, > 0 if OK
|
* @return int < 0 if KO, > 0 if OK
|
||||||
*/
|
*/
|
||||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent=0, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0)
|
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
dol_syslog("CustomerOrder::UpdateLine $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, $price_base_type, $info_bits, $date_start, $date_end, $type");
|
dol_syslog(get_class($this)."::updateline $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, $price_base_type, $info_bits, $date_start, $date_end, $type");
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php');
|
||||||
|
|
||||||
if ($this->brouillon)
|
if ($this->brouillon)
|
||||||
@ -2224,13 +2224,13 @@ class Commande extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
dol_syslog("CustomerOrder::UpdateLine Error=".$this->error, LOG_ERR);
|
dol_syslog(get_class($this)."::updateline Error=".$this->error, LOG_ERR);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error="CustomerOrder::Updateline Order status makes operation forbidden";
|
$this->error=get_class($this)."::updateline Order status makes operation forbidden";
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2268,7 +2268,7 @@ class Commande extends CommonObject
|
|||||||
{
|
{
|
||||||
// Delete order details
|
// Delete order details
|
||||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE fk_commande = ".$this->id;
|
$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE fk_commande = ".$this->id;
|
||||||
dol_syslog("Commande::delete sql=".$sql);
|
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||||
if (! $this->db->query($sql) )
|
if (! $this->db->query($sql) )
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::delete error", LOG_ERR);
|
dol_syslog(get_class($this)."::delete error", LOG_ERR);
|
||||||
|
|||||||
@ -368,7 +368,7 @@ if ($conf->adherent->enabled)
|
|||||||
print "<br>";
|
print "<br>";
|
||||||
print info_admin($langs->trans("YouCanAddTagOnUrl"));
|
print info_admin($langs->trans("YouCanAddTagOnUrl"));
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user