Fixed issue #17.

This commit is contained in:
Rooty 2020-12-11 20:48:24 +01:00
parent d95940b3d1
commit 0fc1b4680e

View File

@ -629,7 +629,7 @@ function exportAdmin()
withBlocPath("AdminUser", "ChangeUserAdmin");
/* Inclusion du package */
includePackage("pagingmanager.php");
// includePackage("pagingmanager.php");
/* Creation des tabulations */
$this->tabeCreate();
@ -650,15 +650,15 @@ function exportAdmin()
}
/* creation de la gestion de tranche */
$PagingManager = new PagingManager(0);
$localisation = $PagingManager->getCurrentLocalisation();
// $PagingManager = new PagingManager(0);
// $localisation = $PagingManager->getCurrentLocalisation();
/* Creation du Tree d'admin */
$myTreeGroup =$GLOBALS["SYSTEM_MANAGER"]["TREE_GROUP"]->createInstance($groupId);
/* Verification de l'existance du Tree */
if ( !is_object($myTreeGroup) ){
if ( $myTreeGroup->isLoaded()==false ){
systemRedirect(formatUrl($this->getId(),"AdminUser","actionAdmin","msgError").$localisation);
systemRedirect(formatUrl($this->getId(),"AdminUser","actionAdmin","msgError"));
return "WrongArgument";
}
}
@ -697,9 +697,9 @@ function exportAdmin()
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("user_id", $MyUser->getId());
# Récupération des étiquettes du formulaire
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"AdminUser","execChangeUserAdmin","",$param).$localisation);
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAddAction", formatUrl($this->getId(),"AdminUser","execAddGroupUserAdmin","",$param).$localisation);
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlReturn", formatUrl($this->GetId(),"AdminUser","actionAdmin").$localisation);
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"AdminUser","execChangeUserAdmin","",$param));
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAddAction", formatUrl($this->getId(),"AdminUser","execAddGroupUserAdmin","",$param));
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlReturn", formatUrl($this->GetId(),"AdminUser","actionAdmin"));
printTabTreeGroup($tabTreeGroup, $groupId, "GROUP");
/* recuperation des id administrables */
@ -734,7 +734,7 @@ function exportAdmin()
}
$lib = $treeGroup;
$GLOBALS['SYSTEM_TEMPLATE']->MxText("GROUP_USER.GroupName", $lib);
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("GROUP_USER.GROUP_DELETE.urlDelete", formatUrl($this->getId(), "AdminUser", "deleteGroupUserAdmin")."&groupUserId=".$tabGroupUser[$j]->getId().$localisation );
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("GROUP_USER.GROUP_DELETE.urlDelete", formatUrl($this->getId(), "AdminUser", "deleteGroupUserAdmin")."&groupUserId=".$tabGroupUser[$j]->getId() );
$GLOBALS['SYSTEM_TEMPLATE']->MxText("GROUP_USER.GROUP_DELETE.BtnDelete", getMessage("BtnDelete") );
$GLOBALS['SYSTEM_TEMPLATE']->MxText("GROUP_USER.GROUP_DELETE.imgPath", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']);
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("GROUP_USER", "loop");
@ -758,7 +758,7 @@ function exportAdmin()
function execChangeUserAdmin()
{
/* Inclusion du package */
includePackage("pagingmanager.php");
// includePackage("pagingmanager.php");
global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
@ -771,8 +771,8 @@ function exportAdmin()
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
/* fin récupération des codes par defaut */
$PagingManager = new PagingManager(0);
$localisation = $PagingManager->getCurrentLocalisation();
// $PagingManager = new PagingManager(0);
// $localisation = $PagingManager->getCurrentLocalisation();
/* Creation du Tree d'admin */
$myTreeGroup =$GLOBALS["SYSTEM_MANAGER"]["TREE_GROUP"]->createInstance($groupId);
@ -983,14 +983,14 @@ function exportAdmin()
withBlocPath("AdminUser", "deletegroupuseradmin");
/* Inclusion du package */
includePackage("pagingmanager.php");
// includePackage("pagingmanager.php");
/*Récupération des messages utilisateurs*/
addMessageFile("user.ini");
$this->tabeCreate();
$PagingManager = new PagingManager(0);
$localisation = $PagingManager->getCurrentLocalisation();
// $PagingManager = new PagingManager(0);
// $localisation = $PagingManager->getCurrentLocalisation();
$groupId =($this->getData("groupId")!="")?$this->getData("groupId"):1;
$groupUserId =(isset($_GET["groupUserId"]) && is_numeric($_GET["groupUserId"]))?$_GET["groupUserId"]:0;
@ -1061,10 +1061,10 @@ function exportAdmin()
$groupUserId =(isset($_GET["groupUserId"]) && is_numeric($_GET["groupUserId"]))?$_GET["groupUserId"]:0;
/* Inclusion du package */
includePackage("pagingmanager.php");
// includePackage("pagingmanager.php");
$PagingManager = new PagingManager(0);
$localisation = $PagingManager->getCurrentLocalisation();
// $PagingManager = new PagingManager(0);
// $localisation = $PagingManager->getCurrentLocalisation();
if ($groupUserId==0)
{
systemRedirect(formatUrl($this->getId(),"AdminUser","actionAdmin","wrongArgument").$localisation);
@ -1131,7 +1131,7 @@ function exportAdmin()
function execAddGroupUserAdmin()
{
/* Inclusion du package */
includePackage("pagingmanager.php");
// includePackage("pagingmanager.php");
/* Récupération du noeud à administrer sinon noeud d'entrée de l'admin */
$groupId =($this->getData("groupId")!="")?$this->getData("groupId"):1;
@ -1148,8 +1148,8 @@ function exportAdmin()
}
// --> recuperation du treeNode correspondant au noeurd
$tabTreeGroup[0]=$myTreeGroup; //--> treeNodeUnique....
$PagingManager = new PagingManager(0);
$localisation = $PagingManager->getCurrentLocalisation();
// $PagingManager = new PagingManager(0);
// $localisation = $PagingManager->getCurrentLocalisation();
if ( (in_array( $group_id, $myTreeGroup->getSonArray() )) || ($group_id==$myTreeGroup->getId()) )
{