Added List Public attribute. This attribute defines if community is publicly visible or not

This commit is contained in:
Rooty 2021-09-12 07:06:58 +02:00
parent 68be01761f
commit 8e65d66d78
5 changed files with 67 additions and 26 deletions

View File

@ -34,6 +34,7 @@ TxtTemplateChoice = "Template par défaut"
TxtTemplateChoiceNode = "Template de l'espace"
TxtTemplateAvailNode = "Template(s) disponible(s) pour l'espace :"
txtNodeEntryName = "Nom de la communauté"
txtCommPublicList = "Liste publique"
TxtNodeIn = "Créer dans l'espace"
txtNodeType = "Type d'espace"
NodeEntry_type = "Type d'espace"

View File

@ -33,7 +33,14 @@ TxtDetailsComm = "Descriptions de la communauté"
TxtTemplateChoice = "Template par défaut"
TxtTemplateChoiceNode = "Template de l'espace"
TxtTemplateAvailNode = "Template(s) disponible(s) pour l'espace :"
txtCommunityIcon = "Icône de la communauté"
txtNodeEntryName = "Nom de la communauté"
txtHasPublicPage = "Page publique"
comm_haspublicpage_sEnabled = "Activé"
user_haspublicpage_sDisabled = "Désactivé"
txtCommPublicList = "Liste publique"
comm_public_sEnabled = "Activé"
user_public_sDisabled = "Désactivé"
TxtNodeIn = "Créer dans l'espace"
txtNodeType = "Type d'espace"
NodeEntry_type = "Type d'espace"
@ -41,7 +48,6 @@ txtNodeTypereg = "Type de structure"
NodeEntry_typereg = "Type de structure"
txtNodeDomain = "FQDN du domaine"
NodeEntry_domain ="FQDN du domaine"
txtHasPublicPage = "Dispose d'une Landing Page"
TxtPictoNode = "Image de l'espace"
txtNodeName = "Nom de l'espace"
txtNodeTemplate = "Choisissez l'habillage pour l'espace"

View File

@ -97,7 +97,13 @@ var $domain= null;
* @var chaine
* @desc chaine fqdn
*/
var $haspublic= 0;
var $haspublicpage= 0;
/**
* @var chaine
* @desc chaine fqdn
*/
var $listpublic= 0;
/**
* @var chaine
@ -308,9 +314,9 @@ var $mailnode= null;
* @access public
* @return chaine libelle du Noeud
*/
function getHasPublic()
function getHasPublicPage()
{
return $this->haspublic;
return $this->haspublicpage;
}
/**
@ -319,12 +325,34 @@ var $mailnode= null;
* @param chaine libelle (pas de code Html)
* @return booleen
*/
function setHasPublic($haspublic)
function setHasPublicPage($haspublicpage)
{
$this->haspublic=$haspublic;
$this->haspublicpage=$haspublicpage;
return true;
}
/**
* "getteur" de l'attribut liste publique.
* @access public
* @return chaine libelle du Noeud
*/
function getListPublic()
{
return $this->listpublic;
}
/**
* "setteur" de l'attribut liste publique.
* @access public
* @param chaine libelle (pas de code Html)
* @return booleen
*/
function setListPublic($listpublic)
{
$this->listpublic=$listpublic;
return true;
}
/**
* "getteur" de l'attribut type.
* @access public
@ -464,7 +492,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, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
function doLoad($id, $idpere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{
$this->setId($id);
$this->libelle->setSql($libelle);
@ -472,7 +500,8 @@ var $mailnode= null;
$this->setIcone($icone);
$this->setTemplate($template);
$this->setDomain($domain);
$this->setHasPublic($haspublic);
$this->setHasPublicPage($haspublicpage);
$this->setListPublic($listpublic);
$this->setCType($ctype);
$this->setCTypereg($ctypereg);
$this->setUserGroupId($usergroupid);

View File

@ -126,7 +126,7 @@ class NodeManager extends Manager
* @abstract
* @return entier
*/
function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $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, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $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, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
function sourceInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $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, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode);
return $this->doInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $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, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
function sourceUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $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, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode);
return $this->doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $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["haspublic"], $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["haspublicpage"], $tab["listpublic"], $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; $i<count($tab); $i++)
{
$return[$i]=new Node();
$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"]);
$return[$i]->doLoad($tab[$i]["id"], $tab[$i]["idpere"], $tab[$i]["libelle"], $tab[$i]["icone"], $tab[$i]["template"], $tab[$i]["domain"], $tab[$i]["haspublicpage"], $tab[$i]["listpublic"], $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->getHasPublic(), $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->getHasPublicPage(), $obj->getListPublic(), $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->getHasPublic(), $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->getHasPublicPage(), $obj->getListPublic(), $obj->getCType(), $obj->getCTypereg(), $obj->getUserGroupId(), $obj->getSubsGroupId(), $obj->getSubsGroupTempId(), $obj->getMailNode());
$obj->setId($id);
$this->CallSystemPlugin("__insertNode", $obj);
return $obj;

View File

@ -194,7 +194,7 @@ var $conn = null;
* @access private
* @return entier
*/
function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
function doInsert($idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{
$sql="INSERT INTO ".$this->getTable()." ("
.$this->getSqlName("idpere").", "
@ -202,14 +202,15 @@ var $conn = null;
.$this->getSqlName("icone").", "
.$this->getSqlName("template").", "
.$this->getSqlName("domain").", "
.$this->getSqlName("haspublic").", "
.$this->getSqlName("haspublicpage").", "
.$this->getSqlName("listpublic").", "
.$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."', '".$haspublic."', '".$ctype."', '".$ctypereg."', '".$usergroupid."', '".$subsgroupid."', '".$subsgrouptempid."', '".$mailnode."')";
$sql.="'".$idPere."', '".$libelle."', '".$icone."', '".$template."', '".$domain."', '".$haspublicpage."', '".$listpublic."', '".$ctype."', '".$ctypereg."', '".$usergroupid."', '".$subsgroupid."', '".$subsgrouptempid."', '".$mailnode."')";
# Requete
$result=$this->conn->sql_query($sql);
@ -237,7 +238,7 @@ var $conn = null;
* @access private
* @return booleen
*/
function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
function doUpdate($id, $idPere, $libelle, $icone, $template, $domain, $haspublicpage, $listpublic, $ctype, $ctypereg, $usergroupid, $subsgroupid, $subsgrouptempid, $mailnode)
{
$sql="UPDATE ".$this->getTable()." SET "
.$this->getSqlName("id")."='".$id."', "
@ -246,7 +247,8 @@ var $conn = null;
.$this->getSqlName("icone")."='".$icone."', "
.$this->getSqlName("template")."='".$template."', "
.$this->getSqlName("domain")."='".$domain."', "
.$this->getSqlName("haspublic")."='".$haspublic."', "
.$this->getSqlName("haspublicpage")."='".$haspublicpage."', "
.$this->getSqlName("listpublic")."='".$listpublic."', "
.$this->getSqlName("ctype")."='".$ctype."', "
.$this->getSqlName("ctypereg")."='".$ctypereg."', "
.$this->getSqlName("usergroupid")."='".$usergroupid."', "
@ -346,7 +348,8 @@ var $conn = null;
$result["icone"] =$sqlArray[$this->getSqlName("icone")];
$result["template"] =$sqlArray[$this->getSqlName("template")];
$result["domain"] =$sqlArray[$this->getSqlName("domain")];
$result["haspublic"] =$sqlArray[$this->getSqlName("haspublic")];
$result["haspublicpage"] =$sqlArray[$this->getSqlName("haspublicpage")];
$result["listpublic"] =$sqlArray[$this->getSqlName("listpublic")];
$result["ctype"] =$sqlArray[$this->getSqlName("ctype")];
$result["ctypereg"] =$sqlArray[$this->getSqlName("ctypereg")];
$result["usergroupid"] =$sqlArray[$this->getSqlName("usergroupid")];
@ -377,7 +380,8 @@ var $conn = null;
$this->sqlAttributArray["icone"] ="node_icone";
$this->sqlAttributArray["template"] ="node_template";
$this->sqlAttributArray["domain"] ="node_domain";
$this->sqlAttributArray["haspublic"] ="node_haspublic";
$this->sqlAttributArray["haspublicpage"] ="node_haspublicpage";
$this->sqlAttributArray["listpublic"] ="node_listpublic";
$this->sqlAttributArray["ctype"] ="node_ctype";
$this->sqlAttributArray["ctypereg"] ="node_ctypereg";
$this->sqlAttributArray["usergroupid"] ="node_usergroupid";
@ -393,7 +397,8 @@ var $conn = null;
$this->sqlAttributArray["icone"] ="icone";
$this->sqlAttributArray["template"] ="template";
$this->sqlAttributArray["domain"] ="domain";
$this->sqlAttributArray["haspublic"] ="haspublic";
$this->sqlAttributArray["haspublicpage"] ="haspublicpage";
$this->sqlAttributArray["listpublic"] ="listpublic";
$this->sqlAttributArray["ctype"] ="ctype";
$this->sqlAttributArray["ctypereg"] ="ctypereg";
$this->sqlAttributArray["usergroupid"] ="usergroupid";