Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
ba40a416
Commit
ba40a416
authored
May 7, 2009
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
#445152
by caktux and akahn: Default drupal_get_path_alias() to returning the current page's alias.
parent
0f08d97b
Loading
Loading
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/path.inc
+8
-1
8 additions, 1 deletion
includes/path.inc
with
8 additions
and
1 deletion
includes/path.inc
+
8
−
1
View file @
ba40a416
...
...
@@ -105,6 +105,9 @@ function drupal_lookup_path($action, $path = '', $path_language = '') {
/**
* Given an internal Drupal path, return the alias set by the administrator.
*
* If no path is provided, the function will return the alias of the current
* page.
*
* @param $path
* An internal Drupal path.
* @param $path_language
...
...
@@ -114,7 +117,11 @@ function drupal_lookup_path($action, $path = '', $path_language = '') {
* An aliased path if one was found, or the original path if no alias was
* found.
*/
function
drupal_get_path_alias
(
$path
,
$path_language
=
''
)
{
function
drupal_get_path_alias
(
$path
=
NULL
,
$path_language
=
''
)
{
// If no path is specified, use the current page's path.
if
(
$path
==
NULL
)
{
$path
=
$_GET
[
'q'
];
}
$result
=
$path
;
if
(
$alias
=
drupal_lookup_path
(
'alias'
,
$path
,
$path_language
))
{
$result
=
$alias
;
...
...
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