Added git social link in navigationprint class. Modified qware template.
This commit is contained in:
parent
959b91502c
commit
df21aff1ed
@ -46,6 +46,8 @@ struct_type = "Type de structure"
|
||||
|
||||
tipEmail = "Courriel"
|
||||
node_email = "Adresse courriel"
|
||||
tipGit = "Dépôt Git"
|
||||
node_git = "Adresse dépôt Git"
|
||||
tipMastodon = "Mastodon"
|
||||
node_mastodon = "URL page Mastodon"
|
||||
tipMobilizon = "Mobilizon"
|
||||
|
@ -12,6 +12,7 @@
|
||||
<mx:bloc id="blocSLinks">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<mx:bloc id="linkEmail"><li class="nav-item"><a class="nav-link envelope" mXattribut="href:email" target="_blank"><i class="fa fa-lg fa-envelope"></i></a></li></mx:bloc id="linkEmail">
|
||||
<mx:bloc id="linkGit"><li class="nav-item"><a class="nav-link git" mXattribut="href:git" target="_blank"><i class="fa fa-lg fa-gitea"></i></a></li></mx:bloc id="linkGit">
|
||||
<mx:bloc id="linkMastodon"><li class="nav-item"><a class="nav-link mastodon" mXattribut="href:mastodon" target="_blank"><i class="fa fa-lg fa-mastodon"></i></a></li></mx:bloc id="linkMastodon">
|
||||
<mx:bloc id="linkMobilizon"><li class="nav-item"><a class="nav-link mobilizon" mXattribut="href:mobilizon" target="_blank"><i class="fa fa-lg fa-activitypub"></i></a></li></mx:bloc id="linkMobilizon">
|
||||
<mx:bloc id="linkMatrix"><li class="nav-item"><a class="nav-link matrix" mXattribut="href:matrix" target="_blank"><i class="fa fa-lg fa-matrix-org"></i></a></li></mx:bloc id="linkMatrix">
|
||||
|
@ -12,6 +12,7 @@
|
||||
<mx:bloc id="blocSLinks">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<mx:bloc id="linkEmail"><li class="nav-item"><a class="nav-link envelope" mXattribut="href:email" target="_blank"><i class="fa fa-lg fa-envelope"></i></a></li></mx:bloc id="linkEmail">
|
||||
<mx:bloc id="linkGit"><li class="nav-item"><a class="nav-link git" mXattribut="href:git" target="_blank"><i class="fa fa-lg fa-gitea"></i></a></li></mx:bloc id="linkGit">
|
||||
<mx:bloc id="linkMastodon"><li class="nav-item"><a class="nav-link mastodon" mXattribut="href:mastodon" target="_blank"><i class="fa fa-lg fa-mastodon"></i></a></li></mx:bloc id="linkMastodon">
|
||||
<mx:bloc id="linkMobilizon"><li class="nav-item"><a class="nav-link mobilizon" mXattribut="href:mobilizon" target="_blank"><i class="fa fa-lg fa-activitypub"></i></a></li></mx:bloc id="linkMobilizon">
|
||||
<mx:bloc id="linkMatrix"><li class="nav-item"><a class="nav-link matrix" mXattribut="href:matrix" target="_blank"><i class="fa fa-lg fa-matrix-org"></i></a></li></mx:bloc id="linkMatrix">
|
||||
|
@ -59,6 +59,12 @@
|
||||
</div>
|
||||
<mx:formField id="node_email" id="node_email"/>
|
||||
</div>
|
||||
<div class="input-group col-xs-12 col-sm-3 col-lg-3 justify-content-center">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-gitea"></i></span>
|
||||
</div>
|
||||
<mx:formField id="node_git" id="node_git"/>
|
||||
</div>
|
||||
<div class="input-group col-xs-12 col-sm-3 col-lg-3 justify-content-center">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-mastodon"></i></span>
|
||||
@ -71,14 +77,14 @@
|
||||
</div>
|
||||
<mx:formField id="node_mobilizon" id="node_mobilizon"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 w-100">
|
||||
<div class="input-group col-xs-12 col-sm-3 col-lg-3 justify-content-center">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-matrix-org"></i></span>
|
||||
</div>
|
||||
<mx:formField id="node_matrix" id="node_matrix"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 w-100">
|
||||
<div class="input-group col-xs-12 col-sm-3 col-lg-3 justify-content-center">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-peertube"></i></span>
|
||||
@ -97,6 +103,8 @@
|
||||
</div>
|
||||
<mx:formField id="node_twitter" id="node_twitter"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 w-100">
|
||||
<div class="input-group col-xs-12 col-sm-3 col-lg-3 justify-content-center">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-facebook"></i></span>
|
||||
|
@ -123,6 +123,12 @@
|
||||
</div>
|
||||
<mx:formField id="node_email" id="node_email"/>
|
||||
</div>
|
||||
<div class="input-group col-xs-12 col-sm-3 col-lg-3 justify-content-center">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-gitea"></i></span>
|
||||
</div>
|
||||
<mx:formField id="node_git" id="node_git"/>
|
||||
</div>
|
||||
<div class="input-group col-xs-12 col-sm-3 col-lg-3 justify-content-center">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-mastodon"></i></span>
|
||||
@ -135,14 +141,14 @@
|
||||
</div>
|
||||
<mx:formField id="node_mobilizon" id="node_mobilizon"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 w-100">
|
||||
<div class="input-group col-xs-12 col-sm-3 col-lg-3 justify-content-center">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-matrix-org"></i></span>
|
||||
</div>
|
||||
<mx:formField id="node_matrix" id="node_matrix"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 w-100">
|
||||
<div class="input-group col-xs-12 col-sm-3 col-lg-3 justify-content-center">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-peertube"></i></span>
|
||||
@ -168,6 +174,14 @@
|
||||
<mx:formField id="node_facebook" id="node_facebook"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 w-100">
|
||||
<div class="input-group col-xs-12 col-sm-3 col-lg-3 justify-content-center">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-facebook"></i></span>
|
||||
</div>
|
||||
<mx:formField id="node_facebook" id="node_facebook"/>
|
||||
</div>
|
||||
</git>
|
||||
</div>
|
||||
</div>
|
||||
</mx:bloc id="blocSettings">
|
||||
|
@ -12,6 +12,7 @@
|
||||
<mx:bloc id="blocSLinks">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<mx:bloc id="linkEmail"><li class="nav-item"><a class="nav-link envelope" mXattribut="href:email" target="_blank"><i class="fa fa-lg fa-envelope"></i></a></li></mx:bloc id="linkEmail">
|
||||
<mx:bloc id="linkGit"><li class="nav-item"><a class="nav-link git" mXattribut="href:git" target="_blank"><i class="fa fa-lg fa-gitea"></i></a></li></mx:bloc id="linkGit">
|
||||
<mx:bloc id="linkMastodon"><li class="nav-item"><a class="nav-link mastodon" mXattribut="href:mastodon" target="_blank"><i class="fa fa-lg fa-mastodon"></i></a></li></mx:bloc id="linkMastodon">
|
||||
<mx:bloc id="linkMobilizon"><li class="nav-item"><a class="nav-link mobilizon" mXattribut="href:mobilizon" target="_blank"><i class="fa fa-lg fa-activitypub"></i></a></li></mx:bloc id="linkMobilizon">
|
||||
<mx:bloc id="linkMatrix"><li class="nav-item"><a class="nav-link matrix" mXattribut="href:matrix" target="_blank"><i class="fa fa-lg fa-matrix-org"></i></a></li></mx:bloc id="linkMatrix">
|
||||
|
@ -269,6 +269,7 @@ CREATE TABLE `{_PREFIX_}node` (
|
||||
CREATE TABLE `{_PREFIX_}nodesettings` (
|
||||
`node_id` int(4) NOT NULL,
|
||||
`node_email` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`node_git` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`node_mastodon` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`node_mobilizon` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`node_matrix` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
|
@ -112,6 +112,7 @@ var $tabForbidden=array("adminentrynode", "admingroup", "adminnode", "home", "ad
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("NodeEntry_domain", "text", "NodeEntry_domain","", "class=\"form\" required=\"true\"", getMessage("txtNodeDomain"));
|
||||
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("node_email", "text", "node_email", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipEmail"), ENT_QUOTES)."\"", getMessage("node_email"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("node_git", "text", "node_git", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipGit"), ENT_QUOTES)."\"", getMessage("node_git"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("node_mastodon", "text", "node_mastodon", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMastodon"), ENT_QUOTES)."\"", getMessage("node_mastodon"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("node_mobilizon", "text", "node_mobilizon", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMobilizon"), ENT_QUOTES)."\"", getMessage("node_mobilizon"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("node_matrix", "text", "node_matrix", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMatrix"), ENT_QUOTES)."\"", getMessage("node_matrix"));
|
||||
@ -152,6 +153,7 @@ var $tabForbidden=array("adminentrynode", "admingroup", "adminnode", "home", "ad
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("NodeEntry_domain", "text", "NodeEntry_domain",$_POST['NodeEntry_domain'], "class=\"form\" required=\"true\"", getMessage("txtNodeDomain"));
|
||||
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("node_email", "text", "node_email", $_POST['node_email'], "class=\"form\" title=\"".htmlspecialchars(getMessage("tipEmail"), ENT_QUOTES)."\"", getMessage("node_email"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("node_git", "text", "node_git", $_POST['node_git'], "class=\"form\" title=\"".htmlspecialchars(getMessage("tipGit"), ENT_QUOTES)."\"", getMessage("node_git"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("node_mastodon", "text", "node_mastodon", $_POST['node_mastodon'], "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMastodon"), ENT_QUOTES)."\"", getMessage("node_mastodon"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("node_mobilizon", "text", "node_mobilizon", $_POST['node_mobilizon'], "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMobilizon"), ENT_QUOTES)."\"", getMessage("node_mobilizon"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("node_matrix", "text", "node_matrix", $_POST['node_matrix'], "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMatrix"), ENT_QUOTES)."\"", getMessage("node_matrix"));
|
||||
@ -297,7 +299,7 @@ function execAdmin()
|
||||
{
|
||||
foreach($_POST as $cle=>$val)
|
||||
{
|
||||
if($val=="" && ($cle !="node_mastodon" && $cle !="node_mobilizon" && $cle !="node_matrix" && $cle !="node_peertube" && $cle !="node_nextcloud" && $cle !="node_twitter" && $cle !="node_facebook" && $cle !="user_title" && $cle !="user_first_name" && $cle !="user_last_name" && $cle !="user_postal_code" && $cle !="user_postal_address" && $cle !="user_city" && $cle !="user_state" && $cle !="NodeEntry_type" && $cle !="NodeEntry_typereg" && $cle !="user_tel" && $cle !="user_fax" && $cle !="user_mastodon" && $cle !="user_jabber" && $cle !="user_facebook" && $cle !="user_msn" && $cle !="user_website" && $cle="contentResumeInfos" && $cle="contentTextInfos" && $cle !="MAX_FILE_SIZE" && $cle !="uploadFileLogo" && $cle !="uploadFileFavicon" && $cle !="uploadFile" && $cle !="files"))
|
||||
if($val=="" && ($cle !="node_git" && $cle !="node_mastodon" && $cle !="node_mobilizon" && $cle !="node_matrix" && $cle !="node_peertube" && $cle !="node_nextcloud" && $cle !="node_twitter" && $cle !="node_facebook" && $cle !="user_title" && $cle !="user_first_name" && $cle !="user_last_name" && $cle !="user_postal_code" && $cle !="user_postal_address" && $cle !="user_city" && $cle !="user_state" && $cle !="NodeEntry_type" && $cle !="NodeEntry_typereg" && $cle !="user_tel" && $cle !="user_fax" && $cle !="user_mastodon" && $cle !="user_jabber" && $cle !="user_facebook" && $cle !="user_msn" && $cle !="user_website" && $cle="contentResumeInfos" && $cle="contentTextInfos" && $cle !="MAX_FILE_SIZE" && $cle !="uploadFileLogo" && $cle !="uploadFileFavicon" && $cle !="uploadFile" && $cle !="files"))
|
||||
{
|
||||
$chaine .= getMessage($cle).", ";
|
||||
}
|
||||
@ -392,6 +394,7 @@ function execAdmin()
|
||||
$Node->setMailNode( ((isset($_POST["user_mail"]))?($_POST["user_mail"]):"") );
|
||||
|
||||
$NodeSettings->SetEmail( ((isset($_POST["node_email"]))?($_POST["node_email"]):"") );
|
||||
$NodeSettings->SetGit( ((isset($_POST["node_git"]))?($_POST["node_git"]):"") );
|
||||
$NodeSettings->setMastodon( ((isset($_POST["node_mastodon"]))?($_POST["node_mastodon"]):"") );
|
||||
$NodeSettings->setMobilizon( ((isset($_POST["node_mobilizon"]))?($_POST["node_mobilizon"]):"") );
|
||||
$NodeSettings->setMatrix( ((isset($_POST["node_matrix"]))?($_POST["node_matrix"]):"") );
|
||||
|
@ -408,6 +408,7 @@ Class AdminNode extends CoordinationObj
|
||||
$NodeSettings=$GLOBALS["SYSTEM_MANAGER"]["NODESETTINGS"]->createInstance($node_Id1);
|
||||
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_email", "text", "node_email", htmlentitiesconv($NodeSettings->getEmail()), "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipEmail"), ENT_QUOTES)."\"", getMessage("node_email"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_git", "text", "node_git", htmlentitiesconv($NodeSettings->getGit()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipGit"), ENT_QUOTES)."\"", getMessage("node_git"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_mastodon", "text", "node_mastodon", htmlentitiesconv($NodeSettings->getMastodon()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMastodon"), ENT_QUOTES)."\"", getMessage("node_mastodon"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_mobilizon", "text", "node_mobilizon", htmlentitiesconv($NodeSettings->getMobilizon()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMobilizon"), ENT_QUOTES)."\"", getMessage("node_mobilizon"));
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("ToHidde.blocSettings.node_matrix", "text", "node_matrix", htmlentitiesconv($NodeSettings->getMatrix()), "class=\"form\" title=\"".htmlspecialchars(getMessage("tipMatrix"), ENT_QUOTES)."\"", getMessage("node_matrix"));
|
||||
@ -499,6 +500,7 @@ Class AdminNode extends CoordinationObj
|
||||
{
|
||||
$NodeSettings=$GLOBALS["SYSTEM_MANAGER"]["NODESETTINGS"]->createInstance($node_id);
|
||||
$NodeSettings->setEmail( ((isset($_POST["node_email"]))?(htmlentitiesconv($_POST["node_email"])):"") );
|
||||
$NodeSettings->setGit( ((isset($_POST["node_git"]))?(htmlentitiesconv($_POST["node_git"])):"") );
|
||||
$NodeSettings->setMastodon( ((isset($_POST["node_mastodon"]))?(htmlentitiesconv($_POST["node_mastodon"])):"") );
|
||||
$NodeSettings->setMobilizon( ((isset($_POST["node_mobilizon"]))?(htmlentitiesconv($_POST["node_mobilizon"])):"") );
|
||||
$NodeSettings->setMatrix( ((isset($_POST["node_matrix"]))?(htmlentitiesconv($_POST["node_matrix"])):"") );
|
||||
|
@ -97,6 +97,8 @@ class NavigationPrint extends Printing
|
||||
|
||||
/* Link Email */
|
||||
if( $NodeSettings->getEmail() && $NodeSettings->getEmail()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkEmail.email", "mailto:".$NodeSettings->getEmail()); } else $MaTemplate->MxBloc("blocSLinks.linkEmail", "DELETE");
|
||||
/* Link Git */
|
||||
if( $NodeSettings->getGit() && $NodeSettings->getGit()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkGit.git", $NodeSettings->getGit()); } else $MaTemplate->MxBloc("blocSLinks.linkGit", "DELETE");
|
||||
/* Link Mastodon */
|
||||
if( $NodeSettings->getMastodon() && $NodeSettings->getMastodon()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkMastodon.mastodon", $NodeSettings->getMastodon()); } else $MaTemplate->MxBloc("blocSLinks.linkMastodon", "DELETE");
|
||||
/* Link Mobilizon */
|
||||
|
@ -69,6 +69,12 @@ var $id = null;
|
||||
*/
|
||||
var $email = null;
|
||||
|
||||
/**
|
||||
* @var chaine
|
||||
* @desc chaine email
|
||||
*/
|
||||
var $git = null;
|
||||
|
||||
/**
|
||||
* @var chaine
|
||||
* @desc chaine mastodon
|
||||
@ -173,6 +179,31 @@ var $facebook= null;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* "getteur" de l'attribut git
|
||||
* @access public
|
||||
* @return chaine git
|
||||
*/
|
||||
function getGit()
|
||||
{
|
||||
return $this->git;
|
||||
}
|
||||
|
||||
/**
|
||||
* "setteur" de l'attribut git
|
||||
* @access public
|
||||
* @param chaine git
|
||||
* @return booleen
|
||||
*/
|
||||
function setGit($git)
|
||||
{
|
||||
if (!is_string($git))
|
||||
return false;
|
||||
|
||||
$this->git=$git;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* "getteur" de l'attribut Mastodon.
|
||||
* @access public
|
||||
@ -356,10 +387,11 @@ var $facebook= null;
|
||||
* @param entier identifiant numérique du Node
|
||||
* @param chaine libelle du NodeSettings
|
||||
*/
|
||||
function doLoad($id, $email, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
function doLoad($id, $email, $git, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
{
|
||||
$this->setId($id);
|
||||
$this->setEmail($email);
|
||||
$this->setGit($git);
|
||||
$this->setMastodon($mastodon);
|
||||
$this->setMobilizon($mobilizon);
|
||||
$this->setMatrix($matrix);
|
||||
|
@ -111,7 +111,7 @@ class NodeSettingsManager extends Manager
|
||||
* @abstract
|
||||
* @return entier
|
||||
*/
|
||||
function doUpdate($id, $email, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
function doUpdate($id, $email, $git, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
{
|
||||
return 0; /* entier */
|
||||
}
|
||||
@ -128,7 +128,7 @@ class NodeSettingsManager extends Manager
|
||||
* @abstract
|
||||
* @return entier
|
||||
*/
|
||||
function doInsert($email, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
function doInsert($email, $git, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -203,7 +203,7 @@ class NodeSettingsManager extends Manager
|
||||
* @access private
|
||||
* @return entier
|
||||
*/
|
||||
function sourceInsert($id, $email, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
function sourceInsert($id, $email, $git, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
{
|
||||
# Gestion d'un tableau intermediaire avec la reprise des elements
|
||||
if (!is_numeric($id))
|
||||
@ -215,7 +215,7 @@ class NodeSettingsManager extends Manager
|
||||
addError($systemError,$classe,$message, __line__, __file__);
|
||||
return false;
|
||||
}
|
||||
return $this->doInsert($id, $email, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook);
|
||||
return $this->doInsert($id, $email, $git, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -229,7 +229,7 @@ class NodeSettingsManager extends Manager
|
||||
* @access private
|
||||
* @return booleen
|
||||
*/
|
||||
function sourceUpdate($id, $email, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
function sourceUpdate($id, $email, $git, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
{
|
||||
# Gestion d'un tableau intermediaire avec la reprise des elements
|
||||
if (!Is_numeric($id))
|
||||
@ -242,7 +242,7 @@ class NodeSettingsManager extends Manager
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->doUpdate($id, $email, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook);
|
||||
return $this->doUpdate($id, $email, $git, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -290,7 +290,7 @@ class NodeSettingsManager 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["email"], $tab["mastodon"], $tab["mobilizon"], $tab["matrix"], $tab["peertube"], $tab["nextcloud"], $tab["twitter"], $tab["facebook"]);
|
||||
$return->doLoad($tab["id"], $tab["email"], $tab["git"], $tab["mastodon"], $tab["mobilizon"], $tab["matrix"], $tab["peertube"], $tab["nextcloud"], $tab["twitter"], $tab["facebook"]);
|
||||
}else{
|
||||
$systemError=3;
|
||||
$classe="NodeSettingsManager";
|
||||
@ -349,7 +349,7 @@ class NodeSettingsManager extends Manager
|
||||
if ((strtolower(get_class($obj))=="nodesettings") && ($obj->isLoaded()==true))
|
||||
{
|
||||
/* Récupération des infos */
|
||||
$id=$this->sourceUpdate($obj->getId(), $obj->getEmail(), $obj->getMastodon(), $obj->getMobilizon(), $obj->getMatrix(), $obj->getPeertube(), $obj->getNextcloud(), $obj->getTwitter(), $obj->getFacebook());
|
||||
$id=$this->sourceUpdate($obj->getId(), $obj->getEmail(), $obj->getGit(), $obj->getMastodon(), $obj->getMobilizon(), $obj->getMatrix(), $obj->getPeertube(), $obj->getNextcloud(), $obj->getTwitter(), $obj->getFacebook());
|
||||
$this->CallSystemPlugin("__updateNodeSettings", $obj);
|
||||
return $obj;
|
||||
}
|
||||
@ -376,7 +376,7 @@ class NodeSettingsManager extends Manager
|
||||
if ($obj->isLoaded()==false)
|
||||
{
|
||||
/* Récupération des infos */
|
||||
$id=$this->sourceInsert($obj->getEmail(), $obj->getMastodon(), $obj->getMobilizon(), $obj->getMatrix(), $obj->getPeertube(), $obj->getNextcloud(), $obj->getTwitter(), $obj->getFacebook());
|
||||
$id=$this->sourceInsert($obj->getEmail(), $obj->getGit(), $obj->getMastodon(), $obj->getMobilizon(), $obj->getMatrix(), $obj->getPeertube(), $obj->getNextcloud(), $obj->getTwitter(), $obj->getFacebook());
|
||||
$obj->setId($id);
|
||||
$this->CallSystemPlugin("__insertNodeSettings", $obj);
|
||||
return $obj;
|
||||
|
@ -194,10 +194,11 @@ var $conn = null;
|
||||
* @access private
|
||||
* @return entier
|
||||
*/
|
||||
function doInsert($email, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
function doInsert($email, $git, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
{
|
||||
$sql="INSERT INTO ".$this->getTable()." ("
|
||||
.$this->getSqlName("email").", "
|
||||
.$this->getSqlName("git").", "
|
||||
.$this->getSqlName("mastodon").", "
|
||||
.$this->getSqlName("mobilizon").", "
|
||||
.$this->getSqlName("matrix").", "
|
||||
@ -205,7 +206,7 @@ var $conn = null;
|
||||
.$this->getSqlName("nextcloud").", "
|
||||
.$this->getSqlName("twitter").", "
|
||||
.$this->getSqlName("facebook").") VALUES (";
|
||||
$sql.="'".$email."', '".$mastodon."', '".$mobilizon."', '".$matrix."', '".$peertube."', '".$nextcloud."', '".$twitter."', '".$facebook."')";
|
||||
$sql.="'".$email."', '".$git."', '".$mastodon."', '".$mobilizon."', '".$matrix."', '".$peertube."', '".$nextcloud."', '".$twitter."', '".$facebook."')";
|
||||
|
||||
# Requete
|
||||
$result=$this->conn->sql_query($sql);
|
||||
@ -233,11 +234,12 @@ var $conn = null;
|
||||
* @access private
|
||||
* @return booleen
|
||||
*/
|
||||
function doUpdate($id, $email, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
function doUpdate($id, $email, $git, $mastodon, $mobilizon, $matrix, $peertube, $nextcloud, $twitter, $facebook)
|
||||
{
|
||||
$sql="UPDATE ".$this->getTable()." SET "
|
||||
.$this->getSqlName("id")."='".$id."', "
|
||||
.$this->getSqlName("email")."='".$email."', "
|
||||
.$this->getSqlName("git")."='".$git."', "
|
||||
.$this->getSqlName("mastodon")."='".$mastodon."', "
|
||||
.$this->getSqlName("mobilizon")."='".$mobilizon."', "
|
||||
.$this->getSqlName("matrix")."='".$matrix."', "
|
||||
@ -298,6 +300,7 @@ var $conn = null;
|
||||
/* Cas nouvelle BD systeme */
|
||||
$result["id"] =$sqlArray[$this->getSqlName('id')];
|
||||
$result["email"] =$sqlArray[$this->getSqlName("email")];
|
||||
$result["git"] =$sqlArray[$this->getSqlName("git")];
|
||||
$result["mastodon"] =$sqlArray[$this->getSqlName("mastodon")];
|
||||
$result["mobilizon"] =$sqlArray[$this->getSqlName("mobilizon")];
|
||||
$result["matrix"] =$sqlArray[$this->getSqlName("matrix")];
|
||||
@ -325,6 +328,7 @@ var $conn = null;
|
||||
{
|
||||
$this->sqlAttributArray["id"] ="node_id";
|
||||
$this->sqlAttributArray["email"] ="node_email";
|
||||
$this->sqlAttributArray["git"] ="node_git";
|
||||
$this->sqlAttributArray["mastodon"] ="node_mastodon";
|
||||
$this->sqlAttributArray["mobilizon"] ="node_mobilizon";
|
||||
$this->sqlAttributArray["matrix"] ="node_matrix";
|
||||
@ -337,6 +341,7 @@ var $conn = null;
|
||||
}
|
||||
$this->sqlAttributArray["id"] ="id";
|
||||
$this->sqlAttributArray["email"] ="email";
|
||||
$this->sqlAttributArray["git"] ="git";
|
||||
$this->sqlAttributArray["mastodon"] ="mastodon";
|
||||
$this->sqlAttributArray["mobilizon"] ="mobilizon";
|
||||
$this->sqlAttributArray["matrix"] ="matrix";
|
||||
|
Loading…
x
Reference in New Issue
Block a user