Fix: Checkstyle

This commit is contained in:
Laurent Destailleur 2012-05-09 02:39:30 +02:00
parent 6ed75123d8
commit a3216ee0c6
4 changed files with 16 additions and 20 deletions

View File

@ -1,6 +1,6 @@
<?php
/* 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>
*
* This program is free software; you can redistribute it and/or modify
@ -25,16 +25,16 @@
require("../main.inc.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("mails");
if (!$user->admin)
accessforbidden();
if (!$user->admin) accessforbidden();
$action = GETPOST('action','alpha');
/*
* Actions
@ -63,15 +63,11 @@ if ($action == 'setvalue' && $user->admin)
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",0,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
}
//Create temporary encryption key if nedded
if (($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1) && (empty($checkread_key)))
{
$chars = "abcdef(ghijklmnopqrstuvwxyz;!ABCDEFGH,IJKLMNOPQRSTUVWXYZ01_23456789";
mt_srand(10000000*(double)microtime());
for ($i = 0, $str = '', $lc = strlen($chars)-1; $i < 30; $i++) {
$checkread_key .= $chars[mt_rand(0, $lc)];
}
$checkread_key=getRandomPassword(true);
}
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;

View File

@ -223,7 +223,7 @@ if (($action == 'send' || $action == 'sendhtml') && ! $_POST['addfile'] && ! $_P
$deliveryreceipt,
$msgishtml,
$errors_to
);
);
$result=$mailfile->sendfile();

View File

@ -682,7 +682,7 @@ class Commande extends CommonObject
$this->lines[$i]->remise_percent,
$this->lines[$i]->info_bits,
$this->lines[$i]->fk_remise_except,
'HT',
'HT',
0,
$this->lines[$i]->date_start,
$this->lines[$i]->date_end,
@ -2122,11 +2122,11 @@ class Commande extends CommonObject
* @param int $skip_update_total Skip update of total
* @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;
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');
if ($this->brouillon)
@ -2224,13 +2224,13 @@ class Commande extends CommonObject
{
$this->error=$this->db->error();
$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;
}
}
else
{
$this->error="CustomerOrder::Updateline Order status makes operation forbidden";
$this->error=get_class($this)."::updateline Order status makes operation forbidden";
return -2;
}
}
@ -2268,7 +2268,7 @@ class Commande extends CommonObject
{
// Delete order details
$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) )
{
dol_syslog(get_class($this)."::delete error", LOG_ERR);

View File

@ -68,7 +68,7 @@ if ($action == 'setvalue' && $user->admin)
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYPAL_MESSAGE_KO",GETPOST('PAYPAL_MESSAGE_KO','alpha'),'chaine',0,'',$conf->entity);
if (! $result > 0) $error++;
if (! $error)
{
$db->commit();
@ -368,7 +368,7 @@ if ($conf->adherent->enabled)
print "<br>";
print info_admin($langs->trans("YouCanAddTagOnUrl"));
$db->close();
llxFooter();
$db->close();
?>