summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-04-26 07:50:51 +0000
committerDries Buytaert <dries@buytaert.net>2009-04-26 07:50:51 +0000
commit9af602fe17e6346360e640e403843494c84ecca0 (patch)
tree4b2c2b450335f8d2da45829ef7402e9ba5a230b3 /includes/common.inc
parent3fe4c4e1c439b7804cabf4cd5fe3b6e5d5bb97d4 (diff)
downloadbrdo-9af602fe17e6346360e640e403843494c84ecca0.tar.gz
brdo-9af602fe17e6346360e640e403843494c84ecca0.tar.bz2
- Patch #432864 by mcrittenden, franskuipers: improved documentation for base_path().
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc14
1 files changed, 12 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 2e8ef3010..98d5760f5 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1938,8 +1938,18 @@ function drupal_get_path($type, $name) {
}
/**
- * Returns the base URL path of the Drupal installation.
- * At the very least, this will always default to /.
+ * Returns the base URL path of the Drupal installation, i.e.,
+ * the directory where Drupal is installed. At the very least,
+ * this will return "/".
+ *
+ * NOTE: base_path prefixes and suffixes a "/" onto the returned
+ * path if the path is not empty. See examples below.
+ *
+ * Example #1: Drupal installed at "http://yoursite.com" means
+ * this will just return "/" because the path is empty.
+ *
+ * Example #2: Drupal installed at "http://yoursite.com/drupal/folder"
+ * means this function will return "/drupal/folder/".
*/
function base_path() {
return $GLOBALS['base_path'];