Remove commercial module and 2 TODOs.

This commit is contained in:
Laurent Destailleur 2009-05-10 06:00:28 +00:00
parent 5615a164fd
commit 28ca4e7e6b
4 changed files with 19 additions and 15 deletions

View File

@ -71,7 +71,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
/* /*
* Creation repertoire si n'existe pas * 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)) create_exdir($upload_dir);
if (is_dir($upload_dir)) if (is_dir($upload_dir))
@ -95,7 +95,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
*/ */
if ($_GET["action"] == 'delete') 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']); $file = $upload_dir . '/' . urldecode($_GET['urlfile']);
dol_delete_file($file); dol_delete_file($file);
} }
@ -113,7 +113,7 @@ if ($objectid > 0)
$act = new ActionComm($db); $act = new ActionComm($db);
if ($act->fetch($objectid)) 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=new Societe($db);
$company->fetch($act->societe->id); $company->fetch($act->societe->id);

View File

@ -54,6 +54,10 @@ if ($_GET["action"] == 'builddoc')
{ {
$cat = new CommActionRapport($db, $_GET["month"], $_GET["year"]); $cat = new CommActionRapport($db, $_GET["month"], $_GET["year"]);
$result=$cat->generate($_GET["id"]); $result=$cat->generate($_GET["id"]);
if ($result < 0)
{
$mesg=$cat->error;
}
} }

View File

@ -272,24 +272,24 @@ if ($modulepart)
// Wrapping pour les actions // Wrapping pour les actions
if ($modulepart == 'actions') if ($modulepart == 'actions')
{ {
$user->getrights('commercial'); $user->getrights('agenda');
//if ($user->rights->commercial->actions->lire || eregi('^specimen',$original_file)) // TODO: revoir les droits car pas clair if ($user->rights->agenda->myactions->read || eregi('^specimen',$original_file))
//{ {
$accessallowed=1; $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'"; //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
} }
// Wrapping pour les actions // Wrapping pour les actions
if ($modulepart == 'actionsreport') if ($modulepart == 'actionsreport')
{ {
$user->getrights('commercial'); $user->getrights('agenda');
//if ($user->rights->commercial->actions->lire || eregi('^specimen',$original_file)) // TODO: revoir les droits car pas clair if ($user->rights->agenda->allactions->read || eregi('^specimen',$original_file))
//{ {
$accessallowed=1; $accessallowed=1;
//} }
$original_file = $conf->actions->dir_temp."/".$original_file; $original_file = $conf->agenda->dir_temp."/".$original_file;
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'"; //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
} }

View File

@ -86,7 +86,7 @@ class CommActionRapport
$outputlangs->setPhpLang(); $outputlangs->setPhpLang();
$dir = $conf->commercial->dir_actions_temp."/"; $dir = $conf->agenda->dir_temp."/";
$file = $dir . "actions-".$this->month."-".$this->year.".pdf"; $file = $dir . "actions-".$this->month."-".$this->year.".pdf";
if (! file_exists($dir)) if (! file_exists($dir))