mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Remove commercial module and 2 TODOs.
This commit is contained in:
@@ -71,7 +71,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
/*
|
||||
* Creation repertoire si n'existe pas
|
||||
*/
|
||||
$upload_dir = $conf->commercial->dir_actions.'/'.dol_sanitizeFileName($objectid);
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
||||
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
||||
|
||||
if (is_dir($upload_dir))
|
||||
@@ -95,7 +95,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
*/
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$upload_dir = $conf->commercial->dir_actions.'/'.dol_sanitizeFileName($objectid);
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
||||
$file = $upload_dir . '/' . urldecode($_GET['urlfile']);
|
||||
dol_delete_file($file);
|
||||
}
|
||||
@@ -113,7 +113,7 @@ if ($objectid > 0)
|
||||
$act = new ActionComm($db);
|
||||
if ($act->fetch($objectid))
|
||||
{
|
||||
$upload_dir = $conf->commercial->dir_actions.'/'.dol_sanitizeFileName($objectid);
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
||||
|
||||
$company=new Societe($db);
|
||||
$company->fetch($act->societe->id);
|
||||
|
||||
@@ -54,6 +54,10 @@ if ($_GET["action"] == 'builddoc')
|
||||
{
|
||||
$cat = new CommActionRapport($db, $_GET["month"], $_GET["year"]);
|
||||
$result=$cat->generate($_GET["id"]);
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesg=$cat->error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -272,24 +272,24 @@ if ($modulepart)
|
||||
// Wrapping pour les actions
|
||||
if ($modulepart == 'actions')
|
||||
{
|
||||
$user->getrights('commercial');
|
||||
//if ($user->rights->commercial->actions->lire || eregi('^specimen',$original_file)) // TODO: revoir les droits car pas clair
|
||||
//{
|
||||
$user->getrights('agenda');
|
||||
if ($user->rights->agenda->myactions->read || eregi('^specimen',$original_file))
|
||||
{
|
||||
$accessallowed=1;
|
||||
//}
|
||||
$original_file=$conf->actions->dir_output.'/'.$original_file;
|
||||
}
|
||||
$original_file=$conf->agenda->dir_output.'/'.$original_file;
|
||||
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
|
||||
}
|
||||
|
||||
// Wrapping pour les actions
|
||||
if ($modulepart == 'actionsreport')
|
||||
{
|
||||
$user->getrights('commercial');
|
||||
//if ($user->rights->commercial->actions->lire || eregi('^specimen',$original_file)) // TODO: revoir les droits car pas clair
|
||||
//{
|
||||
$accessallowed=1;
|
||||
//}
|
||||
$original_file = $conf->actions->dir_temp."/".$original_file;
|
||||
$user->getrights('agenda');
|
||||
if ($user->rights->agenda->allactions->read || eregi('^specimen',$original_file))
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file = $conf->agenda->dir_temp."/".$original_file;
|
||||
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ class CommActionRapport
|
||||
|
||||
$outputlangs->setPhpLang();
|
||||
|
||||
$dir = $conf->commercial->dir_actions_temp."/";
|
||||
$dir = $conf->agenda->dir_temp."/";
|
||||
$file = $dir . "actions-".$this->month."-".$this->year.".pdf";
|
||||
|
||||
if (! file_exists($dir))
|
||||
|
||||
Reference in New Issue
Block a user