aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-30 01:13:16 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-30 01:13:16 +0000
commit1f0ea636d91fac4b4c51f3a98e940390ff5ed6a5 (patch)
treead50d69244e1c1c92f875538355dd20020cdef11 /engine
parente0122437519ae90315808119341faa114fec1e5b (diff)
downloadelgg-1f0ea636d91fac4b4c51f3a98e940390ff5ed6a5.tar.gz
elgg-1f0ea636d91fac4b4c51f3a98e940390ff5ed6a5.tar.bz2
Refs #2428 adds elgg_get_plugin_path() and elgg_get_data_path()
git-svn-id: http://code.elgg.org/elgg/trunk@7476 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/configuration.php44
-rw-r--r--engine/lib/elgglib.php21
2 files changed, 44 insertions, 21 deletions
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php
index bf5122653..4b908de51 100644
--- a/engine/lib/configuration.php
+++ b/engine/lib/configuration.php
@@ -18,6 +18,50 @@
*/
/**
+ * Get the URL for the current (or specified) site
+ *
+ * @param int $site_guid The GUID of the site whose URL we want to grab
+ * @return string
+ * @since 1.8.0
+ */
+function elgg_get_site_url($site_guid = 0) {
+ if ($site_guid == 0) {
+ global $CONFIG;
+ return $CONFIG->wwwroot;
+ }
+
+ $site = get_entity($site_guid);
+
+ if (!$site instanceof ElggSite) {
+ return false;
+ }
+
+ return $site->url;
+}
+
+/**
+ * Get the plugin path for this installation
+ *
+ * @return string
+ * @since 1.8.0
+ */
+function elgg_get_plugin_path() {
+ global $CONFIG;
+ return $CONFIG->pluginspath;
+}
+
+/**
+ * Get the data directory path for this installation
+ *
+ * @return string
+ * @since 1.8.0
+ */
+function elgg_get_data_path() {
+ global $CONFIG;
+ return $CONFIG->dataroot;
+}
+
+/**
* Get an Elgg configuration value
*
* @param string $name Name of the configuration value
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index ec67f97cf..7c787e513 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1458,27 +1458,6 @@ function callpath_gatekeeper($path, $include_subdirs = true, $strict_mode = fals
}
/**
- * Get the URL for the current (or specified) site
- *
- * @param int $site_guid The GUID of the site whose URL we want to grab
- * @return string
- */
-function elgg_get_site_url($site_guid = 0) {
- if ($site_guid == 0) {
- global $CONFIG;
- return $CONFIG->wwwroot;
- }
-
- $site = get_entity($site_guid);
-
- if (!$site instanceof ElggSite) {
- return false;
- }
-
- return $site->url;
-}
-
-/**
* Returns the current page's complete URL.
*
* The current URL is assembled using the network's wwwroot and the request URI