]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2428 adds elgg_get_plugin_path() and elgg_get_data_path()
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 30 Nov 2010 01:13:16 +0000 (01:13 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 30 Nov 2010 01:13:16 +0000 (01:13 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7476 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/configuration.php
engine/lib/elgglib.php

index bf5122653b36440646ac32a8ec86f9abaad9a316..4b908de5196bba6436ab3c0ff3e9c46b2a218948 100644 (file)
  * @subpackage Configuration
  */
 
+/**
+ * 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
  *
index ec67f97cf9f6ece0226b48b619e811c0b08635dd..7c787e513a6ff5fd37c0dc91ac69bbcda7688377 100644 (file)
@@ -1457,27 +1457,6 @@ function callpath_gatekeeper($path, $include_subdirs = true, $strict_mode = fals
        return false;
 }
 
-/**
- * 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.
  *