Merge remote-tracking branch 'origin/Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword' into Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword

This commit is contained in:
Frédéric FRANCE 2020-05-21 15:21:05 +02:00
commit 623783e948
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
5 changed files with 14 additions and 28 deletions

View File

@ -1201,8 +1201,7 @@ class FormMail extends Form
if ($type_template == 'body') { if ($type_template == 'body') {
// Special case to use this->withbody as content // Special case to use this->withbody as content
$defaultmessage = $this->withbody; $defaultmessage = $this->withbody;
} } elseif ($type_template == 'facture_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendInvoice"); } elseif ($type_template == 'facture_relance') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendInvoiceReminder"); } elseif ($type_template == 'propal_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendProposal"); } elseif ($type_template == 'supplier_proposal_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierProposal"); } elseif ($type_template == 'order_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendOrder"); } elseif ($type_template == 'order_supplier_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierOrder"); } elseif ($type_template == 'invoice_supplier_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierInvoice"); } elseif ($type_template == 'shipping_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendShipping"); } elseif ($type_template == 'fichinter_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendFichInter"); } elseif ($type_template == 'thirdparty') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentThirdparty"); } elseif ($type_template == 'user') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentUser"); } elseif (!empty($type_template)) { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContent".ucfirst($type_template)); }
elseif ($type_template == 'facture_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendInvoice"); } elseif ($type_template == 'facture_relance') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendInvoiceReminder"); } elseif ($type_template == 'propal_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendProposal"); } elseif ($type_template == 'supplier_proposal_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierProposal"); } elseif ($type_template == 'order_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendOrder"); } elseif ($type_template == 'order_supplier_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierOrder"); } elseif ($type_template == 'invoice_supplier_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierInvoice"); } elseif ($type_template == 'shipping_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendShipping"); } elseif ($type_template == 'fichinter_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendFichInter"); } elseif ($type_template == 'thirdparty') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentThirdparty"); } elseif ($type_template == 'user') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentUser"); } elseif (!empty($type_template)) { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContent".ucfirst($type_template)); }
$ret->label = 'default'; $ret->label = 'default';
$ret->lang = $outputlangs->defaultlang; $ret->lang = $outputlangs->defaultlang;

View File

@ -386,13 +386,11 @@ function getListActionCommType($authentication)
$objectresp = array( $objectresp = array(
'result'=>array('result_code'=>'OK', 'result_label'=>''), 'result'=>array('result_code'=>'OK', 'result_label'=>''),
'actioncommtypes'=>$resultarray); 'actioncommtypes'=>$resultarray);
} } else {
else {
$error++; $error++;
$errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext;
} }
} } else {
else {
$error++; $error++;
$errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request';
} }

View File

@ -987,8 +987,7 @@ function getListOfProductsOrServices($authentication, $filterproduct)
'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel), 'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel),
'products'=>$arrayproducts 'products'=>$arrayproducts
); );
} } else {
else {
$objectresp = array( $objectresp = array(
'result'=>array('result_code' => 'OK', 'result_label' => ''), 'result'=>array('result_code' => 'OK', 'result_label' => ''),
'products'=>$arrayproducts 'products'=>$arrayproducts

View File

@ -642,20 +642,17 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser)
$objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>'SUCCESS'), 'id'=>$socid_return); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>'SUCCESS'), 'id'=>$socid_return);
$error = 0; $error = 0;
} }
} } else {
else {
$error++; $error++;
$errors = ($thirdparty->error ? array($thirdparty->error) : $thirdparty->errors); $errors = ($thirdparty->error ? array($thirdparty->error) : $thirdparty->errors);
} }
} }
} } else {
else {
// retour creation KO // retour creation KO
$error++; $error++;
$errorcode = 'NOT_CREATE'; $errorlabel = 'Object not create'; $errorcode = 'NOT_CREATE'; $errorlabel = 'Object not create';
} }
} } else {
else {
$error++; $error++;
$errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request';
} }

View File

@ -1863,35 +1863,29 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf
header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid); header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid);
exit; exit;
} }
} } else {
else {
if ($action == 'updatesource') $action = 'editsource'; if ($action == 'updatesource') $action = 'editsource';
if ($action == 'updatecontent') $action = 'editcontent'; if ($action == 'updatecontent') $action = 'editcontent';
} }
} } else {
else {
setEventMessages('Failed to write file '.$filetpl, null, 'errors'); setEventMessages('Failed to write file '.$filetpl, null, 'errors');
header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid); header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid);
exit; exit;
} }
} } else {
else {
$db->rollback(); $db->rollback();
} }
} } else {
else {
header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid); header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid);
exit; exit;
} }
} } else {
else {
if (!$error) if (!$error)
{ {
if (empty($websitekey) || $websitekey == '-1') if (empty($websitekey) || $websitekey == '-1')
{ {
setEventMessages($langs->trans("NoWebSiteCreateOneFirst"), null, 'warnings'); setEventMessages($langs->trans("NoWebSiteCreateOneFirst"), null, 'warnings');
} } else {
else {
setEventMessages($langs->trans("NoPageYet"), null, 'warnings'); setEventMessages($langs->trans("NoPageYet"), null, 'warnings');
setEventMessages($langs->trans("YouCanCreatePageOrImportTemplate"), null, 'warnings'); setEventMessages($langs->trans("YouCanCreatePageOrImportTemplate"), null, 'warnings');
} }
@ -1929,8 +1923,7 @@ if ($action == 'regeneratesite')
{ {
setEventMessages($langs->trans("PagesRegenerated"), null, 'mesgs'); setEventMessages($langs->trans("PagesRegenerated"), null, 'mesgs');
$action = 'preview'; $action = 'preview';
} } else {
else {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
$action = 'preview'; $action = 'preview';
} }