checkstyle

This commit is contained in:
Cédric Salvador 2013-09-18 12:13:50 +02:00 committed by Raphaël Doursenaud
parent b74cfaf792
commit b9c36e6e0a
4 changed files with 71 additions and 61 deletions

View File

@ -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,7 +1042,8 @@ 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(
$langs->trans("Documents2"),
$_SERVER['PHP_SELF'], $_SERVER['PHP_SELF'],
"name", "name",
"", "",
@ -1051,14 +1052,16 @@ class FormFile
$sortfield, $sortfield,
$sortorder $sortorder
); );
print_liste_field_titre($langs->trans("Size"), print_liste_field_titre(
$langs->trans("Size"),
"", "",
"", "",
"", "",
"", "",
'align="right"' 'align="right"'
); );
print_liste_field_titre($langs->trans("Date"), print_liste_field_titre(
$langs->trans("Date"),
$_SERVER['PHP_SELF'], $_SERVER['PHP_SELF'],
"date", "date",
"", "",
@ -1067,7 +1070,8 @@ class FormFile
$sortfield, $sortfield,
$sortorder $sortorder
); );
print_liste_field_titre('', print_liste_field_titre(
'',
$_SERVER['PHP_SELF'], $_SERVER['PHP_SELF'],
"", "",
"", "",

View File

@ -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)

View File

@ -3,7 +3,8 @@
* 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(
$_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int'),
$langs->trans('DeleteFile'), $langs->trans('DeleteFile'),
$langs->trans('ConfirmDeleteFile'), $langs->trans('ConfirmDeleteFile'),
'confirm_deletefile', 'confirm_deletefile',
@ -17,7 +18,8 @@ if ($action == 'delete') {
$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, 0,
@ -27,7 +29,8 @@ $formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?id='.$object->id,
); );
// List of document // List of document
$formfile->list_of_documents($filearray, $formfile->list_of_documents(
$filearray,
$object, $object,
$modulepart, $modulepart,
$param, $param,
@ -38,5 +41,5 @@ $formfile->list_of_documents($filearray,
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>";

View File

@ -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
* *
* */ * */