From a52e5888d0a15cf1d2f83a223d2298860ad63cad Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 13 Dec 2010 20:24:30 +0000 Subject: [PATCH] Fix: bug #31718 : External users and their access --- htdocs/categories/categorie.php | 2 +- htdocs/societe/agenda.php | 2 +- htdocs/societe/notify/fiche.php | 3 ++- htdocs/societe/socnote.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 9ee320203a1..8046b99c120 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -203,7 +203,7 @@ if ($_GET["socid"]) print ''; print ''; print ''; diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index fde35e4558d..c2a964c5ebe 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -81,7 +81,7 @@ if ($_GET["socid"]) print '
'.$langs->trans("Name").''; - print $html->showrefnav($soc,'socid','',1,'rowid','nom'); + print $html->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom'); print '
'.$langs->trans('Prefix').''.$soc->prefix_comm.'
'; print ''; print ''; diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index b913a8fad1d..5078a3c5d46 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -1,6 +1,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2010 Juanjo Menent * * 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 @@ -113,7 +114,7 @@ if ( $soc->fetch($soc->id) ) print '
'.$langs->trans("Name").''; - print $html->showrefnav($soc,'socid','',1,'rowid','nom'); + print $html->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom'); print '
'.$langs->trans('Prefix').''.$soc->prefix_comm.'
'; print ''; print ''; diff --git a/htdocs/societe/socnote.php b/htdocs/societe/socnote.php index 97fee1feadd..679b4dd6472 100644 --- a/htdocs/societe/socnote.php +++ b/htdocs/societe/socnote.php @@ -82,7 +82,7 @@ if ($socid > 0) print ''; print ''; print '';
'.$langs->trans("Name").''; - print $form->showrefnav($soc,'socid','',1,'rowid','nom'); + print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom'); print '
'.$langs->trans("NbOfActiveNotifications").'
'.$langs->trans('Name').''; - print $form->showrefnav($societe,'socid','',1,'rowid','nom'); + print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom'); print '
'.$langs->trans('Prefix').''.$societe->prefix_comm.'