Add missing field

Fix duplicate / in url
This commit is contained in:
Laurent Destailleur 2021-05-17 06:13:26 +02:00
parent a9ddf2a5ad
commit 9a8bd2c24b
6 changed files with 12 additions and 7 deletions

View File

@ -618,7 +618,7 @@ function getStructuredData($type, $data = array())
$pageurl = str_replace('__WEBSITE_KEY__', $website->ref, $pageurl); $pageurl = str_replace('__WEBSITE_KEY__', $website->ref, $pageurl);
$title = str_replace('__WEBSITE_KEY__', $website->ref, $title); $title = str_replace('__WEBSITE_KEY__', $website->ref, $title);
$image = '/medias/'.str_replace('__WEBSITE_KEY__', $website->ref, $image); $image = '/medias'.(preg_match('/^\//', $image) ? '' : '/').str_replace('__WEBSITE_KEY__', $website->ref, $image);
$companyname = str_replace('__WEBSITE_KEY__', $website->ref, $companyname); $companyname = str_replace('__WEBSITE_KEY__', $website->ref, $companyname);
$description = str_replace('__WEBSITE_KEY__', $website->ref, $description); $description = str_replace('__WEBSITE_KEY__', $website->ref, $description);

View File

@ -492,10 +492,14 @@ CREATE TABLE llx_knowledgemanagement_knowledgerecord(
model_pdf varchar(255), model_pdf varchar(255),
question text NOT NULL, question text NOT NULL,
answer text, answer text,
fk_ticket integer,
status integer NOT NULL status integer NOT NULL
-- END MODULEBUILDER FIELDS -- END MODULEBUILDER FIELDS
) ENGINE=innodb; ) ENGINE=innodb;
ALTER TABLE llx_knowledgemanagement_knowledgerecord ADD COLUMN fk_ticket integer;
create table llx_knowledgemanagement_knowledgerecord_extrafields create table llx_knowledgemanagement_knowledgerecord_extrafields
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,

View File

@ -15,7 +15,7 @@
-- along with this program. If not, see <https://www.gnu.org/licenses/>. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
-- --
-- Table with the categories of a ticket -- Table with the custom category tree for the category of a ticket
-- --
create table llx_c_ticket_category create table llx_c_ticket_category

View File

@ -13,7 +13,7 @@
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <https://www.gnu.org/licenses/>. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
-- --
-- -- Type of ticket. For example: COM, ISSUE, REQUEST, PROJECT, OTHER, ...
create table llx_c_ticket_type create table llx_c_ticket_type
( (

View File

@ -28,6 +28,7 @@ CREATE TABLE llx_knowledgemanagement_knowledgerecord(
model_pdf varchar(255), model_pdf varchar(255),
question text NOT NULL, question text NOT NULL,
answer text, answer text,
fk_ticket integer,
status integer NOT NULL status integer NOT NULL
-- END MODULEBUILDER FIELDS -- END MODULEBUILDER FIELDS
) ENGINE=innodb; ) ENGINE=innodb;

View File

@ -110,8 +110,8 @@ class KnowledgeRecord extends CommonObject
'fk_user_valid' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>'1', 'position'=>512, 'notnull'=>0, 'visible'=>-2,), 'fk_user_valid' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>'1', 'position'=>512, 'notnull'=>0, 'visible'=>-2,),
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1,), 'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'csslist'=>'tdoverflow300'),
'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>-1,), 'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>3, 'csslist'=>'tdoverflow300'),
'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Valid'),), 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Valid'),),
); );
public $rowid; public $rowid;