? current_path.patch
? sites/default/files
? sites/default/settings.php
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.875
diff -u -p -r1.875 common.inc
--- includes/common.inc	11 Apr 2009 22:19:44 -0000	1.875
+++ includes/common.inc	13 Apr 2009 06:00:57 -0000
@@ -1967,6 +1967,19 @@ function base_path() {
 }
 
 /**
+ * Returns the current URL path of the page being viewed.
+ * Example #1: For a user viewing http://example.com/node/306
+ * this function would return "node/306".
+ * 
+ * Example #2: When viewing http://example.com/drupalfolder/node/306
+ * this function would still return "node/306" and base_path() would
+ * return "/drupalfolder/".  
+ */
+function current_path() {
+  return $_GET['q'];
+}
+
+/**
  * Add a <link> tag to the page's HEAD.
  *
  * This function can be called as long the HTML header hasn't been sent.
