1
|
|
|
<?php namespace XoopsModules\Gbook; |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* **************************************************************************** |
5
|
|
|
* GBOOK - MODULE FOR XOOPS |
6
|
|
|
* Copyright (c) 2007 - 2012 |
7
|
|
|
* Ingo H. de Boer (http://www.winshell.org) |
8
|
|
|
* |
9
|
|
|
* This program is free software; you can redistribute it and/or modify |
10
|
|
|
* it under the terms of the GNU General Public License as published by |
11
|
|
|
* the Free Software Foundation; either version 2 of the License, or |
12
|
|
|
* (at your option) any later version. |
13
|
|
|
* |
14
|
|
|
* You may not change or alter any portion of this comment or credits |
15
|
|
|
* of supporting developers from this source code or any supporting |
16
|
|
|
* source code which is considered copyrighted (c) material of the |
17
|
|
|
* original comment or credit authors. |
18
|
|
|
* |
19
|
|
|
* This program is distributed in the hope that it will be useful, |
20
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
|
|
|
* GNU General Public License for more details. |
23
|
|
|
* --------------------------------------------------------------------------- |
24
|
|
|
* |
25
|
|
|
* @copyright Ingo H. de Boer (http://www.winshell.org) |
26
|
|
|
* @license GNU General Public License (GPL) |
27
|
|
|
* @package GBook |
28
|
|
|
* @author Ingo H. de Boer ([email protected]) |
29
|
|
|
* |
30
|
|
|
* **************************************************************************** |
31
|
|
|
*/ |
32
|
|
|
|
33
|
|
|
use Xmf\Request; |
|
|
|
|
34
|
|
|
use XoopsModules\Gbook; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @package kernel |
38
|
|
|
* @copyright copyright © 2000 XOOPS.org |
39
|
|
|
*/ |
40
|
|
|
class Entries extends \XoopsObject |
|
|
|
|
41
|
|
|
{ |
42
|
|
|
/** |
43
|
|
|
* Constructor |
44
|
|
|
*/ |
45
|
|
|
public function __construct() |
46
|
|
|
{ |
47
|
|
|
$this->initVar('id', XOBJ_DTYPE_INT, null, true); |
|
|
|
|
48
|
|
|
$this->initVar('name', XOBJ_DTYPE_TXTBOX); |
|
|
|
|
49
|
|
|
$this->initVar('email', XOBJ_DTYPE_TXTBOX); |
50
|
|
|
$this->initVar('url', XOBJ_DTYPE_TXTBOX); |
51
|
|
|
$this->initVar('message', XOBJ_DTYPE_TXTAREA); |
|
|
|
|
52
|
|
|
$this->initVar('note', XOBJ_DTYPE_TXTAREA); |
53
|
|
|
$this->initVar('time', XOBJ_DTYPE_INT); |
54
|
|
|
$this->initVar('date', XOBJ_DTYPE_TXTBOX); |
55
|
|
|
$this->initVar('ip', XOBJ_DTYPE_TXTBOX); |
56
|
|
|
$this->initVar('admin', XOBJ_DTYPE_TXTBOX); |
57
|
|
|
|
58
|
|
|
$this->initVar('dohtml', XOBJ_DTYPE_INT, 1, false); |
59
|
|
|
$this->initVar('dosmiley', XOBJ_DTYPE_INT, 1, false); |
60
|
|
|
$this->initVar('doxcode', XOBJ_DTYPE_INT, 1, false); |
61
|
|
|
$this->initVar('doimage', XOBJ_DTYPE_INT, 1, false); |
62
|
|
|
$this->initVar('dobr', XOBJ_DTYPE_INT, 1, false); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Get {@link XoopsThemeForm} for adding/editing categories |
67
|
|
|
* |
68
|
|
|
* @param mixed $action URL to submit to or false for $_SERVER['REQUEST_URI'] |
69
|
|
|
* |
70
|
|
|
* @return \XoopsThemeForm |
71
|
|
|
*/ |
72
|
|
|
public function getForm($action = false) |
73
|
|
|
{ |
74
|
|
|
if (false === $action) { |
75
|
|
|
$action = Request::getString('REQUEST_URI', '', 'SERVER'); |
76
|
|
|
} |
77
|
|
|
$title = _AM_GBOOK_ENTRY_EDIT; |
78
|
|
|
|
79
|
|
|
require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
80
|
|
|
require_once dirname(__DIR__) . '/class/Utility.php'; |
81
|
|
|
|
82
|
|
|
$form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
|
|
|
|
83
|
|
|
|
84
|
|
|
$form->addElement(new \XoopsFormText(_AM_GBOOK_NAME, 'name', 35, 255, $this->getVar('name'))); |
|
|
|
|
85
|
|
|
$form->addElement(new \XoopsFormText(_AM_GBOOK_EMAIL, 'email', 35, 255, $this->getVar('email'))); |
86
|
|
|
$form->addElement(new \XoopsFormText(_AM_GBOOK_URL, 'url', 35, 255, $this->getVar('url'))); |
87
|
|
|
|
88
|
|
|
$messageEditor = Gbook\Utility::getEditor('message', $this->getVar('message', 'e')); |
89
|
|
|
// $form->addElement(new \XoopsFormTextArea(_AM_GBOOK_MESSAGE, 'message', $this->getVar('message', 'e'))); |
|
|
|
|
90
|
|
|
$form->addElement($messageEditor); |
91
|
|
|
|
92
|
|
|
$noteEditor = Gbook\Utility::getEditor('note', $this->getVar('note', 'e')); |
93
|
|
|
// $form->addElement(new \XoopsFormTextArea(_AM_GBOOK_NOTE, 'note', $this->getVar('note', 'e'))); |
|
|
|
|
94
|
|
|
$form->addElement($noteEditor); |
95
|
|
|
|
96
|
|
|
$form->addElement(new \XoopsFormHidden('op', 'save')); |
|
|
|
|
97
|
|
|
$form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
|
|
|
98
|
|
|
|
99
|
|
|
return $form; |
100
|
|
|
} |
101
|
|
|
} |
102
|
|
|
|
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