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