mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-25 13:08:58 +00:00
Added account public note to the general settings
This commit is contained in:
parent
0309d4f880
commit
fe10052629
@ -77,6 +77,7 @@ class SettingsController {
|
||||
$settings->set_personnalWebsite(postString("personnalWebsite", 0));
|
||||
$settings->set_virtualDirectory($virtualDirectory);
|
||||
$settings->set_allowComunicMails(postBool("allow_comunic_mails"));
|
||||
$settings->set_publicNote(removeHTMLnodes(postString("publicNote", 0)));
|
||||
|
||||
//Check personnal webiste
|
||||
if($settings->has_personnalWebsite()){
|
||||
@ -305,6 +306,7 @@ class SettingsController {
|
||||
$data["public_friends_list"] = $settings->is_friendsListPublic();
|
||||
$data["virtual_directory"] = $settings->get_virtualDirectory();
|
||||
$data["personnal_website"] = $settings->get_personnalWebsite();
|
||||
$data["publicNote"] = $settings->get_publicNote();
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
@ -164,6 +164,7 @@ class SettingsComponents {
|
||||
$obj->set_friendsListPublic($entry['liste_amis_publique']);
|
||||
$obj->set_virtualDirectory($entry['sous_repertoire'] == null ? "" : $entry['sous_repertoire']);
|
||||
$obj->set_personnalWebsite($entry['site_web'] == null ? "" : $entry['site_web']);
|
||||
$obj->set_publicNote($entry['public_note'] == null ? "" : $entry['public_note']);
|
||||
|
||||
return $obj;
|
||||
|
||||
@ -189,7 +190,8 @@ class SettingsComponents {
|
||||
$data["liste_amis_publique"] = $settings->is_friendsListPublic() ? 1 : 0;
|
||||
$data["sous_repertoire"] = $settings->has_virtualDirectory() ? $settings->get_virtualDirectory() : "";
|
||||
$data["site_web"] = $settings->has_personnalWebsite() ? $settings->get_personnalWebsite() : "";
|
||||
|
||||
$data["public_note"] = $settings->has_publicNote() ? $settings->get_publicNote() : "";
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ class GeneralSettings extends BaseUserModel {
|
||||
private $friendsListPublic;
|
||||
private $virtualDirectory;
|
||||
private $personnalWebsite;
|
||||
private $publicNote;
|
||||
|
||||
//Set and get the email address of the user
|
||||
public function set_email(string $email){
|
||||
@ -140,4 +141,17 @@ class GeneralSettings extends BaseUserModel {
|
||||
public function get_personnalWebsite() : string {
|
||||
return $this->personnalWebsite != null ? $this->personnalWebsite : "null";
|
||||
}
|
||||
|
||||
//Set and get public acccount note
|
||||
public function set_publicNote(string $publicNote){
|
||||
$this->publicNote = $publicNote == "" ? null : $publicNote;
|
||||
}
|
||||
|
||||
public function has_publicNote() : bool {
|
||||
return $this->publicNote != null;
|
||||
}
|
||||
|
||||
public function get_publicNote() : string {
|
||||
return $this->publicNote != null ? $this->publicNote : "null";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user