Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
Dwoo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Common
Dwoo
Commits
04c8b0ec
Commit
04c8b0ec
authored
Apr 14, 2008
by
Seldaek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fixes REQUEST_URI not being available in CLI
git-svn-id:
svn://dwoo.org/dwoo/trunk@26
0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent
918408ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
DwooTemplateFile.php
DwooTemplateFile.php
+5
-2
DwooTemplateString.php
DwooTemplateString.php
+4
-1
No files found.
DwooTemplateFile.php
View file @
04c8b0ec
...
...
@@ -57,10 +57,13 @@ class DwooTemplateFile extends DwooTemplateString
}
$this
->
compileId
=
$compileId
;
// no cache id provided, use request_uri
// no cache id provided, use request_uri
if available
if
(
$cacheId
===
null
)
{
$cacheId
=
strtr
(
$_SERVER
[
'REQUEST_URI'
],
'\\/%?=!:;'
,
'--------'
);
if
(
isset
(
$_SERVER
[
'REQUEST_URI'
])
===
true
)
$cacheId
=
strtr
(
$_SERVER
[
'REQUEST_URI'
],
'\\/%?=!:;'
,
'--------'
);
elseif
(
isset
(
$_SERVER
[
'SCRIPT_FILENAME'
])
&&
isset
(
$_SERVER
[
'argv'
]))
$cacheId
=
strtr
(
$_SERVER
[
'SCRIPT_FILENAME'
]
.
'-'
.
implode
(
'-'
,
$_SERVER
[
'argv'
]),
'\\/%?=!:;'
,
'--------'
);
}
$this
->
cacheId
=
$this
->
compileId
.
$cacheId
;
}
...
...
DwooTemplateString.php
View file @
04c8b0ec
...
...
@@ -109,7 +109,10 @@ class DwooTemplateString implements DwooITemplate
// no cache id provided, use request_uri
if
(
$cacheId
===
null
)
{
$cacheId
=
strtr
(
$_SERVER
[
'REQUEST_URI'
],
'\\/%?=!:;*"<>|'
,
'-------------'
);
if
(
isset
(
$_SERVER
[
'REQUEST_URI'
])
===
true
)
$cacheId
=
strtr
(
$_SERVER
[
'REQUEST_URI'
],
'\\/%?=!:;*"<>|'
,
'-------------'
);
elseif
(
isset
(
$_SERVER
[
'SCRIPT_FILENAME'
])
&&
isset
(
$_SERVER
[
'argv'
]))
$cacheId
=
strtr
(
$_SERVER
[
'SCRIPT_FILENAME'
]
.
'-'
.
implode
(
'-'
,
$_SERVER
[
'argv'
]),
'\\/%?=!:;'
,
'--------'
);
}
$this
->
cacheId
=
$this
->
compileId
.
$cacheId
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment