1
|
|
|
<?php namespace XoopsModules\Pedigree; |
2
|
|
|
/* |
3
|
|
|
You may not change or alter any portion of this comment or credits |
4
|
|
|
of supporting developers from this source code or any supporting source code |
5
|
|
|
which is considered copyrighted (c) material of the original comment or credit authors. |
6
|
|
|
|
7
|
|
|
This program is distributed in the hope that it will be useful, |
8
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
9
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
10
|
|
|
*/ |
11
|
|
|
/** |
12
|
|
|
* Pedigree module for XOOPS |
13
|
|
|
* |
14
|
|
|
* @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} |
15
|
|
|
* @license GPL 2.0 or later |
16
|
|
|
* @package pedigree |
17
|
|
|
* @since 2.5.x |
18
|
|
|
* @author XOOPS Module Dev Team (https://xoops.org) |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
use XoopsModules\Pedigree; |
22
|
|
|
|
23
|
|
|
defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Class Pedigree\Tree |
27
|
|
|
*/ |
28
|
|
|
class Tree extends \XoopsObject |
|
|
|
|
29
|
|
|
{ |
30
|
|
|
//Constructor |
31
|
|
|
/** |
32
|
|
|
* |
33
|
|
|
*/ |
34
|
|
|
public function __construct() |
35
|
|
|
{ |
36
|
|
|
parent::__construct(); |
37
|
|
|
$this->initVar('id', XOBJ_DTYPE_INT, null, false, 7); |
|
|
|
|
38
|
|
|
$this->initVar('naam', XOBJ_DTYPE_TXTAREA, null, false); |
|
|
|
|
39
|
|
|
$this->initVar('id_owner', XOBJ_DTYPE_INT, null, false, 5); |
40
|
|
|
$this->initVar('id_breeder', XOBJ_DTYPE_INT, null, false, 5); |
41
|
|
|
$this->initVar('user', XOBJ_DTYPE_TXTBOX, null, false, 25); |
|
|
|
|
42
|
|
|
$this->initVar('roft', XOBJ_DTYPE_ENUM, null, false); |
|
|
|
|
43
|
|
|
$this->initVar('mother', XOBJ_DTYPE_INT, null, false, 5); |
44
|
|
|
$this->initVar('father', XOBJ_DTYPE_INT, null, false, 5); |
45
|
|
|
$this->initVar('foto', XOBJ_DTYPE_TXTBOX, null, false, 255); |
46
|
|
|
$this->initVar('coi', XOBJ_DTYPE_TXTBOX, null, false, 10); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @param bool $action |
51
|
|
|
* |
52
|
|
|
* @return \XoopsThemeForm |
53
|
|
|
*/ |
54
|
|
|
public function getForm($action = false) |
55
|
|
|
{ |
56
|
|
|
global $xoopsModuleConfig; |
57
|
|
|
|
58
|
|
|
if (false === $action) { |
59
|
|
|
$action = $_SERVER['REQUEST_URI']; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
$title = $this->isNew() ? sprintf(_AM_PEDIGREE_PEDIGREE_ADD) : sprintf(_AM_PEDIGREE_PEDIGREE_EDIT); |
63
|
|
|
|
64
|
|
|
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
|
|
|
65
|
|
|
|
66
|
|
|
$form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
|
|
|
|
67
|
|
|
$form->setExtra('enctype="multipart/form-data"'); |
68
|
|
|
|
69
|
|
|
$form->addElement(new \XoopsFormTextArea(_AM_PEDIGREE_PEDIGREE_NAAM, 'naam', $this->getVar('naam'), 4, 47), true); |
|
|
|
|
70
|
|
|
$form->addElement(new \XoopsFormText(_AM_PEDIGREE_PEDIGREE_ID_OWNER, 'id_owner', 50, 255, $this->getVar('id_owner')), false); |
|
|
|
|
71
|
|
|
$form->addElement(new \XoopsFormText(_AM_PEDIGREE_PEDIGREE_ID_BREEDER, 'id_breeder', 50, 255, $this->getVar('id_breeder')), false); |
72
|
|
|
$form->addElement(new \XoopsFormText(_AM_PEDIGREE_PEDIGREE_USER, 'user', 50, 255, $this->getVar('user')), false); |
73
|
|
|
$form->addElement(new \XoopsFormTextArea(_AM_PEDIGREE_PEDIGREE_ROFT, 'roft', $this->getVar('roft'), 4, 47), false); |
74
|
|
|
$form->addElement(new \XoopsFormText(_AM_PEDIGREE_PEDIGREE_MOTHER, 'mother', 50, 255, $this->getVar('mother')), false); |
75
|
|
|
$form->addElement(new \XoopsFormText(_AM_PEDIGREE_PEDIGREE_FATHER, 'father', 50, 255, $this->getVar('father')), false); |
76
|
|
|
$form->addElement(new \XoopsFormText(_AM_PEDIGREE_PEDIGREE_FOTO, 'foto', 50, 255, $this->getVar('foto')), false); |
77
|
|
|
$form->addElement(new \XoopsFormText(_AM_PEDIGREE_PEDIGREE_COI, 'coi', 50, 255, $this->getVar('coi')), false); |
78
|
|
|
|
79
|
|
|
$form->addElement(new \XoopsFormHidden('op', 'save_pedigree')); |
|
|
|
|
80
|
|
|
|
81
|
|
|
//Submit buttons |
82
|
|
|
$button_tray = new \XoopsFormElementTray('', ''); |
|
|
|
|
83
|
|
|
$submit_button = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'); |
|
|
|
|
84
|
|
|
$button_tray->addElement($submit_button); |
85
|
|
|
|
86
|
|
|
$cancel_button = new \XoopsFormButton('', '', _CANCEL, 'cancel'); |
|
|
|
|
87
|
|
|
$cancel_button->setExtra('onclick="history.go(-1)"'); |
88
|
|
|
$button_tray->addElement($cancel_button); |
89
|
|
|
|
90
|
|
|
$form->addElement($button_tray); |
91
|
|
|
|
92
|
|
|
return $form; |
93
|
|
|
} |
94
|
|
|
} |
95
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths