aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-06-17 16:21:03 -0700
committerfriendica <info@friendica.com>2013-06-17 16:21:03 -0700
commit94c758080ff0b957d7d728428de5821c39a583e9 (patch)
treeedfdb7962c0ef4164f61d8db64ee9574551df13f /boot.php
parentf4e8198335960465b4ac6106f59e0346d08ece1f (diff)
downloadvolse-hubzilla-94c758080ff0b957d7d728428de5821c39a583e9.tar.gz
volse-hubzilla-94c758080ff0b957d7d728428de5821c39a583e9.tar.bz2
volse-hubzilla-94c758080ff0b957d7d728428de5821c39a583e9.zip
zidify bodies of notification emails
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/boot.php b/boot.php
index c0473a23c..2f70f1d47 100755
--- a/boot.php
+++ b/boot.php
@@ -2061,6 +2061,8 @@ function get_my_url() {
}
function get_my_address() {
+ if(x($_SESSION,'zid_override'))
+ return $_SESSION['zid_override'];
if(x($_SESSION,'my_address'))
return $_SESSION['my_address'];
return false;
@@ -2098,12 +2100,12 @@ function zid_init(&$a) {
}
/**
- * @function zid($s,$force = false)
+ * @function zid($s,$address = '')
* Adds a zid parameter to a url
* @param string $s
* The url to accept the zid
- * @param boolean $force
- * Currently unused
+ * @param boolean $address
+ * $address to use instead of session environment
* @return string
*
* @hooks 'zid'
@@ -2113,7 +2115,7 @@ function zid_init(&$a) {
*/
-function zid($s,$force = false) {
+function zid($s,$address = '') {
if(! strlen($s) || strpos($s,'zid='))
return $s;
$has_params = ((strpos($s,'?')) ? true : false);
@@ -2123,9 +2125,9 @@ function zid($s,$force = false) {
$achar = strpos($s,'?') ? '&' : '?';
$mine = get_my_url();
- $myaddr = get_my_address();
+ $myaddr = (($address) ? $address : get_my_address());
- if($mine and ! link_compare($mine,$s))
+ if($mine && $myaddr && (! link_compare($mine,$s)))
$zurl = $s . (($num_slashes >= 3) ? '' : '/') . $achar . 'zid=' . urlencode($myaddr);
else
$zurl = $s;