mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-11 03:51:25 +01:00
fix problem for namedic
This commit is contained in:
@@ -1034,7 +1034,7 @@ function updateDictionaryInFile($module, $file, $dicts)
|
|||||||
|
|
||||||
$isEmpty = false;
|
$isEmpty = false;
|
||||||
$dicData = "\t\t\$this->dictionaries=array(\n";
|
$dicData = "\t\t\$this->dictionaries=array(\n";
|
||||||
|
$module = strtolower($module);
|
||||||
foreach ($dicts as $key => $value) {
|
foreach ($dicts as $key => $value) {
|
||||||
if (empty($value)) {
|
if (empty($value)) {
|
||||||
$isEmpty = true;
|
$isEmpty = true;
|
||||||
@@ -1140,7 +1140,7 @@ function createNewDictionnary($modulename, $file, $namedic, $dictionnaires = nul
|
|||||||
}
|
}
|
||||||
|
|
||||||
// rewrite dictionnary if
|
// rewrite dictionnary if
|
||||||
$dictionnaires['tabname'][] = $namedic;
|
$dictionnaires['tabname'][] = strtolower($namedic);
|
||||||
$dictionnaires['tablib'][] = ucfirst(substr($namedic, 2));
|
$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['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['tabsqlsort'][] = (array_key_exists('label', $columns) ? 'label ASC' : '');
|
||||||
|
|||||||
@@ -1978,7 +1978,8 @@ if ($dirins && $action == 'confirm_deletedictionary' && $dicname) {
|
|||||||
// search the key by name
|
// search the key by name
|
||||||
$keyToDelete = null;
|
$keyToDelete = null;
|
||||||
foreach ($dicts['tabname'] as $key => $table) {
|
foreach ($dicts['tabname'] as $key => $table) {
|
||||||
if ($table === $newdicname) {
|
//var_dump($table." /////// ".$newdicname);exit;
|
||||||
|
if (strtolower($table) === $newdicname) {
|
||||||
$keyToDelete = $key;
|
$keyToDelete = $key;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user