Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443488
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443488
Commits
955ef193
Commit
955ef193
authored
16 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#196862
by catch: rolled back path optimization as it broke certain tests.
parent
6aea1d08
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
includes/path.inc
+7
-2
7 additions, 2 deletions
includes/path.inc
with
7 additions
and
2 deletions
includes/path.inc
+
7
−
2
View file @
955ef193
...
...
@@ -46,15 +46,20 @@ function drupal_init_path() {
function
drupal_lookup_path
(
$action
,
$path
=
''
,
$path_language
=
''
)
{
global
$language
;
// $map is an array with language keys, holding arrays of Drupal paths to alias relations
static
$map
=
array
(),
$no_src
=
array
();
static
$map
=
array
(),
$no_src
=
array
()
,
$count
;
$path_language
=
$path_language
?
$path_language
:
$language
->
language
;
// Use $count to avoid looking up paths in subsequent calls if there simply are no aliases
if
(
!
isset
(
$count
))
{
$count
=
db_result
(
db_query
(
'SELECT COUNT(pid) FROM {url_alias}'
));
}
if
(
$action
==
'wipe'
)
{
$map
=
array
();
$no_src
=
array
();
}
elseif
(
module_exists
(
'path'
)
&&
$path
!=
''
)
{
elseif
(
$count
>
0
&&
$path
!=
''
)
{
if
(
$action
==
'alias'
)
{
if
(
isset
(
$map
[
$path_language
][
$path
]))
{
return
$map
[
$path_language
][
$path
];
...
...
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