Fixing style errors.

This commit is contained in:
stickler-ci 2020-05-21 13:11:06 +00:00
parent d9f42f85d1
commit 459154edc0
5 changed files with 14 additions and 28 deletions

View File

@ -1201,8 +1201,7 @@ class FormMail extends Form
if ($type_template == 'body') {
// Special case to use this->withbody as content
$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->lang = $outputlangs->defaultlang;

View File

@ -386,13 +386,11 @@ function getListActionCommType($authentication)
$objectresp = array(
'result'=>array('result_code'=>'OK', 'result_label'=>''),
'actioncommtypes'=>$resultarray);
}
else {
} else {
$error++;
$errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext;
}
}
else {
} else {
$error++;
$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),
'products'=>$arrayproducts
);
}
else {
} else {
$objectresp = array(
'result'=>array('result_code' => 'OK', 'result_label' => ''),
'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);
$error = 0;
}
}
else {
} else {
$error++;
$errors = ($thirdparty->error ? array($thirdparty->error) : $thirdparty->errors);
}
}
}
else {
} else {
// retour creation KO
$error++;
$errorcode = 'NOT_CREATE'; $errorlabel = 'Object not create';
}
}
else {
} else {
$error++;
$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);
exit;
}
}
else {
} else {
if ($action == 'updatesource') $action = 'editsource';
if ($action == 'updatecontent') $action = 'editcontent';
}
}
else {
} else {
setEventMessages('Failed to write file '.$filetpl, null, 'errors');
header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid);
exit;
}
}
else {
} else {
$db->rollback();
}
}
else {
} else {
header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid);
exit;
}
}
else {
} else {
if (!$error)
{
if (empty($websitekey) || $websitekey == '-1')
{
setEventMessages($langs->trans("NoWebSiteCreateOneFirst"), null, 'warnings');
}
else {
} else {
setEventMessages($langs->trans("NoPageYet"), null, 'warnings');
setEventMessages($langs->trans("YouCanCreatePageOrImportTemplate"), null, 'warnings');
}
@ -1929,8 +1923,7 @@ if ($action == 'regeneratesite')
{
setEventMessages($langs->trans("PagesRegenerated"), null, 'mesgs');
$action = 'preview';
}
else {
} else {
setEventMessages($object->error, $object->errors, 'errors');
$action = 'preview';
}