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
a7e73eaf
Commit
a7e73eaf
authored
15 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Add constant to put static ressources on another server/domain
parent
43caf14b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/master.inc.php
+9
-7
9 additions, 7 deletions
htdocs/master.inc.php
with
9 additions
and
7 deletions
htdocs/master.inc.php
+
9
−
7
View file @
a7e73eaf
...
...
@@ -77,13 +77,15 @@ if (empty($dolibarr_main_data_root))
$dolibarr_main_data_root
=
ereg_replace
(
"/htdocs"
,
""
,
$dolibarr_main_document_root
);
$dolibarr_main_data_root
.
=
"/documents"
;
}
define
(
'DOL_DOCUMENT_ROOT'
,
$dolibarr_main_document_root
);
// Filesystem pages php (htdocs)
define
(
'DOL_DATA_ROOT'
,
$dolibarr_main_data_root
);
// Filesystem donnes (documents)
define
(
'DOL_MAIN_URL_ROOT'
,
$dolibarr_main_url_root
);
// URL racine absolue
$uri
=
eregi_replace
(
'^http(s?)://'
,
''
,
$dolibarr_main_url_root
);
$pos
=
strstr
(
$uri
,
'/'
);
// $pos contient alors url sans nom domaine
if
(
$pos
==
'/'
)
$pos
=
''
;
// si $pos vaut /, on le met a ''
define
(
'DOL_URL_ROOT'
,
$pos
);
// URL racine relative
// Define some constants
define
(
'DOL_DOCUMENT_ROOT'
,
$dolibarr_main_document_root
);
// Filesystem pages php (htdocs)
define
(
'DOL_DATA_ROOT'
,
$dolibarr_main_data_root
);
// Filesystem donnes (documents)
define
(
'DOL_MAIN_URL_ROOT'
,
$dolibarr_main_url_root
);
// URL relative root
$uri
=
eregi_replace
(
'^http(s?)://'
,
''
,
$dolibarr_main_url_root
);
// $suburi contains url without http*
$suburi
=
strstr
(
$uri
,
'/'
);
// $suburi contains url without domain
if
(
$suburi
==
'/'
)
$suburi
=
''
;
// If $suburi is /, it is now ''
define
(
'DOL_URL_ROOT'
,
$suburi
);
// URL relative root ('/', '/dolibarr', ...)
if
(
!
empty
(
$dolibarr_main_url_root_static
))
define
(
'DOL_URL_ROOT_FULL_STATIC'
,
$dolibarr_main_url_root_static
);
// Used to put static images on another domain
/*
...
...
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