checkstyle
This commit is contained in:
parent
b74cfaf792
commit
b9c36e6e0a
@ -1018,7 +1018,7 @@ class FormFile
|
||||
|
||||
}
|
||||
|
||||
public function list_of_links($object, $permtodelete=1, $action=null, $selected=null)
|
||||
public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null)
|
||||
{
|
||||
|
||||
global $user, $conf, $langs, $user;
|
||||
@ -1042,38 +1042,42 @@ class FormFile
|
||||
print_titre($langs->trans("LinkedFiles"));
|
||||
print '<table width="100%" class="liste">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Documents2"),
|
||||
$_SERVER['PHP_SELF'],
|
||||
"name",
|
||||
"",
|
||||
$param,
|
||||
'align="left"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre($langs->trans("Size"),
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
'align="right"'
|
||||
);
|
||||
print_liste_field_titre($langs->trans("Date"),
|
||||
$_SERVER['PHP_SELF'],
|
||||
"date",
|
||||
"",
|
||||
$param,
|
||||
'align="center"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre('',
|
||||
$_SERVER['PHP_SELF'],
|
||||
"",
|
||||
"",
|
||||
$param,
|
||||
'align="center"'
|
||||
);
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Documents2"),
|
||||
$_SERVER['PHP_SELF'],
|
||||
"name",
|
||||
"",
|
||||
$param,
|
||||
'align="left"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Size"),
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
'align="right"'
|
||||
);
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Date"),
|
||||
$_SERVER['PHP_SELF'],
|
||||
"date",
|
||||
"",
|
||||
$param,
|
||||
'align="center"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
'',
|
||||
$_SERVER['PHP_SELF'],
|
||||
"",
|
||||
"",
|
||||
$param,
|
||||
'align="center"'
|
||||
);
|
||||
print_liste_field_titre('','','');
|
||||
print '</tr>';
|
||||
$nboflinks = count($links);
|
||||
|
||||
@ -995,6 +995,7 @@ function dol_init_file_process($pathtoscan='')
|
||||
* @param int $donotupdatesession 1=Do no edit _SESSION variable
|
||||
* @param string $varfiles _FILES var name
|
||||
* @param string $savingdocmask Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__'
|
||||
* @param string $link Link to add
|
||||
* @return void
|
||||
*/
|
||||
function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesession=0, $varfiles='addedfile', $savingdocmask='', $link=null)
|
||||
|
||||
@ -3,40 +3,43 @@
|
||||
* Confirm suppression
|
||||
*/
|
||||
if ($action == 'delete') {
|
||||
$ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int'),
|
||||
$langs->trans('DeleteFile'),
|
||||
$langs->trans('ConfirmDeleteFile'),
|
||||
'confirm_deletefile',
|
||||
'',
|
||||
0,
|
||||
1
|
||||
);
|
||||
$ret = $form->form_confirm(
|
||||
$_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int'),
|
||||
$langs->trans('DeleteFile'),
|
||||
$langs->trans('ConfirmDeleteFile'),
|
||||
'confirm_deletefile',
|
||||
'',
|
||||
0,
|
||||
1
|
||||
);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
$formfile=new FormFile($db);
|
||||
|
||||
// Show upload form
|
||||
$formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?id='.$object->id,
|
||||
'',
|
||||
0,
|
||||
0,
|
||||
$permission,
|
||||
50,
|
||||
$object
|
||||
);
|
||||
$formfile->form_attach_new_file(
|
||||
$_SERVER["PHP_SELF"].'?id='.$object->id,
|
||||
'',
|
||||
0,
|
||||
0,
|
||||
$permission,
|
||||
50,
|
||||
$object
|
||||
);
|
||||
|
||||
// List of document
|
||||
$formfile->list_of_documents($filearray,
|
||||
$object,
|
||||
$modulepart,
|
||||
$param,
|
||||
0,
|
||||
'',
|
||||
$permission
|
||||
);
|
||||
$formfile->list_of_documents(
|
||||
$filearray,
|
||||
$object,
|
||||
$modulepart,
|
||||
$param,
|
||||
0,
|
||||
'',
|
||||
$permission
|
||||
);
|
||||
|
||||
print "<br>";
|
||||
//List of links
|
||||
$formfile->list_of_links($object, $permission, $action, GETPOST('linkid', 'int'));
|
||||
$formfile->listOfLinks($object, $permission, $action, GETPOST('linkid', 'int'));
|
||||
print "<br>";
|
||||
|
||||
@ -226,9 +226,11 @@ class Link extends CommonObject
|
||||
|
||||
/**
|
||||
* Loads all links from database
|
||||
* @param $links array of Link objects to fill
|
||||
* @param $objecttype type of the associated object in dolibarr
|
||||
* @param $objectid id of the associated object in dolibarr
|
||||
* @param array $links array of Link objects to fill
|
||||
* @param string $objecttype type of the associated object in dolibarr
|
||||
* @param int $objectid id of the associated object in dolibarr
|
||||
* @param string $sortfield field used to sort
|
||||
* @param string $sortorder
|
||||
* @return 1 if ok, 0 if no records, -1 if error
|
||||
*
|
||||
* */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user