[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 07/09: Change menu code , replace CFG by C0 o
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 07/09: Change menu code , replace CFG by C0 or C1 , new standard |
Date: |
Fri, 9 Aug 2024 15:18:16 -0400 (EDT) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit a618ef4a44f0f5bb3e12065e18d61d8fa36d4ffa
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Aug 9 21:11:21 2024 +0200
Change menu code , replace CFG by C0 or C1 , new standard
---
html/ajax_misc.php | 6 +++---
html/js/noalyss_script.js | 6 +++---
include/acc_currency_cfg.inc.php | 2 +-
include/ajax/ajax_accounting.php | 2 +-
include/ajax/ajax_activate_plugin.php | 2 +-
include/ajax/ajax_add_menu.php | 2 +-
include/ajax/ajax_admin.php | 2 +-
include/ajax/ajax_currency.php | 4 ++--
include/ajax/ajax_display_submenu.php | 4 ++--
include/ajax/ajax_document_state.php | 4 ++--
include/ajax/ajax_get_profile.php | 2 +-
include/ajax/ajax_remove_submenu.php | 2 +-
include/ajax/ajax_tag_group.php | 2 +-
include/ajax/ajax_tag_save.php | 2 +-
include/ajax/ajax_tag_set_group.php | 2 +-
include/ajax/ajax_user_security.php | 4 ++--
include/class/acc_currency.class.php | 2 +-
include/class/acc_ledger.class.php | 2 +-
include/class/acc_ledger_fin.class.php | 2 +-
include/class/extension.class.php | 2 +-
include/class/tva_rate_mtable.class.php | 2 +-
include/contact_option_ref.inc.php | 2 +-
include/export/export_document_template.php | 2 +-
include/lib/ac_common.php | 2 +-
include/user_detail.inc.php | 2 +-
scenario/cfgpcm-ajout-poste.php | 4 ++--
scenario/cfgpcmn.php | 4 ++--
scenario/menu-cfgled.php | 4 ++--
scenario/menu-cfgpcmn.php | 4 ++--
sql/upgrade.sql | 22 +++++++++++++++++++++-
30 files changed, 62 insertions(+), 42 deletions(-)
diff --git a/html/ajax_misc.php b/html/ajax_misc.php
index c4dbce961..bb676e1e3 100644
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@ -159,9 +159,9 @@ $path = array(
"user_sec_action"=>"ajax_user_security",
// Update in once all the ledgers
"ledger_access_all"=>"ajax_user_security",
- // From the page CFGSEC,set the actions
+ // From the page C0SEC,set the actions
"action_access"=>"ajax_user_security",
- // From the page CFGSEC,set all the actions
+ // From the page C0SEC,set all the actions
"action_access_all"=>"ajax_user_security",
"todo_list"=>"ajax_todo_list",
// Writing operation History for a card or an accounting
@@ -248,7 +248,7 @@ $path = array(
"anc_accounting"=>"ajax_anc_accounting",
// Update name and description
"anc_updatedescription"=>"ajax_anc_plan",
- // Update, insert or delete accounting frmo CFGPCMN
+ // Update, insert or delete accounting frmo C0PCMN
"accounting"=>"ajax_accounting",
// Show detail of an ANC operation
"anc_detail_op"=>"ajax_anc_detail_operation",
diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js
index 6d36b9ca2..e21663ea0 100644
--- a/html/js/noalyss_script.js
+++ b/html/js/noalyss_script.js
@@ -1576,7 +1576,7 @@ function display_sub_menu(p_dossier, p_profile, p_dep,
p_level) {
}
/**
- * in CFGPRO, ask to confirm before removing a submenu and its children
+ * in C0PROFL, ask to confirm before removing a submenu and its children
* @param {type} p_dossier
* @param {type} profile_menu_id
* @returns {undefined}
@@ -3840,7 +3840,7 @@ function toggle_checkbox_onoff(icon_domid, p_value_domid)
{
}
/**
- * in CFGLED show or hide the row depending if the warning is enable or not
+ * in C0JRN show or hide the row depending if the warning is enable or not
*
* @param {type} p_enable
* @param {type} p_row
@@ -4280,7 +4280,7 @@ function check_password_strength(p_pass_domid,
p_result_domid, details) {
}
/**
- * activate a plugin , must comes from CFGPLUGIN
+ * activate a plugin , must comes from C0PLG
* @param elt {string} DOMID of the element, must have the attribute
gDossier, plugin and pr_id (for the profile)
* @test
*/
diff --git a/include/acc_currency_cfg.inc.php b/include/acc_currency_cfg.inc.php
index 2f1f8d494..31d7502a3 100644
--- a/include/acc_currency_cfg.inc.php
+++ b/include/acc_currency_cfg.inc.php
@@ -23,7 +23,7 @@ if (!defined('ALLOWED')) { die('Appel direct ne sont pas
permis'); }
/**
* @file
- * @brief CFGCURRENCY Manage the currency and the rate
+ * @brief C0DEV Manage the currency and the rate
* @example test_currency_mtable.php
*/
diff --git a/include/ajax/ajax_accounting.php b/include/ajax/ajax_accounting.php
index cb853e785..da49f956a 100644
--- a/include/ajax/ajax_accounting.php
+++ b/include/ajax/ajax_accounting.php
@@ -37,7 +37,7 @@ try {
echo $e->getMessage();
return;
}
-if ( $g_user->check_module("CFGPCMN") == 0) die();
+if ( $g_user->check_module("C0PCMN") == 0) die();
$obj=new Acc_Plan_SQL($cn);
diff --git a/include/ajax/ajax_activate_plugin.php
b/include/ajax/ajax_activate_plugin.php
index f943a314c..885fecfd7 100644
--- a/include/ajax/ajax_activate_plugin.php
+++ b/include/ajax/ajax_activate_plugin.php
@@ -28,7 +28,7 @@ if (!defined('ALLOWED'))
global $g_user;
-if ($g_user->check_module('CFGPLUGIN') == 0) die();
+if ($g_user->check_module('C0PLG') == 0) die();
try {
$me_code = $http->get("mecode");
diff --git a/include/ajax/ajax_add_menu.php b/include/ajax/ajax_add_menu.php
index 97b7c5337..66b13ccfb 100644
--- a/include/ajax/ajax_add_menu.php
+++ b/include/ajax/ajax_add_menu.php
@@ -37,7 +37,7 @@ if (!defined('ALLOWED'))
die('Appel direct ne sont pas permis');
// Security
-if ($g_user->check_module('CFGPRO')==0)
+if ($g_user->check_module('C0PROFL')==0)
die();
$http=new HttpInput();
diff --git a/include/ajax/ajax_admin.php b/include/ajax/ajax_admin.php
index b49d96053..da1165fdf 100644
--- a/include/ajax/ajax_admin.php
+++ b/include/ajax/ajax_admin.php
@@ -414,7 +414,7 @@ if ($op=='upgradePlugin')
$progress->set_value(55);
$plugin->install();
$progress->set_value(100);
- echo _("L'extension doit être activée dans le dossier avec CFGPLUGIN");
+ echo _("L'extension doit être activée dans le dossier avec C0PLG");
return;
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/include/ajax/ajax_currency.php b/include/ajax/ajax_currency.php
index fc84c6e1b..8ac4e01cc 100644
--- a/include/ajax/ajax_currency.php
+++ b/include/ajax/ajax_currency.php
@@ -45,9 +45,9 @@ catch (Exception $ex)
/* security check */
/**
- * check if module CFGCURRENCY
+ * check if module C0DEV
*/
-if ($g_user->check_module('CFGCURRENCY')==0)
+if ($g_user->check_module('C0DEV')==0)
{
return;
}
diff --git a/include/ajax/ajax_display_submenu.php
b/include/ajax/ajax_display_submenu.php
index ae8f9d799..7713ccb81 100644
--- a/include/ajax/ajax_display_submenu.php
+++ b/include/ajax/ajax_display_submenu.php
@@ -21,7 +21,7 @@
/**
* @file
* @brief call from ajax : display submenu
- * Security : only user with the menu CFGPRO
+ * Security : only user with the menu C0PROFL
* display the submenu of a menu or a module
* It expects 2 parameters = p_profile (profile.p_id) and the dep
(menu_ref.me_code)
*/
@@ -29,7 +29,7 @@
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
// Security
-if ( $g_user->check_module('CFGPRO') == 0 ) die();
+if ( $g_user->check_module('C0PROFL') == 0 ) die();
$http=new HttpInput();
diff --git a/include/ajax/ajax_document_state.php
b/include/ajax/ajax_document_state.php
index ebb5a3f3a..25d990e71 100644
--- a/include/ajax/ajax_document_state.php
+++ b/include/ajax/ajax_document_state.php
@@ -23,8 +23,8 @@ if (!defined('ALLOWED')) die('Appel direct ne sont pas
permis');
global $g_user;
-if ( $g_user->check_module('CFGDOCST') == 0 ) {
- record_log("forbidden : CFGDOCST ".__FILE__);
+if ( $g_user->check_module('C1DOC') == 0 ) {
+ record_log("forbidden : C1DOC ".__FILE__);
exit();
}
diff --git a/include/ajax/ajax_get_profile.php
b/include/ajax/ajax_get_profile.php
index b093130da..4de569d4d 100644
--- a/include/ajax/ajax_get_profile.php
+++ b/include/ajax/ajax_get_profile.php
@@ -29,7 +29,7 @@
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
// Security
-if ( $g_user->check_module('CFGPRO') == 0 ) die();
+if ( $g_user->check_module('C0PROFL') == 0 ) die();
require_once NOALYSS_INCLUDE.'/database/profile_sql.class.php';
$http=new HttpInput();
diff --git a/include/ajax/ajax_remove_submenu.php
b/include/ajax/ajax_remove_submenu.php
index 3d0ac275a..9a147b520 100644
--- a/include/ajax/ajax_remove_submenu.php
+++ b/include/ajax/ajax_remove_submenu.php
@@ -28,7 +28,7 @@ if ( ! defined ('ALLOWED') ) die(_('Non autorisé'));
$http=new HttpInput();
// Security
-if ($g_user->check_module('CFGPRO')==0)
+if ($g_user->check_module('C0PROFL')==0)
die();
try
{
diff --git a/include/ajax/ajax_tag_group.php b/include/ajax/ajax_tag_group.php
index b433e43b6..08afe3e89 100644
--- a/include/ajax/ajax_tag_group.php
+++ b/include/ajax/ajax_tag_group.php
@@ -22,7 +22,7 @@
if (!defined('ALLOWED'))
die('Appel direct ne sont pas permis');
-if ( $g_user->check_module('CFGTAG') == 0 ) {
+if ( $g_user->check_module('C0TAG') == 0 ) {
record_log("forbidden : AJT01 ".__FILE__);
exit();
}
diff --git a/include/ajax/ajax_tag_save.php b/include/ajax/ajax_tag_save.php
index c79abbf3f..017e99031 100644
--- a/include/ajax/ajax_tag_save.php
+++ b/include/ajax/ajax_tag_save.php
@@ -12,7 +12,7 @@ $op=$http->request("op");
global $g_user;
$nDossier=Dossier::id();
///check security
-if ( $g_user->check_module('CFGTAG')==0 && $g_user->check_action(TAGADD) ==
0)
+if ( $g_user->check_module('C0TAG')==0 && $g_user->check_action(TAGADD) == 0)
{
die(_("non permis"));
}
diff --git a/include/ajax/ajax_tag_set_group.php
b/include/ajax/ajax_tag_set_group.php
index 255953ab9..17b835463 100644
--- a/include/ajax/ajax_tag_set_group.php
+++ b/include/ajax/ajax_tag_set_group.php
@@ -28,7 +28,7 @@ if (!defined('ALLOWED'))
* @brief
*/
global $g_user;
-$g_user->can_request('CFGTAG');
+$g_user->can_request('C0TAG');
/*
* Received parameter
diff --git a/include/ajax/ajax_user_security.php
b/include/ajax/ajax_user_security.php
index e440fa1fd..1274a1301 100644
--- a/include/ajax/ajax_user_security.php
+++ b/include/ajax/ajax_user_security.php
@@ -26,11 +26,11 @@ if (!defined('ALLOWED'))
/**
* @file
- * @brief Manage the security of a ledger , from CFGSEC module
+ * @brief Manage the security of a ledger , from C0SEC module
*
*/
global $g_user;
-if ( $g_user->check_module("CFGSEC") == 0)
+if ( $g_user->check_module("C0SEC") == 0)
throw new Exception(_("Non autorisé"));
$n_dossier_id=Dossier::id();
diff --git a/include/class/acc_currency.class.php
b/include/class/acc_currency.class.php
index e1ebf3a62..23f1be8ac 100644
--- a/include/class/acc_currency.class.php
+++ b/include/class/acc_currency.class.php
@@ -157,7 +157,7 @@ class Acc_Currency
and currency_id=$2";
$value=$this->cn->get_value($sql,[$p_date,$this->get_id()]);
if ($value == "") {
- throw new Exception(_("Aucun taux à cette date , aller sur
CFGCURRENCY"));
+ throw new Exception(_("Aucun taux à cette date , aller sur
C0DEV"));
}
return $value;
}
diff --git a/include/class/acc_ledger.class.php
b/include/class/acc_ledger.class.php
index b99717eaa..2f08d0063 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -3027,7 +3027,7 @@ class Acc_Ledger extends jrn_def_sql
Array
(
[gDossier] => 25
- [ac] => CFG/MACC/CFGLED
+ [ac] => CFG/MACC/C0JRN
[p_jrn] => -1
[p_action] => jrn
[sa] => add
diff --git a/include/class/acc_ledger_fin.class.php
b/include/class/acc_ledger_fin.class.php
index 808d625ed..288ee9025 100644
--- a/include/class/acc_ledger_fin.class.php
+++ b/include/class/acc_ledger_fin.class.php
@@ -328,7 +328,7 @@ class Acc_Ledger_Fin extends Acc_Ledger
if ($this->bank_id=="")
{
echo h2("Journal de banque non configuré ".$this->get_name(), '
class="error"');
- echo '<span class="error"> vous devez donner à ce journal un
compte en banque (fiche), modifiez dans CFGLED</span>';
+ echo '<span class="error"> vous devez donner à ce journal un
compte en banque (fiche), modifiez dans C0JRN</span>';
alert("Journal de banque non configuré ".$this->get_name());
}
diff --git a/include/class/extension.class.php
b/include/class/extension.class.php
index 58253f276..51227aa9b 100644
--- a/include/class/extension.class.php
+++ b/include/class/extension.class.php
@@ -162,7 +162,7 @@ class Extension extends Menu_Ref_sql
// throw an exception if there is no dependency
if (empty($dep_id))
{
- $msg = sprintf(_("Le menu %s dont dépend %s doit être crée ou %s
doit être ajouté depuis le menu CFGPRO"),
+ $msg = sprintf(_("Le menu %s dont dépend %s doit être crée ou %s
doit être ajouté depuis le menu C0PROFL"),
$p_module,$this->me_code,$this->me_code);
throw new Exception($msg, 30);
}
diff --git a/include/class/tva_rate_mtable.class.php
b/include/class/tva_rate_mtable.class.php
index 09c59821a..95552c4dd 100644
--- a/include/class/tva_rate_mtable.class.php
+++ b/include/class/tva_rate_mtable.class.php
@@ -155,7 +155,7 @@ class Tva_Rate_MTable extends Manage_Table_SQL
$text->set_attribute('jrn', 0);
$text->set_attribute('account', 'tva_purchase');
echo $text->input();
-
$url="do.php?".http_build_query(array("gDossier"=>Dossier::id(),"ac"=>'CFGPCMN','p_start'=>4));
+
$url="do.php?".http_build_query(array("gDossier"=>Dossier::id(),"ac"=>'C0PCMN','p_start'=>4));
echo HtmlInput::anchor(_("Configuration poste
comptable"),$url,"",'target="_blank"');
}
elseif ($key=='tva_sale')
diff --git a/include/contact_option_ref.inc.php
b/include/contact_option_ref.inc.php
index abf91101e..5975ae8e1 100644
--- a/include/contact_option_ref.inc.php
+++ b/include/contact_option_ref.inc.php
@@ -41,7 +41,7 @@ catch (Exception $ex)
$cn=Dossier::connect();
echo '<p class="info">'.
'<a href="https://wiki.noalyss.eu/doku.php?id=menu:cfgaction"
target="_blank">'.
- _("Aide : voir CFGACTION").
+ _("Aide : voir C0ACT").
'</a>'.
'</p>';
// document_option id from document_option where do_code='contact_multiple'
and document_type_id=p_id
diff --git a/include/export/export_document_template.php
b/include/export/export_document_template.php
index 31cab7d9a..eea0af793 100644
--- a/include/export/export_document_template.php
+++ b/include/export/export_document_template.php
@@ -23,7 +23,7 @@
*/
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
-if ( $g_user->check_module("CFGDOC") == 0 ) exit();
+if ( $g_user->check_module("C0DOC") == 0 ) exit();
// retrieve the document
$r=$cn->exec_sql("select md_id,md_lob,md_filename,md_mimetype
from document_modele where
md_id=$1",array($_REQUEST['md_id']));
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index dccd98b17..9b5a2a87a 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -1044,7 +1044,7 @@ function find_default_module()
$cn->exec_sql('insert into
profile_user(user_name,p_id) values ($1,1) ',array($g_user->login));
return find_default_module();
}
- echo_warning(_("Utilisateur n'a pas de profil,
votre administrateur doit en configurer un dans CFGSEC"));
+ echo_warning(_("Utilisateur n'a pas de profil,
votre administrateur doit en configurer un dans C0SEC"));
exit();
}
}
diff --git a/include/user_detail.inc.php b/include/user_detail.inc.php
index 3a3c61c8d..9184a8e7e 100644
--- a/include/user_detail.inc.php
+++ b/include/user_detail.inc.php
@@ -160,7 +160,7 @@ if ($UserChange->admin == 0 ) :
<p class="notice">
Les autres droits doivent être réglés dans les dossiers
(paramètre->sécurité), le fait de changer un utilisateur d'administrateur à
utilisateur
normal ne change pas le profil administrateur dans les
dossiers.
- Il faut aller dans CFGSECURITY pour diminuer ses
privilèges.
+ Il faut aller dans C0SEC pour diminuer ses privilèges.
</p>
<?php
diff --git a/scenario/cfgpcm-ajout-poste.php b/scenario/cfgpcm-ajout-poste.php
index d698b1320..a85711b3a 100644
--- a/scenario/cfgpcm-ajout-poste.php
+++ b/scenario/cfgpcm-ajout-poste.php
@@ -1,8 +1,8 @@
<?php
-//@description:CFGPCMN Ajout d'un poste comptable
+//@description:C0PCMN Ajout d'un poste comptable
$_GET=array (
'gDossier' => '42',
- 'ac' => 'PARAM/CFGPCMN',
+ 'ac' => 'PARAM/C0PCMN',
);
$_POST=array (
'p_action' => 'pcmn',
diff --git a/scenario/cfgpcmn.php b/scenario/cfgpcmn.php
index d028bad94..0c956d8e9 100644
--- a/scenario/cfgpcmn.php
+++ b/scenario/cfgpcmn.php
@@ -1,8 +1,8 @@
<?php
-//@description:CFGPCMN Plan comptable
+//@description:C0PCMN Plan comptable
$_GET=array (
'gDossier' => '42',
- 'ac' => 'PARAM/CFGPCMN',
+ 'ac' => 'PARAM/C0PCMN',
);
$_POST=array (
);
diff --git a/scenario/menu-cfgled.php b/scenario/menu-cfgled.php
index fa5bf186c..02115f775 100644
--- a/scenario/menu-cfgled.php
+++ b/scenario/menu-cfgled.php
@@ -1,8 +1,8 @@
<?php
-//@description:CFGLED
+//@description:C0JRN
$_GET=array (
'gDossier' => '42',
- 'ac' => 'PARAM/CFGLED',
+ 'ac' => 'PARAM/C0JRN',
'sa' => 'detail',
'p_jrn' => '1',
);
diff --git a/scenario/menu-cfgpcmn.php b/scenario/menu-cfgpcmn.php
index 4675ee822..266001c3a 100644
--- a/scenario/menu-cfgpcmn.php
+++ b/scenario/menu-cfgpcmn.php
@@ -1,7 +1,7 @@
<?php
-//@description:CFGPCMN
+//@description:C0PCMN
$_GET=array (
- 'ac' => 'PARAM/CFGPCMN',
+ 'ac' => 'PARAM/C0PCMN',
'p_start' => '4',
'gDossier' => '42',
);
diff --git a/sql/upgrade.sql b/sql/upgrade.sql
index 3778e96ff..8f116d3cf 100644
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@ -1,3 +1,23 @@
alter table attr_min add ad_default_order int;
-update attr_min set ad_default_order = a1.ad_default_order from attr_def a1
where a1.ad_id = attr_min.ad_id;
\ No newline at end of file
+update attr_min set ad_default_order = a1.ad_default_order from attr_def a1
where a1.ad_id = attr_min.ad_id;
+
+
+select replace_menu_code('CFGACC','C0PST');
+select replace_menu_code('CFGDOC','C0DOC');
+select replace_menu_code('CFGSEC','C0SEC');
+select replace_menu_code('CFGPCMN','C0PCMN');
+select replace_menu_code('CFGPRO','C0PROFL');
+select replace_menu_code('CFGLED','C0JRN');
+select replace_menu_code('CFGDOCST','C1DOC');
+select replace_menu_code('CFGDEFMENU','C0MENU');
+select replace_menu_code('CFGPAY','C0PAY');
+select replace_menu_code('CFGCURRENCY','C0DEV');
+select replace_menu_code('CFGACTION','C0ACT');
+select replace_menu_code('CFGOPT1','C0OPT1');
+select replace_menu_code('CFGSTOCK','C0STOCK');
+select replace_menu_code('CFGPLUGIN','C0PLG');
+select replace_menu_code('CFGTAG','C0TAG');
+
+update menu_ref set me_description ='Configuration des extensions' where
me_code='C0PLG';
+update menu_ref set me_description ='Clef de répartition pour la comptabilité
analytique' where me_code='ANCKEY';
- [Noalyss-commit] [noalyss] branch unstable updated (451b9cb7c -> 99fbccdf1), dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 01/09: Bug : fix : ITVA does not change the label, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 03/09: CFGPRO : detail menu : add button close, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 02/09: CFGMENU : cosmetic, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 04/09: cfgplugin : activate plugin with simple click not confirmation needed, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 06/09: CMCARD : template of card, drag'n drop to order the attributes, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 07/09: Change menu code , replace CFG by C0 or C1 , new standard,
dwm <=
- [Noalyss-commit] [noalyss] 08/09: Fix : gettext for empty string calls the file header, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 09/09: Code clean : remove debug info, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 05/09: HtmlInput::get_node_attribute protect the attribute with htmlentity, dwm, 2024/08/09