Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
d2175fdc
Commit
d2175fdc
authored
Oct 09, 2003
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed cache issue with path map.
parent
f2a9d01d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
includes/common.inc
includes/common.inc
+10
-2
No files found.
includes/common.inc
View file @
d2175fdc
...
...
@@ -29,17 +29,25 @@ function conf_init() {
* Build the alias/path array
*/
function
drupal_get_path_map
(
$action
=
""
)
{
static
$cache
;
static
$map
;
if
(
$action
==
"rebuild"
)
{
$map
=
NULL
;
$cache
=
0
;
}
if
(
empty
(
$map
))
{
$result
=
db_query
(
"SELECT * FROM
{
path
}
"
);
if
(
!
$cache
)
{
if
(
!
$result
)
{
$result
=
db_query
(
"SELECT * FROM
{
path
}
"
);
}
while
(
$data
=
db_fetch_object
(
$result
))
{
$map
[
$data
->
dst
]
=
$data
->
src
;
}
$cache
=
1
;
}
return
$map
;
...
...
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