Fix perm to delete files

This commit is contained in:
Laurent Destailleur 2017-10-18 17:21:30 +02:00
parent b124c7f16d
commit 8626d6279a
36 changed files with 97 additions and 97 deletions

View File

@ -1730,8 +1730,8 @@ else
//$filedir = $conf->adherent->dir_output . '/' . get_exdir($object->id, 2, 0, 0, $object, 'member') . dol_sanitizeFileName($object->ref);
$filedir = $conf->adherent->dir_output . '/' . get_exdir(0, 0, 0, 0, $object, 'member');
$urlsource = $_SERVER['PHP_SELF'] . '?id=' . $object->id;
$genallowed = $user->rights->adherent->creer;
$delallowed = $user->rights->adherent->supprimer;
$genallowed = $user->rights->adherent->lire;
$delallowed = $user->rights->adherent->creer;
print $formfile->showdocuments('member', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $object->default_lang, '', $object);
$somethingshown = $formfile->numoffiles;

View File

@ -390,8 +390,8 @@ if ($rowid && $action != 'edit')
$filename = dol_sanitizeFileName($object->ref);
$filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref);
$urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id;
$genallowed = $user->rights->facture->creer;
$delallowed = $user->rights->facture->supprimer;
$genallowed = $user->rights->facture->lire;
$delallowed = $user->rights->facture->creer;
print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
$somethingshown = $formfile->numoffiles;

View File

@ -1483,8 +1483,8 @@ if ($id > 0)
$filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$user->rights->agenda->myactions->create;
$delallowed=$user->rights->agenda->myactions->delete;
$genallowed=$user->rights->agenda->myactions->read;
$delallowed=$user->rights->agenda->myactions->create;
$var=true;

View File

@ -75,7 +75,7 @@ if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name";
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
$modulepart='contract';
$modulepart='actions';
/*

View File

@ -2355,8 +2355,8 @@ if ($action == 'create')
$filename = dol_sanitizeFileName($object->ref);
$filedir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->propal->creer;
$delallowed = $user->rights->propal->supprimer;
$genallowed = $user->rights->propal->lire;
$delallowed = $user->rights->propal->creer;
$var = true;

View File

@ -1031,7 +1031,7 @@ if ($resql)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->propal->lire;
$delallowed=$user->rights->propal->lire;
$delallowed=$user->rights->propal->creer;
print $formfile->showdocuments('massfilesarea_proposals','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,'','');
}

View File

@ -2576,8 +2576,8 @@ if ($action == 'create' && $user->rights->commande->creer)
$relativepath = $comref . '/' . $comref . '.pdf';
$filedir = $conf->commande->dir_output . '/' . $comref;
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->commande->creer;
$delallowed = $user->rights->commande->supprimer;
$genallowed = $user->rights->commande->lire;
$delallowed = $user->rights->commande->creer;
print $formfile->showdocuments('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);

View File

@ -1452,7 +1452,7 @@ if ($resql)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->commande->lire;
$delallowed=$user->rights->commande->supprimer;
$delallowed=$user->rights->commande->creer;
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}

View File

@ -1378,7 +1378,7 @@ if (empty($reshook))
$object->situation_counter = $object->situation_counter + 1;
$id = $object->createFromCurrent($user);
if ($id <= 0)
if ($id <= 0)
{
$mesg = $object->error;
}
@ -4291,8 +4291,8 @@ else if ($id > 0 || ! empty($ref))
$filename = dol_sanitizeFileName($object->ref);
$filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref);
$urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id;
$genallowed = $user->rights->facture->creer;
$delallowed = $user->rights->facture->supprimer;
$genallowed = $user->rights->facture->lire;
$delallowed = $user->rights->facture->creer;
print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
$somethingshown = $formfile->numoffiles;

View File

@ -1332,7 +1332,7 @@ if ($resql)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->facture->lire;
$delallowed=$user->rights->facture->lire;
$delallowed=$user->rights->facture->creer;
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}

View File

@ -2112,17 +2112,17 @@ else
$filename = dol_sanitizeFileName($object->ref);
$filedir = $conf->contrat->dir_output . "/" . dol_sanitizeFileName($object->ref);
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->contrat->creer;
$delallowed = $user->rights->contrat->supprimer;
$genallowed = $user->rights->contrat->lire;
$delallowed = $user->rights->contrat->creer;
$var = true;
print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('contrat'));
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('contrat'));
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
print '</div><div class="fichehalfright"><div class="ficheaddleft">';

View File

@ -760,8 +760,8 @@ if (! empty($id) && $action != 'edit')
$filename = dol_sanitizeFileName($object->id);
$filedir = $conf->don->dir_output . "/" . dol_sanitizeFileName($object->id);
$urlsource = $_SERVER['PHP_SELF'].'?rowid='.$object->id;
$genallowed = ($object->statut == 2 && ($object->paid == 0 || $user->admin) && $user->rights->don->creer);
$delallowed = $user->rights->don->supprimer;
$genallowed = ($object->statut == 2 && ($object->paid == 0 || $user->admin) && $user->rights->don->lire);
$delallowed = $user->rights->don->creer;
print $formfile->showdocuments('donation',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);

View File

@ -2122,7 +2122,7 @@ else if ($id || $ref)
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$user->rights->expedition->lire;
$delallowed=$user->rights->expedition->supprimer;
$delallowed=$user->rights->expedition->creer;
print $formfile->showdocuments('expedition',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);

View File

@ -2395,8 +2395,8 @@ if($user->rights->expensereport->export && $action != 'create' && $action != 'ed
$filename = dol_sanitizeFileName($object->ref);
$filedir = $conf->expensereport->dir_output . "/" . dol_sanitizeFileName($object->ref);
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed = 1;
$delallowed = 1;
$genallowed = $user->rights->expensereport->export;
$delallowed = $user->rights->expensereport->export;
$var = true;
print $formfile->showdocuments('expensereport',$filename,$filedir,$urlsource,$genallowed,$delallowed);
$somethingshown = $formfile->numoffiles;

View File

@ -732,7 +732,7 @@ if ($resql)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->expensereport->lire;
$delallowed=$user->rights->expensereport->lire;
$delallowed=$user->rights->expensereport->creer;
print $formfile->showdocuments('massfilesarea_expensereport','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}

View File

@ -1688,8 +1688,8 @@ else if ($id > 0 || ! empty($ref))
$filename=dol_sanitizeFileName($object->ref);
$filedir=$conf->ficheinter->dir_output . "/".$filename;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$user->rights->ficheinter->creer;
$delallowed=$user->rights->ficheinter->supprimer;
$genallowed=$user->rights->ficheinter->lire;
$delallowed=$user->rights->ficheinter->creer;
print $formfile->showdocuments('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
// Show links to link elements

View File

@ -633,7 +633,7 @@ if ($resql)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->ficheinter->lire;
$delallowed=$user->rights->ficheinter->supprimer;
$delallowed=$user->rights->ficheinter->creer;
print $formfile->showdocuments('massfilesarea_interventions','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}

View File

@ -2748,8 +2748,8 @@ if ($action != 'makeorder')
$relativepath = $comfournref.'/'.$comfournref.'.pdf';
$filedir = $conf->fournisseur->dir_output . '/commande/' . $comfournref;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$user->rights->fournisseur->commande->creer;
$delallowed=$user->rights->fournisseur->commande->supprimer;
$genallowed=$user->rights->fournisseur->commande->lire;
$delallowed=$user->rights->fournisseur->commande->creer;
print $formfile->showdocuments('commande_fournisseur',$comfournref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,0,0,'','','',$object->thirdparty->default_lang);
$somethingshown=$formfile->numoffiles;

View File

@ -1324,7 +1324,7 @@ if ($resql)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->fournisseur->commande->lire;
$delallowed=$user->rights->fournisseur->commande->lire;
$delallowed=$user->rights->fournisseur->commande->creer;
print $formfile->showdocuments('massfilesarea_supplier_order','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}

View File

@ -1432,7 +1432,7 @@ if ($action == 'create')
$dateinvoice=($datetmp==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$datetmp);
$datetmp=dol_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']);
$datedue=($datetmp==''?-1:$datetmp);
// Replicate extrafields
$objectsrc->fetch_optionals($originid);
$object->array_options = $objectsrc->array_options;
@ -2801,8 +2801,8 @@ else
$subdir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').$ref;
$filedir = $conf->fournisseur->facture->dir_output.'/'.$subdir;
$urlsource=$_SERVER['PHP_SELF'].'?id='.$object->id;
$genallowed=$user->rights->fournisseur->facture->creer;
$delallowed=$user->rights->fournisseur->facture->supprimer;
$genallowed=$user->rights->fournisseur->facture->lire;
$delallowed=$user->rights->fournisseur->facture->creer;
$modelpdf=(! empty($object->modelpdf)?$object->modelpdf:(empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)?'':$conf->global->INVOICE_SUPPLIER_ADDON_PDF));
print $formfile->showdocuments('facture_fournisseur',$subdir,$filedir,$urlsource,$genallowed,$delallowed,$modelpdf,1,0,0,40,0,'','','',$societe->default_lang);

View File

@ -1251,7 +1251,7 @@ if ($resql)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->facture->lire;
$delallowed=$user->rights->facture->lire;
$delallowed=$user->rights->facture->creer;
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}

View File

@ -182,13 +182,13 @@ if ($result > 0)
}
$linkback = '<a href="' . DOL_URL_ROOT . '/fourn/facture/paiement.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
dol_banner_tab($object,'id',$linkback,1,'rowid','ref');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
/*print '<tr>';
@ -258,7 +258,7 @@ if ($result > 0)
print '</table>';
print '</div>';
print '<br>';
/**
@ -295,7 +295,7 @@ if ($result > 0)
while ($i < $num)
{
$objp = $db->fetch_object($resql);
print '<tr class="oddeven">';
// Ref
print '<td><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$objp->facid.'">'.img_object($langs->trans('ShowBill'),'bill').' ';
@ -321,7 +321,7 @@ if ($result > 0)
$i++;
}
}
print "</table>\n";
$db->free($resql);
@ -366,7 +366,7 @@ if ($result > 0)
}
}
print '</div>';
print '<div class="fichecenter"><div class="fichehalfleft">';
/*
@ -375,8 +375,8 @@ if ($result > 0)
$ref=dol_sanitizeFileName($object->ref);
$filedir = $conf->fournisseur->payment->dir_output.'/'.dol_sanitizeFileName($object->ref);
$urlsource=$_SERVER['PHP_SELF'].'?id='.$object->id;
$genallowed=$user->rights->fournisseur->facture->creer;
$delallowed=$user->rights->fournisseur->facture->supprimer;
$genallowed=$user->rights->fournisseur->facture->lire;
$delallowed=$user->rights->fournisseur->facture->creer;
$modelpdf=(! empty($object->modelpdf)?$object->modelpdf:(empty($conf->global->SUPPLIER_PAYMENT_ADDON_PDF)?'':$conf->global->SUPPLIER_PAYMENT_ADDON_PDF));
print $formfile->showdocuments('supplier_payment',$ref,$filedir,$urlsource,$genallowed,$delallowed,$modelpdf,1,0,0,40,0,'','','',$societe->default_lang);

View File

@ -44,7 +44,7 @@ if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
}
$langs->load("sendings");
$langs->load("bills");
@ -223,7 +223,7 @@ if ($action == 'update_extras_line')
{
$array_options=array();
$num=count($object->lines);
for ($i = 0; $i < $num; $i++)
{
// Extrafields
@ -236,7 +236,7 @@ if ($action == 'update_extras_line')
unset($_POST["options_" . $key]);
}
}
$ret = $object->update_line($object->lines[$i]->id,$array_options[$i]); // extrafields update
if ($ret < 0)
{
@ -305,7 +305,7 @@ $formfile = new FormFile($db);
if ($action == 'create') // Seems to no be used
{
}
else
/* *************************************************************************** */
@ -333,16 +333,16 @@ else
$head=delivery_prepare_head($object);
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update_extras_line">';
print '<input type="hidden" name="origin" value="'.$origin.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="ref" value="'.$object->ref.'">';
dol_fiche_head($head, 'delivery', $langs->trans("Shipment"), 0, 'sending');
/*
* Confirmation de la suppression
*
@ -367,7 +367,7 @@ else
/*
* Livraison
*/
if ($typeobject == 'commande' && $expedition->origin_id > 0 && ! empty($conf->commande->enabled))
{
$objectsrc=new Commande($db);
@ -381,7 +381,7 @@ else
// Shipment card
$linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">';
// Ref customer shipment
$morehtmlref.=$form->editfieldkey("RefCustomer", '', $expedition->ref_customer, $expedition, $user->rights->expedition->creer, 'string', '', 0, 1);
@ -422,17 +422,17 @@ else
}
}
$morehtmlref.='</div>';
$morehtmlright = $langs->trans("StatusReceipt").' : '.$object->getLibStatut(6).'<br>';
dol_banner_tab($expedition, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
// Shipment
/*
if (($object->origin == 'shipment' || $object->origin == 'expedition') && $object->origin_id > 0)
@ -459,7 +459,7 @@ else
print '<td align="3">'.$soc->getNomUrl(1).'</td>';
print "</tr>";
*/
// Document origine
if ($typeobject == 'commande' && $expedition->origin_id && ! empty($conf->commande->enabled))
{
@ -535,7 +535,7 @@ else
print '</td></tr>';
}
/* A delivery note should be just more properties of a shipment, so notes are on shipment
/* A delivery note should be just more properties of a shipment, so notes are on shipment
// Note Public
print '<tr><td>'.$langs->trans("NotePublic").'</td>';
print '<td colspan="3">';
@ -563,7 +563,7 @@ else
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/product/stock/card.php?id='.$entrepot->id.'">'.$entrepot->libelle.'</a></td>';
print '</tr>';
}
// Other attributes
if ($action = 'create_delivery') {
// copy from expedition
@ -579,7 +579,7 @@ else
print "</table><br>\n";
print '</div>';
/*
* Lignes produits
*/
@ -602,7 +602,7 @@ else
$var=true;
while ($i < $num_prod)
{
print '<tr class="oddeven">';
if ($object->lines[$i]->fk_product > 0)
@ -666,7 +666,7 @@ else
print '<td align="center">'.$object->lines[$i]->qty_shipped.'</td>';
print "</tr>";
//Display lines extrafields
if (is_array($extralabelslines) && count($extralabelslines)>0) {
$colspan=2;
@ -689,14 +689,14 @@ else
}
print "</table>\n";
dol_fiche_end();
//if ($object->statut == 0) // only if draft
// print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
print '</form>';
/*
* Boutons actions
@ -706,7 +706,7 @@ else
{
print '<div class="tabsAction">';
if ($object->statut == 0 && $num_prod > 0)
if ($object->statut == 0 && $num_prod > 0)
{
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->livraison->creer))
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->livraison_advance->validate)))
@ -741,8 +741,8 @@ else
$filedir = $conf->expedition->dir_output . "/receipt/" . $objectref;
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$user->rights->expedition->livraison->creer;
$delallowed=$user->rights->expedition->livraison->supprimer;
$genallowed=$user->rights->expedition->livraison->lire;
$delallowed=$user->rights->expedition->livraison->creer;
print $formfile->showdocuments('livraison',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);

View File

@ -471,8 +471,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$relativepath = $comref . '/' . $comref . '.pdf';
$filedir = $conf->mymodule->dir_output . '/' . $comref;
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->mymodule->creer;
$delallowed = $user->rights->mymodule->supprimer;
$genallowed = $user->rights->mymodule->read; // If you can read, you can build the PDF to read content
$delallowed = $user->rights->mymodule->create; // If you can create/edit, you can remove a file on card
print $formfile->showdocuments('mymodule', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);

View File

@ -640,7 +640,7 @@ if ($nbtotalofrecords === '' || $nbtotalofrecords)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->mymodule->read;
$delallowed=$user->rights->mymodule->read;
$delallowed=$user->rights->mymodule->create;
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}

View File

@ -2030,8 +2030,8 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete')
$relativepath = $comref . '/' . $objectref . '.pdf';
$filedir = $conf->produit->dir_output . '/' . $objectref;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$user->rights->produit->creer;
$delallowed=$user->rights->produit->supprimer;
$genallowed=$user->rights->produit->lire;
$delallowed=$user->rights->produit->creer;
$var=true;

View File

@ -472,8 +472,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$relativepath = $comref . '/' . $comref . '.pdf';
$filedir = $conf->inventory->dir_output . '/' . $comref;
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->inventory->creer;
$delallowed = $user->rights->inventory->supprimer;
$genallowed = $user->rights->inventory->read;
$delallowed = $user->rights->inventory->create;
print $formfile->showdocuments('inventory', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);

View File

@ -625,7 +625,7 @@ if ($nbtotalofrecords === '' || $nbtotalofrecords)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->inventory->read;
$delallowed=$user->rights->inventory->read;
$delallowed=$user->rights->inventory->create;
print $formfile->showdocuments('massfilesarea_inventory','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}

View File

@ -604,7 +604,7 @@ if ($resql)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->facture->lire;
$delallowed=$user->rights->facture->lire;
$delallowed=$user->rights->facture->creer;
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}

View File

@ -257,8 +257,8 @@ for ($i=1; $i<=4; $i++) {
*/
$filedir=$conf->societe->multidir_output[$this->control->tpl['entity']].'/'.$socid;
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid;
$genallowed=$user->rights->societe->creer;
$delallowed=$user->rights->societe->supprimer;
$genallowed=$user->rights->societe->lire;
$delallowed=$user->rights->societe->creer;
print $formfile->showdocuments('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
?>

View File

@ -201,8 +201,8 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
*/
$filedir=$conf->societe->multidir_output[$this->control->tpl['entity']].'/'.$socid;
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid;
$genallowed=$user->rights->societe->creer;
$delallowed=$user->rights->societe->supprimer;
$genallowed=$user->rights->societe->lire;
$delallowed=$user->rights->societe->creer;
print $formfile->showdocuments('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
?>

View File

@ -2574,8 +2574,8 @@ else
*/
$filedir=$conf->societe->multidir_output[$object->entity].'/'.$object->id;
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id;
$genallowed=$user->rights->societe->creer;
$delallowed=$user->rights->societe->supprimer;
$genallowed=$user->rights->societe->lire;
$delallowed=$user->rights->societe->creer;
$var=true;

View File

@ -655,8 +655,8 @@ if ($socid && $action != 'edit' && $action != "create")
*/
$filedir=$conf->societe->multidir_output[$object->entity].'/'.$object->id;
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id;
$genallowed=$user->rights->societe->creer;
$delallowed=$user->rights->societe->supprimer;
$genallowed=$user->rights->societe->lire;
$delallowed=$user->rights->societe->creer;
$var=true;

View File

@ -1789,8 +1789,8 @@ if ($action == 'create')
$filename = dol_sanitizeFileName($object->ref);
$filedir = $conf->supplier_proposal->dir_output . "/" . dol_sanitizeFileName($object->ref);
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->supplier_proposal->creer;
$delallowed = $user->rights->supplier_proposal->supprimer;
$genallowed = $user->rights->supplier_proposal->lire;
$delallowed = $user->rights->supplier_proposal->creer;
print $formfile->showdocuments('supplier_proposal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);

View File

@ -1027,7 +1027,7 @@ if ($resql)
$filedir=$diroutputmassaction;
$genallowed=$user->rights->supplier_proposal->lire;
$delallowed=$user->rights->supplier_proposal->lire;
$delallowed=$user->rights->supplier_proposal->creer;
print $formfile->showdocuments('massfilesarea_supplier_proposal','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,'','');
}

View File

@ -2482,8 +2482,8 @@ else
$filename = dol_sanitizeFileName($object->ref);
$filedir = $conf->user->dir_output . "/" . dol_sanitizeFileName($object->ref);
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->user->user->creer;
$delallowed = $user->rights->user->user->supprimer;
$genallowed = $user->rights->user->user->lire;
$delallowed = $user->rights->user->user->creer;
print $formfile->showdocuments('user', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
$somethingshown = $formfile->numoffiles;