From fa3fd6fd886320344eba9b593216557c57294a94 Mon Sep 17 00:00:00 2001 From: "tristan.champomier" Date: Thu, 1 Apr 2021 00:39:35 +0200 Subject: [PATCH] Moved HasLanding to HasPublic. More explicit. --- data/message/fr/adminnode.ini | 2 +- .../adminnode/actionadmin.mxt | 4 ++-- .../adminnode/updateadmin.mxt | 2 +- .../db_scripts/mysql/7_create_structure.sql | 2 +- lib/object_coordination/addcom/addcom.php | 2 +- .../adminnode/adminnode.php | 8 ++++---- lib/object_coordination/home/home.php | 8 +------- lib/system/system_data/node/node.php | 14 ++++++------- lib/system/system_data/node/nodemanager.php | 20 +++++++++---------- .../node/ressource/nodemanagerdb.php | 20 +++++++++---------- lib/system/system_data_model/treelist.php | 5 ----- lib/system/system_utils/lib_system.php | 9 +++++---- 12 files changed, 43 insertions(+), 53 deletions(-) diff --git a/data/message/fr/adminnode.ini b/data/message/fr/adminnode.ini index 8cdeb45..5d00891 100755 --- a/data/message/fr/adminnode.ini +++ b/data/message/fr/adminnode.ini @@ -40,7 +40,7 @@ txtNodeTypereg = "Type de structure" NodeEntry_typereg = "Type de structure" txtNodeDomain = "FQDN du domaine" NodeEntry_domain ="FQDN du domaine" -txtHasLandingPage = "Dispose d'une Landing Page" +txtHasPublicPage = "Dispose d'une Landing Page" TxtPictoNode = "Image de l'espace" txtNodeName = "Nom de l'espace" txtNodeTemplate = "Choisissez l'habillage pour l'espace" diff --git a/data/template/lcube6/object_coordination/adminnode/actionadmin.mxt b/data/template/lcube6/object_coordination/adminnode/actionadmin.mxt index 13900b9..9feeb8b 100755 --- a/data/template/lcube6/object_coordination/adminnode/actionadmin.mxt +++ b/data/template/lcube6/object_coordination/adminnode/actionadmin.mxt @@ -81,8 +81,8 @@
- - + + diff --git a/data/template/lcube6/object_coordination/adminnode/updateadmin.mxt b/data/template/lcube6/object_coordination/adminnode/updateadmin.mxt index c4a1d73..56f4709 100755 --- a/data/template/lcube6/object_coordination/adminnode/updateadmin.mxt +++ b/data/template/lcube6/object_coordination/adminnode/updateadmin.mxt @@ -102,7 +102,7 @@
- > + > diff --git a/install/db_scripts/mysql/7_create_structure.sql b/install/db_scripts/mysql/7_create_structure.sql index fe785aa..895fe56 100755 --- a/install/db_scripts/mysql/7_create_structure.sql +++ b/install/db_scripts/mysql/7_create_structure.sql @@ -253,7 +253,7 @@ CREATE TABLE `{_PREFIX_}node` ( `node_icone` varchar(200) NOT NULL DEFAULT '', `node_template` varchar(100) NOT NULL DEFAULT '', `node_domain` varchar(128) NOT NULL, - `node_haslanding` enum('on','off') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'off', + `node_haspublic` enum('on','off') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'off', `node_ctype` enum('default','gaming','asso') DEFAULT 'default', `node_ctypereg` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `node_usergroupid` int(3) DEFAULT 0, diff --git a/lib/object_coordination/addcom/addcom.php b/lib/object_coordination/addcom/addcom.php index 15723e4..f547c95 100755 --- a/lib/object_coordination/addcom/addcom.php +++ b/lib/object_coordination/addcom/addcom.php @@ -361,7 +361,7 @@ function execAdmin() $Node->setCType( ((isset($_POST["NodeEntry_type"])&&$_POST["NodeEntry_type"]!="#")?($_POST["NodeEntry_type"]):"default") ); $Node->setCTypereg( ((isset($_POST["NodeEntry_typereg"]))?($_POST["NodeEntry_typereg"]):"") ); $Node->setDomain( ((isset($_POST["NodeEntry_domain"]))?($_POST["NodeEntry_domain"]):"") ); - $Node->SetHasLanding( ((isset($_POST["haslanding"]))?($_POST["haslanding"]):0) ); + $Node->SetHasPublic( ((isset($_POST["haspublic"]))?($_POST["haspublic"]):0) ); $Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") ); // Récupération de la template!!! diff --git a/lib/object_coordination/adminnode/adminnode.php b/lib/object_coordination/adminnode/adminnode.php index a3acad9..75f297d 100755 --- a/lib/object_coordination/adminnode/adminnode.php +++ b/lib/object_coordination/adminnode/adminnode.php @@ -105,7 +105,7 @@ Class AdminNode extends CoordinationObj // $checked0=True; // } -// $GLOBALS['SYSTEM_TEMPLATE']->MxCheckerField("node_haslanding", "radio", "optList", 0, $checked0); +// $GLOBALS['SYSTEM_TEMPLATE']->MxCheckerField("node_haspublic", "radio", "optList", 0, $checked0); /* Creation du Tree d'admin */ $myTree =$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE"]->createInstance($nodeId); @@ -211,7 +211,7 @@ Class AdminNode extends CoordinationObj $Node->setCType( ( (isset($_POST["node_ctype"]) && ($_POST["node_ctype"]!="") )?($_POST["node_ctype"]):"default") ); $Node->setCTypereg( ((isset($_POST["node_ctypereg"]))?($_POST["node_ctypereg"]):"") ); $Node->setDomain( ((isset($_POST["node_domain"]))?($_POST["node_domain"]):"") ); - $Node->setHasLanding( ((isset($_POST["node_haslanding"]))?($_POST["node_haslanding"]):'off') ); + $Node->setHasPublic( ((isset($_POST["node_haspublic"]))?($_POST["node_haspublic"]):'off') ); // $Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") ); # Variables de configuration de l'objet @@ -376,7 +376,7 @@ Class AdminNode extends CoordinationObj $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.ctype", "text", "node_ctype", htmlentitiesconv($Node->getCType()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeType"), ENT_QUOTES)."\"", getMessage("txtNodeType")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.ctypereg", "text", "node_ctypereg", htmlentitiesconv($Node->getCTypereg()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeTypereg"), ENT_QUOTES)."\"", getMessage("txtNodeTypereg")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.domain", "text", "node_domain", htmlentitiesconv($Node->getDomain()), "class=\"form\" title=\"".htmlspecialchars(getMessage("txtNodeDomain"), ENT_QUOTES)."\"", getMessage("txtNodeDomain")); - $GLOBALS['SYSTEM_TEMPLATE']->MxText("ToHidde.node_haslanding_value", ($Node->getHasLanding()!="on")?"":" checked"); + $GLOBALS['SYSTEM_TEMPLATE']->MxText("ToHidde.node_haspublic_value", ($Node->getHasPublic()!="on")?"":" checked"); /* fin template */ for ($i=0; $isetCType( ((isset($_POST["node_ctype"]))?(htmlentitiesconv($_POST["node_ctype"])):"default") ); $Node->setCTypereg( ((isset($_POST["node_ctypereg"]))?(htmlentitiesconv($_POST["node_ctypereg"])):"") ); $Node->setDomain( ((isset($_POST["node_domain"]))?(htmlentitiesconv($_POST["node_domain"])):"") ); - $Node->setHasLanding( ((isset($_POST["node_haslanding"]))?($_POST["node_haslanding"]):'off') ); + $Node->setHasPublic( ((isset($_POST["node_haspublic"]))?($_POST["node_haspublic"]):'off') ); // $Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") ); // var_dump($Node); diff --git a/lib/object_coordination/home/home.php b/lib/object_coordination/home/home.php index 291bad2..8da488c 100755 --- a/lib/object_coordination/home/home.php +++ b/lib/object_coordination/home/home.php @@ -128,10 +128,7 @@ Class Home extends CoordinationObj $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlActionLogin", $url); $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("BtnEnter", getMessage("UserPrintEnter")); $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("titleButton", getMessage("tipUserPrintEnter")); -// $data=$GLOBALS['SYSTEM_TEMPLATE']->MxWrite(); - -// $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textinfo WHERE textinfo_id=".$this->getId(); -// $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunityPublic()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId(); + $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunity()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId(); # Execution de Requete (utilisation de la connexion systeme) $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql); @@ -140,7 +137,6 @@ Class Home extends CoordinationObj if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0) { $View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow(); -// $text = stripslashes($View['textinfo_text_'.$currentCode]); $text = stripslashes($View['textentrynode_text']); # Destruction des resultats $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult(); @@ -157,7 +153,6 @@ Class Home extends CoordinationObj withBlocPath("Home", "actionLectureInfo"); # Requete sur identifiant de l'objet de coordination correspondant -// $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunityPublic()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId(); $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".recupCommunity()." AND langue_id=".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId(); # Execution de Requete (utilisation de la connexion systeme) $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql); @@ -165,7 +160,6 @@ Class Home extends CoordinationObj if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0) { $View = $GLOBALS['SYSTEM_DATABASE_CONN']->sql_fetchrow(); -// $text = stripslashes($View['textinfo_text_'.$currentCode]); $text = stripslashes($View['textentrynode_text']); # Destruction des resultats $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult(); diff --git a/lib/system/system_data/node/node.php b/lib/system/system_data/node/node.php index 104e2af..daf6822 100755 --- a/lib/system/system_data/node/node.php +++ b/lib/system/system_data/node/node.php @@ -97,7 +97,7 @@ var $domain= null; * @var chaine * @desc chaine fqdn */ -var $haslanding= 0; +var $haspublic= 0; /** * @var chaine @@ -308,9 +308,9 @@ var $mailnode= null; * @access public * @return chaine libelle du Noeud */ - function getHasLanding() + function getHasPublic() { - return $this->haslanding; + return $this->haspublic; } /** @@ -319,9 +319,9 @@ var $mailnode= null; * @param chaine libelle (pas de code Html) * @return booleen */ - function setHasLanding($haslanding) + function setHasPublic($haspublic) { - $this->haslanding=$haslanding; + $this->haspublic=$haspublic; return true; } @@ -464,7 +464,7 @@ var $mailnode= null; * @param entier identifiant numérique du Node père * @param chaine libelle du Node */ - function doLoad($id, $idpere, $libelle, $icone, $template, $domain, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) + function doLoad($id, $idpere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) { $this->setId($id); $this->libelle->setSql($libelle); @@ -472,7 +472,7 @@ var $mailnode= null; $this->setIcone($icone); $this->setTemplate($template); $this->setDomain($domain); - $this->setHasLanding($haslanding); + $this->setHasPublic($haspublic); $this->setCType($ctype); $this->setCTypereg($ctypereg); $this->setUserGroupId($usergroupid); diff --git a/lib/system/system_data/node/nodemanager.php b/lib/system/system_data/node/nodemanager.php index f38a3f3..cd893fa 100755 --- a/lib/system/system_data/node/nodemanager.php +++ b/lib/system/system_data/node/nodemanager.php @@ -126,7 +126,7 @@ class NodeManager extends Manager * @abstract * @return entier */ - function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) + function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) { return 0; /* entier */ } @@ -143,7 +143,7 @@ class NodeManager extends Manager * @abstract * @return entier */ - function doInsert($idPere, $libelle, $icone, $template, $domain, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) + function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) { return true; } @@ -218,7 +218,7 @@ class NodeManager extends Manager * @access private * @return entier */ - function sourceInsert($idPere, $libelle, $icone, $template, $domain, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) + function sourceInsert($idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) { # Gestion d'un tableau intermediaire avec la reprise des elements if (!is_numeric($idPere)) @@ -230,7 +230,7 @@ class NodeManager extends Manager addError($systemError,$classe,$message, __line__, __file__); return false; } - return $this->doInsert($idPere, $libelle, $icone, $template, $domain, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode); + return $this->doInsert($idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode); } /** @@ -244,7 +244,7 @@ class NodeManager extends Manager * @access private * @return booleen */ - function sourceUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) + function sourceUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) { # Gestion d'un tableau intermediaire avec la reprise des elements if (!Is_numeric($id) || !is_numeric($idPere)) @@ -257,7 +257,7 @@ class NodeManager extends Manager return false; } - return $this->doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode); + return $this->doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode); } /** @@ -332,7 +332,7 @@ class NodeManager extends Manager if (is_array($tab) && isset($tab["id"]) && is_numeric($tab["id"])) { /* création et alimentation de l'objet */ - $return->doLoad($tab["id"], $tab["idpere"], $tab["libelle"], $tab["icone"], $tab["template"], $tab["domain"], $tab["haslanding"], $tab["ctype"], $tab["ctypereg"], $tab["usergroupid"], $tab["subsgroupid"], $tab["subsgrouptempid"], $tab["mailnode"]); + $return->doLoad($tab["id"], $tab["idpere"], $tab["libelle"], $tab["icone"], $tab["template"], $tab["domain"], $tab["haspublic"], $tab["ctype"], $tab["ctypereg"], $tab["usergroupid"], $tab["subsgroupid"], $tab["subsgrouptempid"], $tab["mailnode"]); }else{ $systemError=3; $classe="NodeManager"; @@ -368,7 +368,7 @@ class NodeManager extends Manager for ($i=0; $idoLoad($tab[$i]["id"], $tab[$i]["idpere"], $tab[$i]["libelle"], $tab[$i]["icone"], $tab[$i]["template"], $tab[$i]["domain"], $tab[$i]["haslanding"], $tab[$i]["ctype"], $tab[$i]["ctypereg"], $tab[$i]["usergroupid"], $tab[$i]["subsgroupid"], $tab[$i]["subsgrouptempid"], $tab[$i]["mailnode"]); + $return[$i]->doLoad($tab[$i]["id"], $tab[$i]["idpere"], $tab[$i]["libelle"], $tab[$i]["icone"], $tab[$i]["template"], $tab[$i]["domain"], $tab[$i]["haspublic"], $tab[$i]["ctype"], $tab[$i]["ctypereg"], $tab[$i]["usergroupid"], $tab[$i]["subsgroupid"], $tab[$i]["subsgrouptempid"], $tab[$i]["mailnode"]); } }else{ $systemError=3; @@ -431,7 +431,7 @@ class NodeManager extends Manager if ((strtolower(get_class($obj))=="node") && ($obj->isLoaded()==true)) { /* Récupération des infos */ - $id=$this->sourceUpdate($obj->getId(), $obj->getIdPere(), $obj->getXmlLibelle(), $obj->getIcone(), $obj->getTemplate(), $obj->getDomain(), $obj->getHasLanding(), $obj->getCType(), $obj->getCTypereg(), $obj->getUserGroupId(), $obj->getSubsGroupId(), $obj->getSubsGroupTempId(), $obj->getMailNode()); + $id=$this->sourceUpdate($obj->getId(), $obj->getIdPere(), $obj->getXmlLibelle(), $obj->getIcone(), $obj->getTemplate(), $obj->getDomain(), $obj->getHasPublic(), $obj->getCType(), $obj->getCTypereg(), $obj->getUserGroupId(), $obj->getSubsGroupId(), $obj->getSubsGroupTempId(), $obj->getMailNode()); $this->CallSystemPlugin("__updateNode", $obj); return $obj; } @@ -458,7 +458,7 @@ class NodeManager extends Manager if ($obj->isLoaded()==false) { /* Récupération des infos */ - $id=$this->sourceInsert($obj->getIdPere(), $obj->getXmlLibelle(), $obj->getIcone(), $obj->getTemplate(), $obj->getDomain(), $obj->getHasLanding(), $obj->getCType(), $obj->getCTypereg(), $obj->getUserGroupId(), $obj->getSubsGroupId(), $obj->getSubsGroupTempId(), $obj->getMailNode()); + $id=$this->sourceInsert($obj->getIdPere(), $obj->getXmlLibelle(), $obj->getIcone(), $obj->getTemplate(), $obj->getDomain(), $obj->getHasPublic(), $obj->getCType(), $obj->getCTypereg(), $obj->getUserGroupId(), $obj->getSubsGroupId(), $obj->getSubsGroupTempId(), $obj->getMailNode()); $obj->setId($id); $this->CallSystemPlugin("__insertNode", $obj); return $obj; diff --git a/lib/system/system_data/node/ressource/nodemanagerdb.php b/lib/system/system_data/node/ressource/nodemanagerdb.php index 51f215a..62e3177 100755 --- a/lib/system/system_data/node/ressource/nodemanagerdb.php +++ b/lib/system/system_data/node/ressource/nodemanagerdb.php @@ -194,7 +194,7 @@ var $conn = null; * @access private * @return entier */ - function doInsert($idPere, $libelle, $icone, $template, $domain, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) + function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) { $sql="INSERT INTO ".$this->getTable()." (" .$this->getSqlName("idpere").", " @@ -202,14 +202,14 @@ var $conn = null; .$this->getSqlName("icone").", " .$this->getSqlName("template").", " .$this->getSqlName("domain").", " - .$this->getSqlName("haslanding").", " + .$this->getSqlName("haspublic").", " .$this->getSqlName("ctype").", " .$this->getSqlName("ctypereg").", " .$this->getSqlName("usergroupid").", " .$this->getSqlName("subsgroupid").", " .$this->getSqlName("subsgrouptempid").", " .$this->getSqlName("mailnode").") VALUES ("; - $sql.="'".$idPere."', '".$libelle."', '".$icone."', '".$template."', '".$domain."', '".$haslanding."', '".$ctype."', '".$ctypereg."', '".$usergroupid."', '".$subsgroupid."', '".$subsgrouptempid."', '".$mailnode."')"; + $sql.="'".$idPere."', '".$libelle."', '".$icone."', '".$template."', '".$domain."', '".$haspublic."', '".$ctype."', '".$ctypereg."', '".$usergroupid."', '".$subsgroupid."', '".$subsgrouptempid."', '".$mailnode."')"; # Requete $result=$this->conn->sql_query($sql); @@ -237,7 +237,7 @@ var $conn = null; * @access private * @return booleen */ - function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haslanding, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) + function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode) { $sql="UPDATE ".$this->getTable()." SET " .$this->getSqlName("id")."='".$id."', " @@ -246,7 +246,7 @@ var $conn = null; .$this->getSqlName("icone")."='".$icone."', " .$this->getSqlName("template")."='".$template."', " .$this->getSqlName("domain")."='".$domain."', " - .$this->getSqlName("haslanding")."='".$haslanding."', " + .$this->getSqlName("haspublic")."='".$haspublic."', " .$this->getSqlName("ctype")."='".$ctype."', " .$this->getSqlName("ctypereg")."='".$ctypereg."', " .$this->getSqlName("usergroupid")."='".$usergroupid."', " @@ -305,8 +305,8 @@ var $conn = null; $sql = "SELECT * FROM ".$this->getTable()." WHERE ".$this->getSqlName("idpere")."=".$id; // $sql.= " AND ".$this->getSqlName("domain")."=".$_SERVER["SERVER_NAME"]; - if( $id >> 100 ) - $sql.= " AND ".$this->getSqlName("domain")."=".$_SERVER["SERVER_NAME"]; +// if( $id >> 100 ) +// $sql.= " AND ".$this->getSqlName("domain")."=".$_SERVER["SERVER_NAME"]; # Requete $result=$this->conn->sql_query($sql); @@ -346,7 +346,7 @@ var $conn = null; $result["icone"] =$sqlArray[$this->getSqlName("icone")]; $result["template"] =$sqlArray[$this->getSqlName("template")]; $result["domain"] =$sqlArray[$this->getSqlName("domain")]; - $result["haslanding"] =$sqlArray[$this->getSqlName("haslanding")]; + $result["haspublic"] =$sqlArray[$this->getSqlName("haspublic")]; $result["ctype"] =$sqlArray[$this->getSqlName("ctype")]; $result["ctypereg"] =$sqlArray[$this->getSqlName("ctypereg")]; $result["usergroupid"] =$sqlArray[$this->getSqlName("usergroupid")]; @@ -377,7 +377,7 @@ var $conn = null; $this->sqlAttributArray["icone"] ="node_icone"; $this->sqlAttributArray["template"] ="node_template"; $this->sqlAttributArray["domain"] ="node_domain"; - $this->sqlAttributArray["haslanding"] ="node_haslanding"; + $this->sqlAttributArray["haspublic"] ="node_haspublic"; $this->sqlAttributArray["ctype"] ="node_ctype"; $this->sqlAttributArray["ctypereg"] ="node_ctypereg"; $this->sqlAttributArray["usergroupid"] ="node_usergroupid"; @@ -393,7 +393,7 @@ var $conn = null; $this->sqlAttributArray["icone"] ="icone"; $this->sqlAttributArray["template"] ="template"; $this->sqlAttributArray["domain"] ="domain"; - $this->sqlAttributArray["haslanding"] ="haslanding"; + $this->sqlAttributArray["haspublic"] ="haspublic"; $this->sqlAttributArray["ctype"] ="ctype"; $this->sqlAttributArray["ctypereg"] ="ctypereg"; $this->sqlAttributArray["usergroupid"] ="usergroupid"; diff --git a/lib/system/system_data_model/treelist.php b/lib/system/system_data_model/treelist.php index 7ac7e08..3c9227f 100755 --- a/lib/system/system_data_model/treelist.php +++ b/lib/system/system_data_model/treelist.php @@ -235,17 +235,12 @@ var $tabTree = array(); $k=0; reset($this->tabTree); -// var_dump($this->tabTree); foreach($this->tabTree as $Tree) { -// var_dump("Tree ID: ".$Tree->getId()); -// var_dump("Domain: ".$Tree->getDomain($Tree->getId())); -// var_dump("HOST: ".$_SERVER["HTTP_HOST"]); if( $Tree->getDomain($Tree->getId()) === $_SERVER["HTTP_HOST"] ) $tab[]=$Tree->getId(); } -// var_dump($tab); return array_values(array_unique($tab)); } diff --git a/lib/system/system_utils/lib_system.php b/lib/system/system_utils/lib_system.php index 59755d9..4abe3f6 100755 --- a/lib/system/system_utils/lib_system.php +++ b/lib/system/system_utils/lib_system.php @@ -506,13 +506,14 @@ function systemPrint($data) $nodeId=NULL; for ($i=0; $itabSon); $i++) { - if( ($myTree->tabSon[$i]->getIdPere()==1) AND ($myTree->tabSon[$i]->getHasLanding()=="on") ) +// if( ($myTree->tabSon[$i]->getIdPere()==1) AND ($myTree->tabSon[$i]->getHasPublic()=="on") ) + if( ($myTree->tabSon[$i]->getDomain()==$domain) AND ($myTree->tabSon[$i]->getHasPublic()=="on") ) { - if( $myTree->tabSon[$i]->getDomain()==$domain ) - { +// if( $myTree->tabSon[$i]->getDomain()==$domain ) +// { $nodeId=$myTree->tabSon[$i]->getId(); break; - } +// } } } /* -- Fin Recup Communauté */