Fix: Delete with ftp module
This commit is contained in:
parent
27367341c5
commit
17807cbcef
@ -21,7 +21,7 @@
|
||||
* \file htdocs/ftp/index.php
|
||||
* \ingroup ftp
|
||||
* \brief Main page for FTP section area
|
||||
* \version $Id: index.php,v 1.22 2011/07/18 00:03:18 eldy Exp $
|
||||
* \version $Id: index.php,v 1.23 2011/07/18 00:49:19 eldy Exp $
|
||||
* \author Laurent Destailleur
|
||||
*/
|
||||
|
||||
@ -39,9 +39,6 @@ $langs->load("other");
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'ftp','');
|
||||
|
||||
// Load permissions
|
||||
$user->getrights('ftp');
|
||||
|
||||
// Get parameters
|
||||
$action = isset($_GET["action"])?$_GET["action"]:$_POST['action'];
|
||||
$section=isset($_GET["section"])?$_GET["section"]:$_POST['section'];
|
||||
@ -628,7 +625,7 @@ if ($conn_id) ftp_close($conn_id);
|
||||
// End of page
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/18 00:03:18 $ - $Revision: 1.22 $');
|
||||
llxFooter('$Date: 2011/07/18 00:49:19 $ - $Revision: 1.23 $');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
* \file htdocs/lib/functions.lib.php
|
||||
* \brief A set of functions for Dolibarr
|
||||
* This file contains all frequently used functions.
|
||||
* \version $Id: functions.lib.php,v 1.546 2011/07/09 11:24:32 eldy Exp $
|
||||
* \version $Id: functions.lib.php,v 1.547 2011/07/18 00:48:33 eldy Exp $
|
||||
*/
|
||||
|
||||
// For compatibility during upgrade
|
||||
@ -2213,6 +2213,10 @@ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename=''
|
||||
{
|
||||
if (! $user->rights->ecm->upload) $deleteok=0;
|
||||
}
|
||||
else if ($feature == 'ftp')
|
||||
{
|
||||
if (! $user->rights->ftp->write) $deleteok=0;
|
||||
}
|
||||
else if (! empty($feature2)) // This should be used for future changes
|
||||
{
|
||||
if (empty($user->rights->$feature->$feature2->supprimer)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user