X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/blobdiff_plain/c25aaf4ffab73194680be3c70019da0eaafe63a2..29089cb8d01a4748b84995178051d39e3e960ae9:/base/src/BIFE/Link.php diff --git a/base/src/BIFE/Link.php b/base/src/BIFE/Link.php index 65a134b..0929c3f 100644 --- a/base/src/BIFE/Link.php +++ b/base/src/BIFE/Link.php @@ -85,6 +85,9 @@ class BIFE_Link extends BIFE_Container { function getURL($attrs) // ~X2C { $url = @$attrs['URL']; + if (substr($url, strlen($url)-1) == '/') { + $url .= 'index.xbf'; // TODO - add a configuration option for this. + } unset($attrs['URL']); $query = array(); foreach($attrs as $name => $value) { @@ -101,6 +104,32 @@ class BIFE_Link extends BIFE_Container { } // -X2C + // +X2C Operation 160 + /** + * Gets the relative path of the current BIFE file for web (URL) usage. + * + * @return string + * @access public + */ + function getWebPath() // ~X2C + { + return (@$_SERVER['PATH_INFO']) ? '../' : './'; + } + // -X2C + + // +X2C Operation 161 + /** + * Gets the relative path of the current BIFE file for filesystem usage. + * + * @return string + * @access public + */ + function getFsPath() // ~X2C + { + return dirname('.' . @$_SERVER['PATH_INFO']) . '/'; + } + // -X2C + // +X2C Operation 157 /** * Renders the widget. @@ -119,4 +148,4 @@ class BIFE_Link extends BIFE_Container { } // -X2C Class :Link -?> +?> \ No newline at end of file