Fix: Solve phpcodesniffer errors and warning

This commit is contained in:
Laurent Destailleur 2011-09-14 21:50:17 +00:00
parent c4358dc7c9
commit c8a10010ae
2 changed files with 33 additions and 32 deletions

View File

@ -208,11 +208,9 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'sendhtml')
$body=make_substitutions($body,$substitutionarrayfortest);
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
$mailfile = new CMailFile(
$subject, $sendto, $email_from, $body,
$mailfile = new CMailFile($subject, $sendto, $email_from, $body,
$filepath, $mimetype, $filename,
$sendtocc, $sendtoccc, $deliveryreceipt, $msgishtml, $errors_to
);
$sendtocc, $sendtoccc, $deliveryreceipt, $msgishtml, $errors_to);
$result=$mailfile->sendfile();

View File

@ -134,8 +134,11 @@ if ($action== 'del')
$type='company';
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
$sql.= " WHERE nom='".$db->escape($value)."' AND type='".$type."' AND entity=".$conf->entity;
$resql=$db->query($sql);
if (! $resql) dol_print_error($db);
if ($db->query($sql))
{
}
else dol_print_error($db);
}
// Define default generator