Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop
This commit is contained in:
Laurent Destailleur 2024-03-16 11:04:54 +01:00
parent 25dd05c35e
commit ea2eab434c
3 changed files with 9 additions and 13 deletions

View File

@ -1,7 +1,6 @@
<?php
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2021 SuperAdmin
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -95,7 +94,8 @@ if ($action == 'updateMask') {
$tmpobjectkey = GETPOST('object', 'aZ09');
if (in_array($tmpobjectkey, $myTmpObjects)) {
$tmpobject = new $tmpobjectkey($db);
$className = $myTmpObjects[$tmpobjectkey];
$tmpobject = new $className($db);
$tmpobject->initAsSpecimen();
// Search template files
@ -339,11 +339,6 @@ if ($action == 'edit') {
}
$moduledir = 'knowledgemanagement';
$myTmpObjects = array();
$myTmpObjects['MyObject'] = array('includerefgeneration' => 0, 'includedocgeneration' => 0);
foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
if ($myTmpObjectKey == 'MyObject') {
continue;

View File

@ -189,7 +189,7 @@ class KnowledgeRecord extends CommonObject
*/
public function __construct(DoliDB $db)
{
global $conf, $langs;
global $langs;
$this->db = $db;

View File

@ -209,7 +209,8 @@ if ($action == 'updateMask') {
$tmpobjectkey = GETPOST('object', 'aZ09');
if (in_array($tmpobjectkey, $myTmpObjects)) {
$tmpobject = new $tmpobjectkey($db);
$className = $myTmpObjects[$tmpobjectkey];
$tmpobject = new $className($db);
$tmpobject->initAsSpecimen();
// Search template files
@ -407,8 +408,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
}
print '</td>';
$nameofclass = $myTmpObjectArray['class'];
$mytmpinstance = new $nameofclass($db);
$className = $myTmpObjectArray['class'];
$mytmpinstance = new $className($db);
$mytmpinstance->initAsSpecimen();
// Info