diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index fd2fad711ab..eb24e30972f 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -2,8 +2,8 @@ /* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005 Regis Houssin - * Copyright (C) 2005 Simon TOSSER + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005 Simon TOSSER * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -69,7 +69,7 @@ $pagenext = $page + 1; if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { /* - * Creation r�pertoire si n'existe pas + * Creation repertoire si n'existe pas */ $upload_dir = $conf->actions->dir_output.'/'.sanitizeFileName($objectid); if (! is_dir($upload_dir)) create_exdir($upload_dir); @@ -83,7 +83,7 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) } else { - // Echec transfert (fichier d�passant la limite ?) + // Echec transfert (fichier depassant la limite ?) $mesg = '
'.$langs->trans("ErrorFileNotUploaded").'
'; // print_r($_FILES); } diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index a5075afe939..4e1a1c0ffcb 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2005 Simon TOSSER - * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,11 +41,11 @@ $langs->load("orders"); $langs->load("agenda"); // Security check -if ($user->societe_id > 0) -{ - $action = ''; - $socid = $user->societe_id; -} +$socid=isset($_GET['socid'])?$_GET['socid']:$_POST['socid']; +$id = isset($_GET["id"])?$_GET["id"]:''; +if ($user->societe_id) $socid=$user->societe_id; +$result = restrictedArea($user, 'societe', $id, 'actioncomm', '', '', 'id'); + if (isset($_GET["error"])) $error=$_GET["error"]; $cactioncomm = new CActionComm($db); @@ -70,7 +70,7 @@ if ($_POST["action"] == 'add_action') if (! empty($_POST["backtopage"])) $backtopage=$_POST["backtopage"]; if (! $backtopage) { - if ($_POST['socid'] > 0) $backtopage=DOL_URL_ROOT.'/comm/fiche.php?socid='.$_POST['socid']; + if ($socid) $backtopage = DOL_URL_ROOT.'/comm/fiche.php?socid='.$socid; else $backtopage=DOL_URL_ROOT.'/comm/action/index.php'; } header("Location: ".$backtopage); diff --git a/htdocs/includes/modules/modCommercial.class.php b/htdocs/includes/modules/modCommercial.class.php index f8fb45320d1..dc7a243103f 100644 --- a/htdocs/includes/modules/modCommercial.class.php +++ b/htdocs/includes/modules/modCommercial.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -98,8 +99,8 @@ class modCommercial extends DolibarrModules } /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. */ function init() { @@ -112,7 +113,7 @@ class modCommercial extends DolibarrModules } /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. + * \brief Fonction appelee lors de la desactivation d'un module. * Supprime de la base les constantes, boites et permissions du module. */ function remove()