forked from Wavyzz/dolibarr
Fix: avoid warning
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
* \file htdocs/admin/const.php
|
* \file htdocs/admin/const.php
|
||||||
* \ingroup setup
|
* \ingroup setup
|
||||||
* \brief Admin page to define miscellaneous constants
|
* \brief Admin page to define miscellaneous constants
|
||||||
* \version $Id: const.php,v 1.70 2011/07/31 22:23:21 eldy Exp $
|
* \version $Id: const.php,v 1.71 2011/08/21 10:01:37 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@@ -143,7 +143,7 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Value").'</td>';
|
print '<td>'.$langs->trans("Value").'</td>';
|
||||||
print '<td>'.$langs->trans("Comment").'</td>';
|
print '<td>'.$langs->trans("Comment").'</td>';
|
||||||
if ($conf->multicompany->enabled && !$user->entity) print '<td>'.$langs->trans("Entity").'</td>';
|
if (! empty($conf->multicompany->enabled) && !$user->entity) print '<td>'.$langs->trans("Entity").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("Action").'</td>';
|
print '<td align="center">'.$langs->trans("Action").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ print '</td><td>';
|
|||||||
print '<input type="text" class="flat" size="40" name="constnote" value="">';
|
print '<input type="text" class="flat" size="40" name="constnote" value="">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Limit to superadmin
|
// Limit to superadmin
|
||||||
if ($conf->multicompany->enabled && !$user->entity)
|
if (! empty($conf->multicompany->enabled) && !$user->entity)
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
|
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
|
||||||
@@ -231,7 +231,7 @@ if ($result)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Entity limit to superadmin
|
// Entity limit to superadmin
|
||||||
if ($conf->multicompany->enabled && !$user->entity)
|
if (! empty($conf->multicompany->enabled) && !$user->entity)
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
|
print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
|
||||||
@@ -279,5 +279,5 @@ print "</form>\n";
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/31 22:23:21 $ - $Revision: 1.70 $');
|
llxFooter('$Date: 2011/08/21 10:01:37 $ - $Revision: 1.71 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
* \file htdocs/core/class/html.form.class.php
|
* \file htdocs/core/class/html.form.class.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief File of class with all html predefined components
|
* \brief File of class with all html predefined components
|
||||||
* \version $Id: html.form.class.php,v 1.203 2011/08/21 00:20:44 hregis Exp $
|
* \version $Id: html.form.class.php,v 1.204 2011/08/21 10:01:37 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -799,12 +799,12 @@ class Form
|
|||||||
|
|
||||||
// On recherche les utilisateurs
|
// On recherche les utilisateurs
|
||||||
$sql = "SELECT u.rowid, u.name, u.firstname, u.login, u.admin, u.entity";
|
$sql = "SELECT u.rowid, u.name, u.firstname, u.login, u.admin, u.entity";
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
$sql.= ", e.label";
|
$sql.= ", e.label";
|
||||||
}
|
}
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX ."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX ."user as u";
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."entity as e on e.rowid=u.entity";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."entity as e on e.rowid=u.entity";
|
||||||
if ($force_entity) $sql.= " WHERE u.entity IN (0,".$force_entity.")";
|
if ($force_entity) $sql.= " WHERE u.entity IN (0,".$force_entity.")";
|
||||||
@@ -856,7 +856,7 @@ class Form
|
|||||||
}
|
}
|
||||||
$out.= $userstatic->getFullName($langs);
|
$out.= $userstatic->getFullName($langs);
|
||||||
|
|
||||||
if($conf->multicompany->enabled && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if(! empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
if ($obj->admin && ! $obj->entity) $out.=" (".$langs->trans("AllEntities").")";
|
if ($obj->admin && ! $obj->entity) $out.=" (".$langs->trans("AllEntities").")";
|
||||||
else $out.=" (".$obj->label.")";
|
else $out.=" (".$obj->label.")";
|
||||||
@@ -3535,12 +3535,12 @@ class Form
|
|||||||
|
|
||||||
// On recherche les groupes
|
// On recherche les groupes
|
||||||
$sql = "SELECT ug.rowid, ug.nom ";
|
$sql = "SELECT ug.rowid, ug.nom ";
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
$sql.= ", e.label";
|
$sql.= ", e.label";
|
||||||
}
|
}
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup as ug ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup as ug ";
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."entity as e on e.rowid=ug.entity";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."entity as e on e.rowid=ug.entity";
|
||||||
if ($force_entity) $sql.= " WHERE ug.entity IN (0,".$force_entity.")";
|
if ($force_entity) $sql.= " WHERE ug.entity IN (0,".$force_entity.")";
|
||||||
@@ -3580,7 +3580,7 @@ class Form
|
|||||||
$out.= '>';
|
$out.= '>';
|
||||||
|
|
||||||
$out.= $obj->nom;
|
$out.= $obj->nom;
|
||||||
if($conf->multicompany->enabled && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1)
|
if(! empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1)
|
||||||
{
|
{
|
||||||
$out.= " (".$obj->label.")";
|
$out.= " (".$obj->label.")";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
* \file htdocs/lib/functions.lib.php
|
* \file htdocs/lib/functions.lib.php
|
||||||
* \brief A set of functions for Dolibarr
|
* \brief A set of functions for Dolibarr
|
||||||
* This file contains all frequently used functions.
|
* This file contains all frequently used functions.
|
||||||
* \version $Id: functions.lib.php,v 1.562 2011/08/20 20:53:31 eldy Exp $
|
* \version $Id: functions.lib.php,v 1.563 2011/08/21 10:01:37 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// For compatibility during upgrade
|
// For compatibility during upgrade
|
||||||
@@ -2224,7 +2224,7 @@ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename=''
|
|||||||
$sql = "SELECT dbt.".$dbt_select;
|
$sql = "SELECT dbt.".$dbt_select;
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
$sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
||||||
$sql.= " WHERE dbt.".$dbt_select." = ".$objectid;
|
$sql.= " WHERE dbt.".$dbt_select." = ".$objectid;
|
||||||
if (($feature == 'user' || $feature == 'usergroup') && $conf->multicompany->enabled && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if (($feature == 'user' || $feature == 'usergroup') && ! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
$sql.= " AND dbt.entity IS NOT NULL";
|
$sql.= " AND dbt.entity IS NOT NULL";
|
||||||
}
|
}
|
||||||
@@ -2252,7 +2252,7 @@ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename=''
|
|||||||
$sql.= " AND s.entity IN (0,".(! empty($conf->entities[$dbtablename]) ? $conf->entities[$dbtablename] : $conf->entity).")";
|
$sql.= " AND s.entity IN (0,".(! empty($conf->entities[$dbtablename]) ? $conf->entities[$dbtablename] : $conf->entity).")";
|
||||||
}
|
}
|
||||||
// If multicompany and internal users with all permissions, check user is in correct entity
|
// If multicompany and internal users with all permissions, check user is in correct entity
|
||||||
else if ($conf->multicompany->enabled)
|
else if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
$sql = "SELECT s.rowid";
|
$sql = "SELECT s.rowid";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
@@ -2281,7 +2281,7 @@ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename=''
|
|||||||
$sql.= " AND dbt.entity IN (0,".(! empty($conf->entities[$dbtablename]) ? $conf->entities[$dbtablename] : $conf->entity).")";
|
$sql.= " AND dbt.entity IN (0,".(! empty($conf->entities[$dbtablename]) ? $conf->entities[$dbtablename] : $conf->entity).")";
|
||||||
}
|
}
|
||||||
// If multicompany and internal users with all permissions, check user is in correct entity
|
// If multicompany and internal users with all permissions, check user is in correct entity
|
||||||
else if ($conf->multicompany->enabled)
|
else if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
$sql = "SELECT dbt.rowid";
|
$sql = "SELECT dbt.rowid";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
$sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
||||||
@@ -2324,7 +2324,7 @@ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename=''
|
|||||||
$sql.= " AND sc.fk_user = ".$user->id;
|
$sql.= " AND sc.fk_user = ".$user->id;
|
||||||
}
|
}
|
||||||
// If multicompany and internal users with all permissions, check user is in correct entity
|
// If multicompany and internal users with all permissions, check user is in correct entity
|
||||||
else if ($conf->multicompany->enabled)
|
else if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
$sql = "SELECT dbt.".$dbt_select;
|
$sql = "SELECT dbt.".$dbt_select;
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
$sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* \file htdocs/main.inc.php
|
* \file htdocs/main.inc.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief File that defines environment for Dolibarr pages only (variables not required by scripts)
|
* \brief File that defines environment for Dolibarr pages only (variables not required by scripts)
|
||||||
* \version $Id: main.inc.php,v 1.767 2011/08/19 15:06:28 cdelambert Exp $
|
* \version $Id: main.inc.php,v 1.768 2011/08/21 10:01:38 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ini_set('memory_limit', '64M'); // This may be useless if memory is hard limited by your PHP
|
@ini_set('memory_limit', '64M'); // This may be useless if memory is hard limited by your PHP
|
||||||
@@ -539,7 +539,7 @@ if (! defined('NOLOGIN'))
|
|||||||
$_SESSION["dol_screenwidth"]=isset($dol_screenwidth)?$dol_screenwidth:'';
|
$_SESSION["dol_screenwidth"]=isset($dol_screenwidth)?$dol_screenwidth:'';
|
||||||
$_SESSION["dol_screenheight"]=isset($dol_screenheight)?$dol_screenheight:'';
|
$_SESSION["dol_screenheight"]=isset($dol_screenheight)?$dol_screenheight:'';
|
||||||
$_SESSION["dol_company"]=$conf->global->MAIN_INFO_SOCIETE_NOM;
|
$_SESSION["dol_company"]=$conf->global->MAIN_INFO_SOCIETE_NOM;
|
||||||
if ($conf->multicompany->enabled) $_SESSION["dol_entity"]=$conf->entity;
|
if (! empty($conf->multicompany->enabled)) $_SESSION["dol_entity"]=$conf->entity;
|
||||||
dol_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"].' Session id='.session_id());
|
dol_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"].' Session id='.session_id());
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/user/class/user.class.php
|
* \file htdocs/user/class/user.class.php
|
||||||
* \brief Fichier de la classe utilisateur
|
* \brief Fichier de la classe utilisateur
|
||||||
* \version $Id: user.class.php,v 1.52 2011/08/21 00:20:43 hregis Exp $
|
* \version $Id: user.class.php,v 1.53 2011/08/21 10:01:37 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
||||||
@@ -146,7 +146,7 @@ class User extends CommonObject
|
|||||||
$sql.= " u.openid as openid";
|
$sql.= " u.openid as openid";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
|
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1)
|
||||||
{
|
{
|
||||||
$sql.= " WHERE u.entity IS NOT NULL";
|
$sql.= " WHERE u.entity IS NOT NULL";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
* \file htdocs/user/class/usergroup.class.php
|
* \file htdocs/user/class/usergroup.class.php
|
||||||
* \brief Fichier de la classe des groupes d'utilisateur
|
* \brief Fichier de la classe des groupes d'utilisateur
|
||||||
* \author Rodolphe Qiedeville
|
* \author Rodolphe Qiedeville
|
||||||
* \version $Id: usergroup.class.php,v 1.15 2011/08/21 00:20:43 hregis Exp $
|
* \version $Id: usergroup.class.php,v 1.16 2011/08/21 10:01:37 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
||||||
@@ -130,7 +130,7 @@ class UserGroup extends CommonObject
|
|||||||
$sql.= " WHERE ug.fk_usergroup = g.rowid";
|
$sql.= " WHERE ug.fk_usergroup = g.rowid";
|
||||||
$sql.= " AND ug.fk_user = ".$userid;
|
$sql.= " AND ug.fk_user = ".$userid;
|
||||||
|
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
$sql.= " AND g.entity IS NOT NULL";
|
$sql.= " AND g.entity IS NOT NULL";
|
||||||
}
|
}
|
||||||
@@ -182,7 +182,7 @@ class UserGroup extends CommonObject
|
|||||||
$sql.= " WHERE ug.fk_user = u.rowid";
|
$sql.= " WHERE ug.fk_user = u.rowid";
|
||||||
$sql.= " AND ug.fk_usergroup = ".$this->id;
|
$sql.= " AND ug.fk_usergroup = ".$this->id;
|
||||||
|
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
$sql.= " AND u.entity IS NOT NULL";
|
$sql.= " AND u.entity IS NOT NULL";
|
||||||
}
|
}
|
||||||
@@ -523,7 +523,7 @@ class UserGroup extends CommonObject
|
|||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$entity=$conf->entity;
|
$entity=$conf->entity;
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1)
|
||||||
{
|
{
|
||||||
$entity=$this->entity;
|
$entity=$this->entity;
|
||||||
}
|
}
|
||||||
@@ -578,7 +578,7 @@ class UserGroup extends CommonObject
|
|||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$entity=$conf->entity;
|
$entity=$conf->entity;
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1)
|
||||||
{
|
{
|
||||||
$entity=$this->entity;
|
$entity=$this->entity;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/user/fiche.php
|
* \file htdocs/user/fiche.php
|
||||||
* \brief Tab of user card
|
* \brief Tab of user card
|
||||||
* \version $Id: fiche.php,v 1.280 2011/08/21 00:20:44 hregis Exp $
|
* \version $Id: fiche.php,v 1.281 2011/08/21 10:01:37 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@@ -35,7 +35,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/images.lib.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php");
|
||||||
if ($conf->ldap->enabled) require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php");
|
if ($conf->ldap->enabled) require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php");
|
||||||
if ($conf->adherent->enabled) require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
|
if ($conf->adherent->enabled) require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
|
||||||
if ($conf->multicompany->enabled) dol_include_once("/multicompany/class/actions_multicompany.class.php");
|
if (! empty($conf->multicompany->enabled)) dol_include_once("/multicompany/class/actions_multicompany.class.php");
|
||||||
|
|
||||||
// Define value to know what current user can do on users
|
// Define value to know what current user can do on users
|
||||||
$canadduser=($user->admin || $user->rights->user->user->creer);
|
$canadduser=($user->admin || $user->rights->user->user->creer);
|
||||||
@@ -51,7 +51,7 @@ if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Multicompany in mode transversal
|
//Multicompany in mode transversal
|
||||||
if($conf->multicompany->enabled && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)
|
if(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)
|
||||||
{
|
{
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
@@ -666,7 +666,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->selectyesno('admin',$_POST["admin"],1);
|
print $form->selectyesno('admin',$_POST["admin"],1);
|
||||||
|
|
||||||
if ($conf->multicompany->enabled && ! $user->entity && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
|
if (! empty($conf->multicompany->enabled) && ! $user->entity && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
|
||||||
{
|
{
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
@@ -704,7 +704,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Multicompany
|
//Multicompany
|
||||||
if ($conf->multicompany->enabled)
|
if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
@@ -1039,7 +1039,7 @@ else
|
|||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Multicompany
|
// Multicompany
|
||||||
if ($conf->multicompany->enabled && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if (! empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
||||||
if ($fuser->admin && ! $fuser->entity)
|
if ($fuser->admin && ! $fuser->entity)
|
||||||
@@ -1295,7 +1295,7 @@ else
|
|||||||
print $form->select_dolgroups('','group',1,$exclude,0,'','',$fuser->entity);
|
print $form->select_dolgroups('','group',1,$exclude,0,'','',$fuser->entity);
|
||||||
print ' ';
|
print ' ';
|
||||||
// Multicompany
|
// Multicompany
|
||||||
if ($conf->multicompany->enabled)
|
if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
if ($conf->entity == 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)
|
if ($conf->entity == 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)
|
||||||
{
|
{
|
||||||
@@ -1325,7 +1325,7 @@ else
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre" width="25%">'.$langs->trans("Groups").'</td>';
|
print '<td class="liste_titre" width="25%">'.$langs->trans("Groups").'</td>';
|
||||||
if($conf->multicompany->enabled && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if(! empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" width="25%">'.$langs->trans("Entity").'</td>';
|
print '<td class="liste_titre" width="25%">'.$langs->trans("Entity").'</td>';
|
||||||
}
|
}
|
||||||
@@ -1350,7 +1350,7 @@ else
|
|||||||
print img_object($langs->trans("ShowGroup"),"group").' '.$group->nom;
|
print img_object($langs->trans("ShowGroup"),"group").' '.$group->nom;
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if($conf->multicompany->enabled && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if(! empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
$mc = new ActionsMulticompany($db);
|
$mc = new ActionsMulticompany($db);
|
||||||
$mc->getInfo($group->usergroup_entity);
|
$mc->getInfo($group->usergroup_entity);
|
||||||
@@ -1507,7 +1507,7 @@ else
|
|||||||
{
|
{
|
||||||
print $form->selectyesno('admin',$fuser->admin,1);
|
print $form->selectyesno('admin',$fuser->admin,1);
|
||||||
|
|
||||||
if ($conf->multicompany->enabled && ! $user->entity && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
|
if (! empty($conf->multicompany->enabled) && ! $user->entity && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
|
||||||
{
|
{
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
@@ -1563,7 +1563,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Multicompany
|
//Multicompany
|
||||||
if ($conf->multicompany->enabled)
|
if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
if(empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if(empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
@@ -1776,7 +1776,7 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/08/21 00:20:44 $ - $Revision: 1.280 $');
|
llxFooter('$Date: 2011/08/21 10:01:37 $ - $Revision: 1.281 $');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,13 +21,13 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/user/group/fiche.php
|
* \file htdocs/user/group/fiche.php
|
||||||
* \brief Onglet groupes utilisateurs
|
* \brief Onglet groupes utilisateurs
|
||||||
* \version $Id: fiche.php,v 1.76 2011/08/21 00:20:44 hregis Exp $
|
* \version $Id: fiche.php,v 1.77 2011/08/21 10:01:37 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/user/class/usergroup.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/user/class/usergroup.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php");
|
||||||
if($conf->multicompany->enabled) dol_include_once("/multicompany/class/actions_multicompany.class.php");
|
if(! empty($conf->multicompany->enabled)) dol_include_once("/multicompany/class/actions_multicompany.class.php");
|
||||||
|
|
||||||
// Defini si peux lire/modifier utilisateurs et permisssions
|
// Defini si peux lire/modifier utilisateurs et permisssions
|
||||||
$canreadperms=($user->admin || $user->rights->user->user->lire);
|
$canreadperms=($user->admin || $user->rights->user->user->lire);
|
||||||
@@ -52,7 +52,7 @@ $userid=GETPOST("user","int");
|
|||||||
// Security check
|
// Security check
|
||||||
$result = restrictedArea($user, 'user', $_GET["id"], 'usergroup', 'user');
|
$result = restrictedArea($user, 'user', $_GET["id"], 'usergroup', 'user');
|
||||||
|
|
||||||
if($conf->multicompany->enabled && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)
|
if(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)
|
||||||
{
|
{
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
@@ -220,7 +220,7 @@ if ($action == 'create')
|
|||||||
print '<td class="valeur"><input size="30" type="text" name="nom" value=""></td></tr>';
|
print '<td class="valeur"><input size="30" type="text" name="nom" value=""></td></tr>';
|
||||||
|
|
||||||
// Multicompany
|
// Multicompany
|
||||||
if ($conf->multicompany->enabled)
|
if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
@@ -307,7 +307,7 @@ else
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Multicompany
|
// Multicompany
|
||||||
if ($conf->multicompany->enabled && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if (! empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
$mc = new ActionsMulticompany($db);
|
$mc = new ActionsMulticompany($db);
|
||||||
$mc->getInfo($object->entity);
|
$mc->getInfo($object->entity);
|
||||||
@@ -376,7 +376,7 @@ else
|
|||||||
print $form->select_dolusers('','user',1,$exclude,0,'','',$object->entity);
|
print $form->select_dolusers('','user',1,$exclude,0,'','',$object->entity);
|
||||||
print ' ';
|
print ' ';
|
||||||
// Multicompany
|
// Multicompany
|
||||||
if ($conf->multicompany->enabled)
|
if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
if ($conf->entity == 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)
|
if ($conf->entity == 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)
|
||||||
{
|
{
|
||||||
@@ -407,7 +407,7 @@ else
|
|||||||
print '<td class="liste_titre">'.$langs->trans("Login").'</td>';
|
print '<td class="liste_titre">'.$langs->trans("Login").'</td>';
|
||||||
print '<td class="liste_titre">'.$langs->trans("Lastname").'</td>';
|
print '<td class="liste_titre">'.$langs->trans("Lastname").'</td>';
|
||||||
print '<td class="liste_titre">'.$langs->trans("Firstname").'</td>';
|
print '<td class="liste_titre">'.$langs->trans("Firstname").'</td>';
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1)
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">'.$langs->trans("Entity").'</td>';
|
print '<td class="liste_titre">'.$langs->trans("Entity").'</td>';
|
||||||
}
|
}
|
||||||
@@ -431,7 +431,7 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.ucfirst(stripslashes($useringroup->lastname)).'</td>';
|
print '<td>'.ucfirst(stripslashes($useringroup->lastname)).'</td>';
|
||||||
print '<td>'.ucfirst(stripslashes($useringroup->firstname)).'</td>';
|
print '<td>'.ucfirst(stripslashes($useringroup->firstname)).'</td>';
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1)
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1)
|
||||||
{
|
{
|
||||||
$mc = new ActionsMulticompany($db);
|
$mc = new ActionsMulticompany($db);
|
||||||
$mc->getInfo($useringroup->usergroup_entity);
|
$mc->getInfo($useringroup->usergroup_entity);
|
||||||
@@ -474,7 +474,7 @@ else
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Multicompany
|
// Multicompany
|
||||||
if ($conf->multicompany->enabled)
|
if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
@@ -518,5 +518,5 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/08/21 00:20:44 $ - $Revision: 1.76 $');
|
llxFooter('$Date: 2011/08/21 10:01:37 $ - $Revision: 1.77 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
* \file htdocs/user/group/index.php
|
* \file htdocs/user/group/index.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief Page of user groups
|
* \brief Page of user groups
|
||||||
* \version $Id: index.php,v 1.29 2011/08/20 09:03:38 hregis Exp $
|
* \version $Id: index.php,v 1.30 2011/08/21 10:01:37 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
@@ -59,7 +59,7 @@ print_fiche_titre($langs->trans("ListOfGroups"));
|
|||||||
$sql = "SELECT g.rowid, g.nom, g.entity, g.datec, COUNT(ugu.rowid) as nb";
|
$sql = "SELECT g.rowid, g.nom, g.entity, g.datec, COUNT(ugu.rowid) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g";
|
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_usergroup = g.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_usergroup = g.rowid";
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && ! $user->entity)))
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && ! $user->entity)))
|
||||||
{
|
{
|
||||||
$sql.= " WHERE g.entity IS NOT NULL";
|
$sql.= " WHERE g.entity IS NOT NULL";
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ if ($resql)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Group"),$_SERVER["PHP_SELF"],"g.nom",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Group"),$_SERVER["PHP_SELF"],"g.nom",$param,"","",$sortfield,$sortorder);
|
||||||
//multicompany
|
//multicompany
|
||||||
if($conf->multicompany->enabled && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1)
|
if(! empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1)
|
||||||
{
|
{
|
||||||
print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],"g.entity",$param,"",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],"g.entity",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
//multicompany
|
//multicompany
|
||||||
if($conf->multicompany->enabled && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1)
|
if(! empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1)
|
||||||
{
|
{
|
||||||
dol_include_once("/multicompany/class/actions_multicompany.class.php");
|
dol_include_once("/multicompany/class/actions_multicompany.class.php");
|
||||||
$mc = new ActionsMulticompany($db);
|
$mc = new ActionsMulticompany($db);
|
||||||
@@ -129,6 +129,6 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/08/20 09:03:38 $ - $Revision: 1.29 $');
|
llxFooter('$Date: 2011/08/21 10:01:37 $ - $Revision: 1.30 $');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/user/home.php
|
* \file htdocs/user/home.php
|
||||||
* \brief Home page of users and groups management
|
* \brief Home page of users and groups management
|
||||||
* \version $Id: home.php,v 1.51 2011/08/20 09:03:38 hregis Exp $
|
* \version $Id: home.php,v 1.52 2011/08/21 10:01:37 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@@ -100,7 +100,7 @@ $sql = "SELECT u.rowid, u.name, u.firstname, u.admin, u.login, u.fk_societe, u.d
|
|||||||
$sql.= " s.nom, s.canvas";
|
$sql.= " s.nom, s.canvas";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid";
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && ! $user->entity)))
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && ! $user->entity)))
|
||||||
{
|
{
|
||||||
$sql.= " WHERE u.entity IS NOT NULL";
|
$sql.= " WHERE u.entity IS NOT NULL";
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@ if ($resql)
|
|||||||
$companystatic->canvas=$obj->canvas;
|
$companystatic->canvas=$obj->canvas;
|
||||||
print $companystatic->getNomUrl(1);
|
print $companystatic->getNomUrl(1);
|
||||||
}
|
}
|
||||||
else if ($conf->multicompany->enabled)
|
else if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
if ($obj->admin && ! $obj->entity)
|
if ($obj->admin && ! $obj->entity)
|
||||||
{
|
{
|
||||||
@@ -197,7 +197,7 @@ if ($canreadperms)
|
|||||||
|
|
||||||
$sql = "SELECT g.rowid, g.nom, g.note, g.entity, g.datec";
|
$sql = "SELECT g.rowid, g.nom, g.note, g.entity, g.datec";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g";
|
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g";
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && ! $user->entity)))
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && ! $user->entity)))
|
||||||
{
|
{
|
||||||
$sql.= " WHERE g.entity IS NOT NULL";
|
$sql.= " WHERE g.entity IS NOT NULL";
|
||||||
}
|
}
|
||||||
@@ -212,7 +212,7 @@ if ($canreadperms)
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$colspan=2;
|
$colspan=2;
|
||||||
if ($conf->multicompany->enabled) $colspan++;
|
if (! empty($conf->multicompany->enabled)) $colspan++;
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="'.$colspan.'">'.$langs->trans("LastGroupsCreated",($num ? $num : $max)).'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="'.$colspan.'">'.$langs->trans("LastGroupsCreated",($num ? $num : $max)).'</td></tr>';
|
||||||
@@ -231,7 +231,7 @@ if ($canreadperms)
|
|||||||
print img_picto($langs->trans("GlobalGroup"),'redstar');
|
print img_picto($langs->trans("GlobalGroup"),'redstar');
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
if ($conf->multicompany->enabled)
|
if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
$mc = new ActionsMulticompany($db);
|
$mc = new ActionsMulticompany($db);
|
||||||
$mc->getInfo($obj->entity);
|
$mc->getInfo($obj->entity);
|
||||||
@@ -259,5 +259,5 @@ print '</table>';
|
|||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|
||||||
llxFooter('$Date: 2011/08/20 09:03:38 $ - $Revision: 1.51 $');
|
llxFooter('$Date: 2011/08/21 10:01:37 $ - $Revision: 1.52 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
* \file htdocs/user/index.php
|
* \file htdocs/user/index.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief Page of users
|
* \brief Page of users
|
||||||
* \version $Id: index.php,v 1.54 2011/08/19 22:15:23 hregis Exp $
|
* \version $Id: index.php,v 1.55 2011/08/21 10:01:36 hregis Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
if($conf->multicompany->enabled) dol_include_once("/multicompany/class/actions_multicompany.class.php");
|
if(! empty($conf->multicompany->enabled)) dol_include_once("/multicompany/class/actions_multicompany.class.php");
|
||||||
|
|
||||||
|
|
||||||
if (! $user->rights->user->user->lire && ! $user->admin) accessforbidden();
|
if (! $user->rights->user->user->lire && ! $user->admin) accessforbidden();
|
||||||
@@ -69,7 +69,7 @@ $sql.= " u.ldap_sid, u.statut, u.entity,";
|
|||||||
$sql.= " s.nom, s.canvas";
|
$sql.= " s.nom, s.canvas";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid";
|
||||||
if($conf->multicompany->enabled && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && ! $user->entity)))
|
if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && ! $user->entity)))
|
||||||
{
|
{
|
||||||
$sql.= " WHERE u.entity IS NOT NULL";
|
$sql.= " WHERE u.entity IS NOT NULL";
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ if ($result)
|
|||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.'</a>';
|
print '<td><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.'</a>';
|
||||||
if ($conf->multicompany->enabled && $obj->admin && ! $obj->entity)
|
if (! empty($conf->multicompany->enabled) && $obj->admin && ! $obj->entity)
|
||||||
{
|
{
|
||||||
print img_picto($langs->trans("SuperAdministrator"),'redstar');
|
print img_picto($langs->trans("SuperAdministrator"),'redstar');
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ if ($result)
|
|||||||
$companystatic->canvas=$obj->canvas;
|
$companystatic->canvas=$obj->canvas;
|
||||||
print $companystatic->getNomUrl(1);
|
print $companystatic->getNomUrl(1);
|
||||||
}
|
}
|
||||||
else if ($conf->multicompany->enabled)
|
else if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
if ($obj->admin && ! $obj->entity)
|
if ($obj->admin && ! $obj->entity)
|
||||||
{
|
{
|
||||||
@@ -174,5 +174,5 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/08/19 22:15:23 $ - $Revision: 1.54 $');
|
llxFooter('$Date: 2011/08/21 10:01:36 $ - $Revision: 1.55 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user