Index: path.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/path.inc,v
retrieving revision 1.33
diff -u -p -r1.33 path.inc
--- path.inc	3 Apr 2009 17:41:32 -0000	1.33
+++ path.inc	4 May 2009 13:43:26 -0000
@@ -103,10 +103,11 @@ function drupal_lookup_path($action, $pa
 }
 
 /**
- * Given an internal Drupal path, return the alias set by the administrator.
+ * Given an internal Drupal path, return the alias set by the administrator. If
+ * no path is provided, 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 +115,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;
