Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
694530bf
Commit
694530bf
authored
9 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Gives the possibility to the module, to provide his own family info
and position of this family. (canceled $this->family)
parent
aa0b0021
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dev/skeletons/modMyModule.class.php
+4
-1
4 additions, 1 deletion
dev/skeletons/modMyModule.class.php
htdocs/admin/modules.php
+15
-7
15 additions, 7 deletions
htdocs/admin/modules.php
with
19 additions
and
8 deletions
dev/skeletons/modMyModule.class.php
+
4
−
1
View file @
694530bf
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-201
2
Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2005-201
6
Regis Houssin <regis.houssin@capnetworks.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
...
...
@@ -53,6 +53,9 @@ class modMyModule extends DolibarrModules
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this
->
family
=
"other"
;
// Gives the possibility to the module, to provide his own family info and position of this family. (canceled $this->family)
$this
->
familyinfo
=
array
(
'myownfamily'
=>
array
(
'position'
=>
'001'
,
'label'
=>
$langs
->
trans
(
"MyOwnFamily"
)));
// Module position in the family
$this
->
module_position
=
500
;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this
->
name
=
preg_replace
(
'/^mod/i'
,
''
,
get_class
(
$this
));
...
...
This diff is collapsed.
Click to expand it.
htdocs/admin/modules.php
+
15
−
7
View file @
694530bf
...
...
@@ -142,10 +142,10 @@ foreach ($modulesdir as $dir)
if
(
!
$objMod
->
numero
>
0
)
{
dol_syslog
(
'The module descriptor '
.
$modName
.
' must have a numero property'
,
LOG_ERR
);
dol_syslog
(
'The module descriptor '
.
$modName
.
' must have a numero property'
,
LOG_ERR
);
}
$j
=
$objMod
->
numero
;
$modulequalified
=
1
;
// We discard modules according to features level (PS: if module is activated we always show it)
...
...
@@ -161,17 +161,25 @@ foreach ($modulesdir as $dir)
{
$modules
[
$i
]
=
$objMod
;
$filename
[
$i
]
=
$modName
;
$special
=
$objMod
->
special
;
$familykey
=
$objMod
->
family
;
// Gives the possibility to the module, to provide his own family info and position of this family
if
(
is_array
(
$objMod
->
familyinfo
)
&&
!
empty
(
$objMod
->
familyinfo
))
{
$familyinfo
=
array_merge
(
$familyinfo
,
$objMod
->
familyinfo
);
$familykey
=
key
(
$objMod
->
familyinfo
);
}
else
{
$familykey
=
$objMod
->
family
;
}
$moduleposition
=
(
$objMod
->
module_position
?
$objMod
->
module_position
:
'500'
);
if
(
$moduleposition
==
500
&&
(
$objMod
->
isCoreOrExternalModule
()
==
'external'
))
{
$moduleposition
=
800
;
}
if
(
$special
==
1
)
$familykey
=
'interface'
;
$orders
[
$i
]
=
$familyinfo
[
$familykey
][
'position'
]
.
"_"
.
$familykey
.
"_"
.
$moduleposition
.
"_"
.
$j
;
// Sort by family, then by module position then number
$dirmod
[
$i
]
=
$dir
;
// Set categ[$i]
...
...
@@ -323,7 +331,7 @@ if ($mode != 'marketplace')
$objMod
=
$modules
[
$key
];
$special
=
$objMod
->
special
;
//print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."<br>";
//if (($mode != (isset($specialtostring[$special])?$specialtostring[$special]:'unknown') && $mode != 'expdev')
if
((
$special
>=
4
&&
$mode
!=
'expdev'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment