Index: includes/path.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/path.inc,v
retrieving revision 1.33
diff -u -p -r1.33 path.inc
--- includes/path.inc	3 Apr 2009 17:41:32 -0000	1.33
+++ includes/path.inc	5 May 2009 17:57:51 -0000
@@ -105,8 +105,10 @@ function drupal_lookup_path($action, $pa
 /**
  * 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.
+ *   An optional internal Drupal path.
  * @param $path_language
  *   An optional language code to look up the path in.
  *
@@ -114,7 +116,11 @@ function drupal_lookup_path($action, $pa
  *   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;
