From 340bd12ee78fa883ae1decdcc111ec5918de7994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 28 Sep 2024 11:15:38 +0200 Subject: [PATCH] add php doc (#31173) * add phpdoc * add phpdoc * add phpdoc * add phpdoc * add phpdoc * add phpdoc * add phpdoc --- .../action/class/actioncommreminder.class.php | 3 ++ htdocs/website/class/website.class.php | 3 ++ htdocs/website/class/websitepage.class.php | 43 ++++++++++++++++++- htdocs/website/index.php | 7 +-- 4 files changed, 51 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index 3629c089adb..58f8c7e223a 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -97,6 +97,9 @@ class ActionCommReminder extends CommonObject */ public $entity; + /** + * @var int date remind + */ public $dateremind; /** diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 75308e2d5d9..478b36627f0 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -47,6 +47,9 @@ class Website extends CommonObject */ public $table_element = 'website'; + /** + * @var string[] List of child tables. To know object to delete on cascade. + */ protected $childtablesoncascade = array(); /** diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 4ebf2234505..9271b074786 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -62,42 +62,74 @@ class WebsitePage extends CommonObject */ protected $childtablesoncascade = array('categorie_website_page'); - /** - * @var int ID + * @var int Website ID */ public $fk_website; + /** + * @var ?int Page ID + */ public $fk_page; // If translation of another page + /** + * @var string Page url + */ public $pageurl; + + /** + * @var string Alias alt + */ public $aliasalt; + + /** + * @var string Container type + */ public $type_container; /** * @var string title */ public $title; + /** * @var string description */ public $description; + /** * @var string image */ public $image; + /** * @var string keywords */ public $keywords; + /** * @var string language code ('en', 'fr', 'en-gb', ..) */ public $lang; + /** + * @var int allowed in frames + */ public $allowed_in_frames; + + /** + * @var string html header + */ public $htmlheader; + + /** + * @var string content + */ public $content; + + /** + * @var string grabbed from + */ public $grabbed_from; /** @@ -105,7 +137,14 @@ class WebsitePage extends CommonObject */ public $status; + /** + * @var int ID + */ public $fk_user_creat; + + /** + * @var int ID + */ public $fk_user_modif; /** diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 11a8fd2bf8d..a9d30c17781 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -782,6 +782,7 @@ if ($action == 'addcontainer' && $usercanedit) { $action = 'createcontainer'; } + $pageurl = ''; if (!$error) { // Clean url to grab, so url can be // http://www.example.com/ or http://www.example.com/dir1/ or http://www.example.com/dir1/aaa @@ -1151,7 +1152,7 @@ if ($action == 'addcontainer' && $usercanedit) { $objectpage->otherlang = GETPOST('WEBSITE_OTHERLANG', 'aZ09comma'); $objectpage->image = GETPOST('WEBSITE_IMAGE', 'alpha'); $objectpage->keywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml')); - $objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09'); + $objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09') ? 1 : 0; $objectpage->htmlheader = GETPOST('htmlheader', 'none'); // Must accept tags like '