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
aab1a6d9
Commit
aab1a6d9
authored
11 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: Add hook addHomeSetup
parent
447d0063
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+1
-1
1 addition, 1 deletion
ChangeLog
htdocs/admin/index.php
+20
-13
20 additions, 13 deletions
htdocs/admin/index.php
with
21 additions
and
14 deletions
ChangeLog
+
1
−
1
View file @
aab1a6d9
...
...
@@ -69,7 +69,7 @@ For developers:
- New: Into POST forms, if you can add a parameter DOL_AUTOSET_COOKIE with a vlue that is list name,
separated by a coma, of other POST parameters, Dolibarr will automatically save this parameters
into user cookies.
- New: Add hook addHomeSetup.
WARNING: Following change may create regression for some external modules, but was necessary to make
Dolibarr better:
...
...
This diff is collapsed.
Click to expand it.
htdocs/admin/index.php
+
20
−
13
View file @
aab1a6d9
...
...
@@ -18,7 +18,7 @@
/**
* \file htdocs/admin/index.php
* \brief
Page d'accueil de l'espace administration/configuration
* \brief
Home page of setup area
*/
require
'../main.inc.php'
;
...
...
@@ -28,6 +28,9 @@ $langs->load("companies");
if
(
!
$user
->
admin
)
accessforbidden
();
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager
->
initHooks
(
array
(
'homesetup'
));
/*
* View
...
...
@@ -66,14 +69,11 @@ if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))
print
$langs
->
trans
(
"SetupDescription1"
)
.
' '
;
print
$langs
->
trans
(
"AreaForAdminOnly"
)
.
' '
;
//print "<br>";
//print "<br>";
print
$langs
->
trans
(
"SetupDescription2"
)
.
"<br><br>"
;
print
'<br>'
;
//print '<hr style="color: #DDDDDD;">';
// Show info setup company
if
(
empty
(
$conf
->
global
->
MAIN_INFO_SOCIETE_NOM
)
||
empty
(
$conf
->
global
->
MAIN_INFO_SOCIETE_COUNTRY
))
$setupcompanynotcomplete
=
1
;
print
img_picto
(
''
,
'puce'
)
.
' '
.
$langs
->
trans
(
"SetupDescription3"
,
DOL_URL_ROOT
.
'/admin/company.php?mainmenu=home'
.
(
empty
(
$setupcompanynotcomplete
)
?
''
:
'&action=edit'
));
if
(
!
empty
(
$setupcompanynotcomplete
))
...
...
@@ -85,7 +85,8 @@ if (! empty($setupcompanynotcomplete))
print
'<br>'
;
print
'<br>'
;
print
'<br>'
;
//print '<hr style="color: #DDDDDD;">';
// Show info setup module
print
img_picto
(
''
,
'puce'
)
.
' '
.
$langs
->
trans
(
"SetupDescription4"
,
DOL_URL_ROOT
.
'/admin/modules.php?mainmenu=home'
);
if
(
count
(
$conf
->
modules
)
<=
(
empty
(
$conf
->
global
->
MAIN_MINNB_MODULE
)
?
1
:
$conf
->
global
->
MAIN_MINNB_MODULE
))
// If only user module enabled
{
...
...
@@ -96,13 +97,19 @@ if (count($conf->modules) <= (empty($conf->global->MAIN_MINNB_MODULE)?1:$conf->g
print
'<br>'
;
print
'<br>'
;
print
'<br>'
;
//print '<hr style="color: #DDDDDD;">';
print
$langs
->
trans
(
"SetupDescription5"
)
.
"<br>"
;
//print '<hr style="color: #DDDDDD;">';
print
"<br>"
;
// Show logo
print
'<center><div class="logo_setup"></div></center>'
;
// Add hook to add information
$reshook
=
$hookmanager
->
executeHooks
(
'addHomeSetup'
,
$parameters
,
$object
,
$action
);
// Note that $action and $object may have been modified by some hooks
print
$hookmanager
->
resPrint
;
if
(
empty
(
$reshook
))
{
// Show into other
print
$langs
->
trans
(
"SetupDescription5"
)
.
"<br>"
;
print
"<br>"
;
// Show logo
print
'<center><div class="logo_setup"></div></center>'
;
}
llxFooter
();
...
...
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