Fix scrutinizer bugs
This commit is contained in:
parent
f257d4372a
commit
19f0db23df
@ -265,7 +265,7 @@ if ($action == 'update') {
|
|||||||
|
|
||||||
$_SESSION["mainmenu"] = ""; // The menu manager may have changed
|
$_SESSION["mainmenu"] = ""; // The menu manager may have changed
|
||||||
|
|
||||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup".'&mode='.$mode.(GETPOSTISSET('page_y', 'int') ? '&page_y='.GETPOST('page_y', 'int') : ''));
|
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup".'&mode='.$mode.(GETPOSTISSET('page_y') ? '&page_y='.GETPOST('page_y', 'int') : ''));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -100,7 +100,7 @@ class RejetPrelevement
|
|||||||
$facs = $this->getListInvoices(1);
|
$facs = $this->getListInvoices(1);
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
$lipre = new LignePrelevement($this->db, $user);
|
$lipre = new LignePrelevement($this->db);
|
||||||
$lipre->fetch($id);
|
$lipre->fetch($id);
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|||||||
@ -46,13 +46,12 @@ class Validate
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param Translate $outputLang output lang for error
|
* @param Translate $outputLang Output lang for error
|
||||||
* @return null
|
|
||||||
*/
|
*/
|
||||||
public function __construct($db, $outputLang = false)
|
public function __construct($db, $outputLang = null)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ class modFckeditor extends DolibarrModules
|
|||||||
$this->config_page_url = array("fckeditor.php");
|
$this->config_page_url = array("fckeditor.php");
|
||||||
|
|
||||||
// Dependencies
|
// Dependencies
|
||||||
$this->disabled = (in_array(constant('JS_CKEDITOR'), array('disabled', 'disabled/')) ? 1 : 0); // A condition to disable module (used for native debian packages)
|
$this->disabled = in_array(constant('JS_CKEDITOR'), array('disabled', 'disabled/'));
|
||||||
$this->depends = array();
|
$this->depends = array();
|
||||||
$this->requiredby = array('modWebsites');
|
$this->requiredby = array('modWebsites');
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,7 @@ foreach ($object->fields as $key => $val) {
|
|||||||
} elseif ($val['type'] == 'price') {
|
} elseif ($val['type'] == 'price') {
|
||||||
$value = GETPOSTISSET($key) ? price2num(GETPOST($key)) : price2num($object->$key);
|
$value = GETPOSTISSET($key) ? price2num(GETPOST($key)) : price2num($object->$key);
|
||||||
} elseif ($key == 'lang') {
|
} elseif ($key == 'lang') {
|
||||||
$value = GETPOSTISSET($key, 'aZ09') ? GETPOST($key, 'aZ09') : $object->lang;
|
$value = GETPOSTISSET($key) ? GETPOST($key, 'aZ09') : $object->lang;
|
||||||
} else {
|
} else {
|
||||||
$value = GETPOSTISSET($key) ? GETPOST($key, 'alpha') : $object->$key;
|
$value = GETPOSTISSET($key) ? GETPOST($key, 'alpha') : $object->$key;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,7 +120,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
// Upadate / add for lang
|
// Upadate / add for lang
|
||||||
if (($action == 'update' || $action == 'add') && !empty($permissiontoadd)) {
|
if (($action == 'update' || $action == 'add') && !empty($permissiontoadd)) {
|
||||||
$object->lang = GETPOSTISSET('langkm', 'aZ09')?GETPOST('langkm', 'aZ09'):$object->lang;
|
$object->lang = (GETPOSTISSET('langkm') ? GETPOST('langkm', 'aZ09') : $object->lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
|
// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
|
||||||
|
|||||||
@ -370,12 +370,12 @@ class Mos extends DolibarrApi
|
|||||||
$qtytoprocess = $value["qty"];
|
$qtytoprocess = $value["qty"];
|
||||||
if (isset($value["fk_warehouse"])) { // If there is a warehouse to set
|
if (isset($value["fk_warehouse"])) { // If there is a warehouse to set
|
||||||
if (!($value["fk_warehouse"] > 0)) { // If there is no warehouse set.
|
if (!($value["fk_warehouse"] > 0)) { // If there is no warehouse set.
|
||||||
throw new RestException(500, "Field fk_warehouse must be > 0 in ".$arrayname);
|
|
||||||
$error++;
|
$error++;
|
||||||
|
throw new RestException(500, "Field fk_warehouse must be > 0 in ".$arrayname);
|
||||||
}
|
}
|
||||||
if ($tmpproduct->status_batch) {
|
if ($tmpproduct->status_batch) {
|
||||||
throw new RestException(500, "Product ".$tmpproduct->ref."must be in batch");
|
|
||||||
$error++;
|
$error++;
|
||||||
|
throw new RestException(500, "Product ".$tmpproduct->ref."must be in batch");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$idstockmove = 0;
|
$idstockmove = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user