Fix scrutinizer reports
This commit is contained in:
parent
f4a7714f82
commit
4a19f510fd
@ -705,7 +705,7 @@ while ($i < min($num, $limit))
|
||||
print '<td class="right">';
|
||||
if ($obj->cstatut == 0) // If contract is draft, we say line is also draft
|
||||
{
|
||||
print $contractstatic->LibStatut(0, 5, ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < $now));
|
||||
print $contractstatic->LibStatut(0, 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -48,7 +48,7 @@ function asset_admin_prepare_head()
|
||||
//$this->tabs = array(
|
||||
// 'entity:-tabname:Title:@assets:/asset/mypage.php?id=__ID__'
|
||||
//); // to remove a tab
|
||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets_admin');
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'assets_admin');
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/asset/admin/assets_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
@ -60,7 +60,7 @@ function asset_admin_prepare_head()
|
||||
$head[$h][2] = 'attributes_type';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets_admin', 'remove');
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'assets_admin', 'remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
@ -68,11 +68,12 @@ function asset_admin_prepare_head()
|
||||
/**
|
||||
* Prepare admin pages header
|
||||
*
|
||||
* @param Contrat $object Object related to tabs
|
||||
* @return array head array with tabs
|
||||
*/
|
||||
function asset_prepare_head()
|
||||
function asset_prepare_head(Asset $object)
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $db, $langs, $conf;
|
||||
|
||||
$langs->load("assets");
|
||||
|
||||
@ -96,7 +97,7 @@ function asset_prepare_head()
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
||||
$upload_dir = $conf->assets->dir_output . '/' . get_exdir($filename, 2, 0, 1, $object, 'assets'). '/'. dol_sanitizeFileName($object->ref);
|
||||
$upload_dir = $conf->assets->dir_output . '/' . dol_sanitizeFileName($object->ref);
|
||||
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
||||
$nbLinks=Link::count($db, $object->element, $object->id);
|
||||
$head[$h][0] = DOL_URL_ROOT.'/asset/document.php?id='.$object->id;
|
||||
|
||||
@ -101,7 +101,7 @@ function contract_prepare_head(Contrat $object)
|
||||
*/
|
||||
function contract_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
global $langs, $conf;
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
@ -127,9 +127,7 @@ function contract_admin_prepare_head()
|
||||
$head[$h][2] = 'attributeslines';
|
||||
$h++;
|
||||
|
||||
|
||||
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'contract_admin', 'remove');
|
||||
|
||||
return $head;
|
||||
return $head;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user