mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-14 08:54:21 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file availabilities_agenda.php
|
||||
* \file htdocs/bookcal/availabilities_agenda.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab of events on Availabilities
|
||||
*/
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file availabilities_card.php
|
||||
* \ingroup bookcal
|
||||
* \brief Page to create/edit/view availabilities
|
||||
* \file htdocs/bookcal/availabilities_card.php
|
||||
* \ingroup bookcal
|
||||
* \brief Page to create/edit/view availabilities
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
@@ -36,7 +36,7 @@ $langs->loadLangs(array("agenda", "other"));
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file availabilities_contact.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for contacts linked to Availabilities
|
||||
* \file htdocs/bookcal/availabilities_contact.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for contacts linked to Availabilities
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file availabilities_document.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for documents linked to Availabilities
|
||||
* \file htdocs/bookcal/availabilities_document.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for documents linked to Availabilities
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file availabilities_list.php
|
||||
* \ingroup bookcal
|
||||
* \brief List page for availabilities
|
||||
* \file htdocs/bookcal/availabilities_list.php
|
||||
* \ingroup bookcal
|
||||
* \brief List page for availabilities
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file availabilities_note.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for notes on Availabilities
|
||||
* \file htdocs/bookcal/availabilities_note.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for notes on Availabilities
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file booking_agenda.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab of events on Booking
|
||||
* \file htdocs/bookcal/booking_agenda.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab of events on Booking
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file booking_card.php
|
||||
* \ingroup bookcal
|
||||
* \brief Page to create/edit/view booking
|
||||
* \file htdocs/bookcal/booking_card.php
|
||||
* \ingroup bookcal
|
||||
* \brief Page to create/edit/view booking
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file booking_contact.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for contacts linked to Booking
|
||||
* \file htdocs/bookcal/booking_contact.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for contacts linked to Booking
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file booking_document.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for documents linked to Booking
|
||||
* \file htdocs/bookcal/booking_document.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for documents linked to Booking
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file booking_list.php
|
||||
* \ingroup bookcal
|
||||
* \brief List page for booking
|
||||
* \file htdocs/bookcal/booking_list.php
|
||||
* \ingroup bookcal
|
||||
* \brief List page for booking
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file booking_note.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for notes on Booking
|
||||
* \file htdocs/bookcal/booking_note.php
|
||||
* \ingroup bookcal
|
||||
* \brief Tab for notes on Booking
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
@@ -31,9 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/bookcal/lib/bookcal_booking.lib.php';
|
||||
$langs->loadLangs(array("agenda", "companies"));
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
|
||||
@@ -1020,3 +1020,116 @@ function reWriteAllMenus($file, $menus, $menuWantTo, $key, $action)
|
||||
return 1;
|
||||
}return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new dictionary table.
|
||||
*
|
||||
* for creating a new dictionary table in Dolibarr. It generates the necessary SQL code to define the table structure,
|
||||
* including columns such as 'rowid', 'code', 'label', 'position', 'use_default', 'active', etc. The table name is constructed based on the provided $namedic parameter.
|
||||
*
|
||||
* @param string $modulename The lowercase name of the module for which the dictionary table is being created.
|
||||
* @param string $file The file path to the Dolibarr module builder file where the dictionaries are defined.
|
||||
* @param string $namedic The name of the dictionary, which will also be used as the base for the table name.
|
||||
* @param array|null $dictionnaires An optional array containing pre-existing dictionary data, including 'tabname', 'tablib', 'tabsql', etc.
|
||||
* @return void
|
||||
*/
|
||||
function createNewDictionnary($modulename, $file, $namedic, $dictionnaires = null)
|
||||
{
|
||||
global $db, $langs;
|
||||
|
||||
if (empty($namedic)) {
|
||||
setEventMessages($langs->trans("ErrorEmptyNameDic"), null, 'errors');
|
||||
return;
|
||||
}
|
||||
if (!file_exists($file)) {
|
||||
return -1;
|
||||
}
|
||||
$modulename = strtolower($modulename);
|
||||
|
||||
if (empty($dictionnaires)) {
|
||||
$dictionnaires = array('tabname' => array(), 'tablib' => array(), 'tabsql' => array(), 'tabsqlsort' => array(), 'tabfield' => array(), 'tabfieldvalue' => array(), 'tabfieldinsert' => array(), 'tabrowid' => array(), 'tabcond' => array(), 'tabhelp' => array());
|
||||
}
|
||||
|
||||
$columns = array(
|
||||
'rowid' => array('type' => 'integer(11)'),
|
||||
'code' => array('type' => 'varchar(255) NOT NULL'),
|
||||
'label' => array('type' => 'varchar(255) NOT NULL'),
|
||||
'position' => array('type' => 'integer(11) NULL'),
|
||||
'use_default' => array('type' => 'varchar(255) DEFAULT 1'),
|
||||
'active' => array('type' => 'integer')
|
||||
);
|
||||
|
||||
|
||||
$primaryKey = 'rowid';
|
||||
foreach ($columns as $key => $value) {
|
||||
if ($key === 'rowid') {
|
||||
$primaryKey = 'rowid';
|
||||
break;
|
||||
}
|
||||
if (!array_key_exists('rowid', $columns)) {
|
||||
$primaryKey = array_key_first($columns);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// check if tablename exist in Database
|
||||
$query = "SHOW TABLES LIKE '" . MAIN_DB_PREFIX.strtolower($namedic) . "'";
|
||||
$checkTable = $db->query($query);
|
||||
if ($checkTable && $db->num_rows($checkTable) > 0) {
|
||||
setEventMessages($langs->trans("ErrorTableExist", $namedic), null, 'errors');
|
||||
return;
|
||||
} else {
|
||||
$_results = $db->DDLCreateTable(MAIN_DB_PREFIX.strtolower($namedic), $columns, $primaryKey, "InnoDB");
|
||||
if ($_results < 0) {
|
||||
dol_print_error($db);
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorTableNotFound", $namedic), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// rewrite dictionnary if
|
||||
$dictionnaires['tabname'][] = $namedic;
|
||||
$dictionnaires['tablib'][] = ucfirst(substr($namedic, 2));
|
||||
$dictionnaires['tabsql'][] = 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.strtolower($namedic).' as f';
|
||||
$dictionnaires['tabsqlsort'][] = (array_key_exists('label', $columns) ? 'label ASC' : '');
|
||||
$dictionnaires['tabfield'][] = (array_key_exists('code', $columns) && array_key_exists('label', $columns) ? 'code,label' : '');
|
||||
$dictionnaires['tabfieldvalue'][] = (array_key_exists('code', $columns) && array_key_exists('label', $columns) ? 'code,label' : '');
|
||||
$dictionnaires['tabfieldinsert'][] = (array_key_exists('code', $columns) && array_key_exists('label', $columns) ? 'code,label' : '');
|
||||
$dictionnaires['tabrowid'][] = $primaryKey;
|
||||
$dictionnaires['tabcond'][] = isModEnabled('$modulename');
|
||||
$dictionnaires['tabhelp'][] = (array_key_exists('code', $columns) ? array('code'=>$langs->trans('CodeTooltipHelp'), 'field2' => 'field2tooltip') : '');
|
||||
|
||||
// Build the dictionary string
|
||||
$dicData = "\t\t\$this->dictionaries=array(\n";
|
||||
|
||||
foreach ($dictionnaires as $key => $value) {
|
||||
$dicData .= "\t\t\t'$key'=>";
|
||||
|
||||
if ($key === 'tabcond') {
|
||||
$conditions = array_map(function ($val) use ($modulename) {
|
||||
return ($val === true || $val === false) ? "isModEnabled('$modulename')" : $val;
|
||||
}, $value);
|
||||
$dicData .= "array(" . implode(",", $conditions) . ")";
|
||||
} elseif ($key === 'tabhelp') {
|
||||
$helpItems = array();
|
||||
foreach ($value as $helpValue) {
|
||||
$helpItems[] = "array('code'=>\$langs->trans('".$helpValue['code']."'), 'field2' => 'field2tooltip')";
|
||||
}
|
||||
$dicData .= "array(" . implode(",", $helpItems) . ")";
|
||||
} else {
|
||||
if (is_array($value)) {
|
||||
$dicData .= "array(" . implode(",", array_map(function ($val) {
|
||||
return "'$val'";
|
||||
}, $value)) . ")";
|
||||
} else {
|
||||
$dicData .= "'$value'";
|
||||
}
|
||||
}
|
||||
$dicData .= ",\n";
|
||||
}
|
||||
$dicData .= "\t\t);";
|
||||
$stringDic = getFromFile($file, '/* BEGIN MODULEBUILDER DICTIONARIES */', '/* END MODULEBUILDER DICTIONARIES */');
|
||||
$writeInfile = dolReplaceInFile($file, array($stringDic => $dicData."\n"));
|
||||
if ($writeInfile > 0) {
|
||||
setEventMessages($langs->trans("DictionariesCreated", ucfirst(substr($namedic, 2))), null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2023 Udo Tamm <dev@dolibit.de>
|
||||
*
|
||||
* 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
|
||||
@@ -20,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/core/triggers/interface_20_all_Logevents.class.php
|
||||
* \ingroup core
|
||||
* \brief Trigger file for
|
||||
* \brief Trigger file for log events
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
|
||||
@@ -40,12 +41,11 @@ class InterfaceLogevents extends DolibarrTriggers
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->name = preg_replace('/^Interface/i', '', get_class($this));
|
||||
$this->family = "core";
|
||||
$this->description = "Triggers of this module allows to add security event records inside Dolibarr.";
|
||||
// 'development', 'experimental', 'dolibarr' or version
|
||||
$this->version = self::VERSION_DOLIBARR;
|
||||
$this->picto = 'technic';
|
||||
$this->name = preg_replace('/^Interface/i', '', get_class($this));
|
||||
$this->family = "core";
|
||||
$this->description = "Triggers of this module allows to add security event records inside Dolibarr.";
|
||||
$this->version = self::VERSION_DOLIBARR; // VERSION_ 'DEVELOPMENT' or 'EXPERMENTAL' or 'DOLIBARR'
|
||||
$this->picto = 'technic';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -77,54 +77,59 @@ class InterfaceLogevents extends DolibarrTriggers
|
||||
|
||||
$date = dol_now();
|
||||
|
||||
// Actions
|
||||
/* Actions */
|
||||
|
||||
$txt = $action;
|
||||
$langs->load("users");
|
||||
|
||||
// USER_LOGIN
|
||||
if ($action == 'USER_LOGIN') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
$langs->load("users");
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
$text = "(UserLogged,".$object->login.")";
|
||||
$text .= (empty($object->trigger_mesg) ? '' : ' - '.$object->trigger_mesg);
|
||||
$desc = "(UserLogged,".$object->login.")";
|
||||
$desc .= (empty($object->trigger_mesg) ? '' : ' - '.$object->trigger_mesg);
|
||||
|
||||
// USER_LOGIN_FAILED
|
||||
} elseif ($action == 'USER_LOGIN_FAILED') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
$text = $object->trigger_mesg; // Message direct
|
||||
$desc = $object->trigger_mesg; // Message direct
|
||||
|
||||
// USER_LOGOUT
|
||||
} elseif ($action == 'USER_LOGOUT') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
$langs->load("users");
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
$text = "(UserLogoff,".$object->login.")";
|
||||
$desc = "(UserLogoff,".$object->login.")";
|
||||
|
||||
// USER_CREATE
|
||||
} elseif ($action == 'USER_CREATE') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
$langs->load("users");
|
||||
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
$text = $langs->transnoentities("NewUserCreated", $object->login);
|
||||
$desc = $langs->transnoentities("NewUserCreated", $object->login);
|
||||
|
||||
// USER_MODIFY
|
||||
} elseif ($action == 'USER_MODIFY') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
$langs->load("users");
|
||||
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
$text = $langs->transnoentities("EventUserModified", $object->login);
|
||||
$desc = $langs->transnoentities("EventUserModified", $object->login);
|
||||
|
||||
// USER_NEW_PASSWORD
|
||||
} elseif ($action == 'USER_NEW_PASSWORD') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
$langs->load("users");
|
||||
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
$text = $langs->transnoentities("NewUserPassword", $object->login);
|
||||
$desc = $langs->transnoentities("NewUserPassword", $object->login);
|
||||
|
||||
// USER ENABLED/DISABLED
|
||||
} elseif ($action == 'USER_ENABLEDISABLE') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
$langs->load("users");
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
if ($object->statut == 0) {
|
||||
$text = $langs->transnoentities("UserEnabled", $object->login);
|
||||
$desc = $langs->transnoentities("UserEnabled", $object->login);
|
||||
@@ -133,42 +138,36 @@ class InterfaceLogevents extends DolibarrTriggers
|
||||
$text = $langs->transnoentities("UserDisabled", $object->login);
|
||||
$desc = $langs->transnoentities("UserDisabled", $object->login);
|
||||
}
|
||||
|
||||
// USER_DELETE
|
||||
} elseif ($action == 'USER_DELETE') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
$langs->load("users");
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
$text = $langs->transnoentities("UserDeleted", $object->login);
|
||||
$desc = $langs->transnoentities("UserDeleted", $object->login);
|
||||
|
||||
// USERGROUP_CREATE
|
||||
} elseif ($action == 'USERGROUP_CREATE') {
|
||||
// Groups
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
$langs->load("users");
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
$text = $langs->transnoentities("NewGroupCreated", $object->name);
|
||||
$desc = $langs->transnoentities("NewGroupCreated", $object->name);
|
||||
|
||||
// USERGROUP_MODIFY
|
||||
} elseif ($action == 'USERGROUP_MODIFY') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
$langs->load("users");
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
$text = $langs->transnoentities("GroupModified", $object->name);
|
||||
$desc = $langs->transnoentities("GroupModified", $object->name);
|
||||
|
||||
// USERGROUP_DELETE
|
||||
} elseif ($action == 'USERGROUP_DELETE') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
$langs->load("users");
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
// Initialize data (date,duree,text,desc)
|
||||
$text = $langs->transnoentities("GroupDeleted", $object->name);
|
||||
$desc = $langs->transnoentities("GroupDeleted", $object->name);
|
||||
}
|
||||
|
||||
// If not found
|
||||
/*
|
||||
else
|
||||
{
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action.");
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
// Add more information into desc from the context property
|
||||
if (!empty($desc) && !empty($object->context['audit'])) {
|
||||
$desc .= ' - '.$object->context['audit'];
|
||||
|
||||
@@ -912,7 +912,7 @@ if (!empty($id) && $action != 'edit') {
|
||||
if ($object->statut == $object::STATUS_CANCELED || $object->statut == $object::STATUS_DRAFT) {
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?rowid='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans("Delete")."</a></div>";
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans("Delete")."</a></div>";
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("CantRemovePaymentWithOneInvoicePaid").'">'.$langs->trans("Delete")."</a></div>";
|
||||
}
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans("Delete")."</a></div>";
|
||||
|
||||
@@ -318,7 +318,7 @@ ErrorTheUrlOfYourDolInstanceDoesNotMatchURLIntoOAuthSetup=Error: The URL of you
|
||||
ErrorMenuExistValue=A Menu already exist with this Title or URL
|
||||
ErrorSVGFilesNotAllowedAsLinksWithout=SVG files are not allowed as external links without the option %s
|
||||
ErrorTypeMenu=Impossible to add another menu for the same module on the navbar, not handle yet
|
||||
|
||||
ErrorTableExist=Table <b>%s</b> already exist
|
||||
# Warnings
|
||||
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
|
||||
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
|
||||
|
||||
@@ -176,4 +176,5 @@ MenuUpdatedSuccessfuly=Menu has been successfully updated
|
||||
ApiObjectDeleted=API for object %s has been successfully deleted
|
||||
CRUDRead=Read
|
||||
CRUDCreateWrite=Create or Update
|
||||
FailedToAddCodeIntoDescriptor=Failed to add code into descriptor. Check that the string comment "%s" is still present into the file.
|
||||
FailedToAddCodeIntoDescriptor=Failed to add code into descriptor. Check that the string comment "%s" is still present into the file.
|
||||
DictionariesCreated=Dictionary <b>%s</b> created successfully
|
||||
@@ -317,6 +317,7 @@ ErrorTheUrlOfYourDolInstanceDoesNotMatchURLIntoOAuthSetup=Erreur : L'URL de vot
|
||||
ErrorMenuExistValue=Un menu existe déjà avec ce titre ou cette URL
|
||||
ErrorSVGFilesNotAllowedAsLinksWithout=Les fichiers SVG ne sont pas autorisés en tant que liens externes sans l'option %s
|
||||
ErrorTypeMenu=Impossible d'ajouter un autre menu pour le même module sur la barre de navigation, pas encore géré
|
||||
ErrorTableExist=La table <b>%s</b> existe déja
|
||||
|
||||
# Warnings
|
||||
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Votre paramètre PHP upload_max_filesize (%s) est supérieur au paramètre PHP post_max_size (%s). Ceci n'est pas une configuration cohérente.
|
||||
|
||||
@@ -177,3 +177,4 @@ ApiObjectDeleted=L'API pour l'objet %s a été supprimée avec succès
|
||||
CRUDRead=Lire
|
||||
CRUDCreateWrite=Créer ou mettre à jour
|
||||
FailedToAddCodeIntoDescriptor=Échec de l'ajout de code dans le descripteur. Vérifiez que le commentaire de chaîne "%s" est toujours présent dans le fichier.
|
||||
DictionariesCreated = Le dictionnaire <b>%s</b> a été créé avec succès
|
||||
@@ -1553,15 +1553,39 @@ if ($dirins && $action == 'initobject' && $module && $objectname) {
|
||||
|
||||
// Add a dictionary
|
||||
if ($dirins && $action == 'initdic' && $module && $dicname) {
|
||||
$pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath'];
|
||||
$destdir = $dirins.'/'.strtolower($module);
|
||||
$moduledescriptorfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php';
|
||||
|
||||
if (!$error) {
|
||||
$newdicname = $dicname;
|
||||
if (!preg_match('/^c_/', $newdicname)) {
|
||||
$newdicname = 'c_'.$dicname;
|
||||
}
|
||||
dol_include_once($pathtofile);
|
||||
$class = 'mod'.$module;
|
||||
|
||||
// TODO
|
||||
|
||||
setEventMessages($langs->trans("FeatureNotYetAvailable"), null, 'errors');
|
||||
if (class_exists($class)) {
|
||||
try {
|
||||
$moduleobj = new $class($db);
|
||||
} catch (Exception $e) {
|
||||
$error++;
|
||||
dol_print_error($db, $e->getMessage());
|
||||
}
|
||||
} else {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
dol_print_error($db, $langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module));
|
||||
exit;
|
||||
}
|
||||
$dictionaries = $moduleobj->dictionaries;
|
||||
createNewDictionnary($module, $moduledescriptorfile, $newdicname, $dictionaries);
|
||||
if (function_exists('opcache_invalidate')) {
|
||||
opcache_reset(); // remove the include cache hell !
|
||||
}
|
||||
clearstatcache(true);
|
||||
header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : ''));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4088,6 +4112,7 @@ if ($module == 'initmodule') {
|
||||
$pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath'];
|
||||
|
||||
$dicts = $moduleobj->dictionaries;
|
||||
//var_dump($dicts);exit;
|
||||
|
||||
if ($action != 'editfile' || empty($file)) {
|
||||
print '<span class="opacitymedium">';
|
||||
@@ -4217,11 +4242,11 @@ if ($module == 'initmodule') {
|
||||
print $dicts['tabfieldinsert'][$i];
|
||||
print '</td>';
|
||||
|
||||
print '<td class="right">';
|
||||
print '<td >';
|
||||
print $dicts['tabrowid'][$i];
|
||||
print '</td>';
|
||||
|
||||
print '<td class="right">';
|
||||
print '<td >';
|
||||
print $dicts['tabcond'][$i];
|
||||
print '</td>';
|
||||
|
||||
@@ -4250,8 +4275,8 @@ if ($module == 'initmodule') {
|
||||
print '<span class="opacitymedium">'.$langs->trans("EnterNameOfDictionaryDesc").'</span><br><br>';
|
||||
|
||||
print '<input type="text" name="dicname" maxlength="64" value="'.dol_escape_htmltag(GETPOST('dicname', 'alpha') ? GETPOST('dicname', 'alpha') : $modulename).'" placeholder="'.dol_escape_htmltag($langs->trans("DicKey")).'" autofocus><br>';
|
||||
//print '<input type="checkbox" name="includerefgeneration" id="includerefgeneration" value="includerefgeneration"> <label for="includerefgeneration">'.$form->textwithpicto($langs->trans("IncludeRefGeneration"), $langs->trans("IncludeRefGenerationHelp")).'</label><br>';
|
||||
//print '<input type="checkbox" name="includedocgeneration" id="includedocgeneration" value="includedocgeneration"> <label for="includedocgeneration">'.$form->textwithpicto($langs->trans("IncludeDocGeneration"), $langs->trans("IncludeDocGenerationHelp")).'</label><br>';
|
||||
// print '<input type="checkbox" name="includerefgeneration" id="includerefgeneration" value="includerefgeneration"> <label for="includerefgeneration">'.$form->textwithpicto($langs->trans("IncludeRefGeneration"), $langs->trans("IncludeRefGenerationHelp")).'</label><br>';
|
||||
// print '<input type="checkbox" name="includedocgeneration" id="includedocgeneration" value="includedocgeneration"> <label for="includedocgeneration">'.$form->textwithpicto($langs->trans("IncludeDocGeneration"), $langs->trans("IncludeDocGenerationHelp")).'</label><br>';
|
||||
print '<input type="submit" class="button smallpaddingimp" name="create" value="'.dol_escape_htmltag($langs->trans("GenerateCode")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
|
||||
/*print '<br>';
|
||||
print '<br>';
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/projet/tasks/task.php
|
||||
* \file htdocs/projet/comment.php
|
||||
* \ingroup project
|
||||
* \brief Page of a project task
|
||||
* \brief Page of a project
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -37,71 +37,72 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if (isModEnabled('stock')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||
|
||||
if (isModEnabled('agenda')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
}
|
||||
if (isModEnabled("propal")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if (isModEnabled('banque')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
|
||||
}
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
if (isModEnabled('commande')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
}
|
||||
if (isModEnabled('contrat')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
}
|
||||
if (isModEnabled('deplacement')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
|
||||
}
|
||||
if (isModEnabled('don')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
}
|
||||
if (isModEnabled('expedition')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
|
||||
}
|
||||
if (isModEnabled('expensereport')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
}
|
||||
if (isModEnabled('facture')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php';
|
||||
}
|
||||
if (isModEnabled('commande')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
}
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
||||
}
|
||||
if (isModEnabled("supplier_invoice")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
}
|
||||
if (isModEnabled("supplier_order")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
}
|
||||
if (isModEnabled('contrat')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
}
|
||||
if (isModEnabled('ficheinter')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
}
|
||||
if (isModEnabled("expedition")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
|
||||
}
|
||||
if (isModEnabled('deplacement')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
|
||||
}
|
||||
if (isModEnabled('expensereport')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
}
|
||||
if (isModEnabled('agenda')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
}
|
||||
if (isModEnabled('don')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
}
|
||||
if (isModEnabled('loan')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php';
|
||||
}
|
||||
if (isModEnabled('stock')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
if (isModEnabled('mrp')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
|
||||
}
|
||||
if (isModEnabled('tax')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
}
|
||||
if (isModEnabled("banque")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
|
||||
if (isModEnabled('propal')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
}
|
||||
if (isModEnabled('salaries')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
|
||||
}
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
if (isModEnabled('stock')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
}
|
||||
if (isModEnabled('mrp')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
|
||||
if (isModEnabled('supplier_invoice')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
}
|
||||
if (isModEnabled('supplier_order')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
}
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
||||
}
|
||||
if (isModEnabled('tax')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('projects', 'companies', 'suppliers', 'compta'));
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/projet/tasks/task.php
|
||||
* \file htdocs/projet/tasks/comment.php
|
||||
* \ingroup project
|
||||
* \brief Page of a project task
|
||||
* \brief Page of a project task comment
|
||||
*/
|
||||
|
||||
require "../../main.inc.php";
|
||||
|
||||
Reference in New Issue
Block a user