Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
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
die_coolen_jungs
our_own_cloud_project
Commits
04824162
Commit
04824162
authored
12 years ago
by
Bart Visscher
Browse files
Options
Downloads
Patches
Plain Diff
core.js and core.css don't need to be absolute
parent
d5e91216
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/helper.php
+12
-1
12 additions, 1 deletion
lib/helper.php
lib/templatelayout.php
+2
-2
2 additions, 2 deletions
lib/templatelayout.php
with
14 additions
and
3 deletions
lib/helper.php
+
12
−
1
View file @
04824162
...
...
@@ -100,6 +100,17 @@ class OC_Helper {
return
OC_Request
::
serverProtocol
()
.
'://'
.
OC_Request
::
serverHost
()
.
$url
;
}
/**
* @brief Creates an url for remote use
* @param string $service id
* @return string the url
*
* Returns a url to the given service.
*/
public
static
function
linkToRemoteBase
(
$service
)
{
return
self
::
linkTo
(
''
,
'remote.php'
)
.
'/'
.
$service
;
}
/**
* @brief Creates an absolute url for remote use
* @param string $service id
...
...
@@ -108,7 +119,7 @@ class OC_Helper {
* Returns a absolute url to the given service.
*/
public
static
function
linkToRemote
(
$service
,
$add_slash
=
true
)
{
return
self
::
linkTo
Absolute
(
''
,
'remote.php'
)
.
'/'
.
$service
.
((
$add_slash
&&
$service
[
strlen
(
$service
)
-
1
]
!=
'/'
)
?
'/'
:
''
);
return
self
::
makeURL
Absolute
(
self
::
linkToRemoteBase
(
$service
))
.
((
$add_slash
&&
$service
[
strlen
(
$service
)
-
1
]
!=
'/'
)
?
'/'
:
''
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
lib/templatelayout.php
+
2
−
2
View file @
04824162
...
...
@@ -49,7 +49,7 @@ class OC_TemplateLayout extends OC_Template {
$jsfiles
=
self
::
findJavascriptFiles
(
OC_Util
::
$scripts
);
$this
->
assign
(
'jsfiles'
,
array
(),
false
);
if
(
!
empty
(
OC_Util
::
$core_scripts
))
{
$this
->
append
(
'jsfiles'
,
OC_Helper
::
linkToRemote
(
'core.js'
,
false
));
$this
->
append
(
'jsfiles'
,
OC_Helper
::
linkToRemote
Base
(
'core.js'
,
false
));
}
foreach
(
$jsfiles
as
$info
)
{
$root
=
$info
[
0
];
...
...
@@ -62,7 +62,7 @@ class OC_TemplateLayout extends OC_Template {
$cssfiles
=
self
::
findStylesheetFiles
(
OC_Util
::
$styles
);
$this
->
assign
(
'cssfiles'
,
array
());
if
(
!
empty
(
OC_Util
::
$core_styles
))
{
$this
->
append
(
'cssfiles'
,
OC_Helper
::
linkToRemote
(
'core.css'
,
false
));
$this
->
append
(
'cssfiles'
,
OC_Helper
::
linkToRemote
Base
(
'core.css'
,
false
));
}
foreach
(
$cssfiles
as
$info
)
{
$root
=
$info
[
0
];
...
...
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