aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-13 20:22:01 -0800
committerzotlabs <mike@macgirvin.com>2016-11-13 20:22:01 -0800
commit3c302bae5ac71c1853d33117f9bbcfc0e5d81651 (patch)
tree008ba03057e4b22312724155d8c45b7559eb4ca5 /include/channel.php
parent103cd2b7a15caaadd5ddf8a6b69c8e3de7a2982b (diff)
downloadvolse-hubzilla-3c302bae5ac71c1853d33117f9bbcfc0e5d81651.tar.gz
volse-hubzilla-3c302bae5ac71c1853d33117f9bbcfc0e5d81651.tar.bz2
volse-hubzilla-3c302bae5ac71c1853d33117f9bbcfc0e5d81651.zip
move all the zid related stuff to one file
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php54
1 files changed, 0 insertions, 54 deletions
diff --git a/include/channel.php b/include/channel.php
index e35f453de..de685ab4c 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1371,60 +1371,6 @@ function zat_init() {
-/**
- * @brief Adds a zid parameter to a url.
- *
- * @param string $s
- * The url to accept the zid
- * @param boolean $address
- * $address to use instead of session environment
- * @return string
- *
- * @hooks 'zid'
- * string url - url to accept zid
- * string zid - urlencoded zid
- * string result - the return string we calculated, change it if you want to return something else
- */
-function zid($s,$address = '') {
- if (! strlen($s) || strpos($s,'zid='))
- return $s;
-
- $m = parse_url($s);
- $fragment = ((array_key_exists('fragment',$m) && $m['fragment']) ? $m['fragment'] : false);
- if($fragment !== false)
- $s = str_replace('#' . $fragment,'',$s);
-
- $has_params = ((strpos($s,'?')) ? true : false);
- $num_slashes = substr_count($s, '/');
- if (! $has_params)
- $has_params = ((strpos($s, '&')) ? true : false);
-
- $achar = strpos($s,'?') ? '&' : '?';
-
- $mine = get_my_url();
- $myaddr = (($address) ? $address : get_my_address());
-
- /**
- * @FIXME checking against our own channel url is no longer reliable. We may have a lot
- * of urls attached to out channel. Should probably match against our site, since we
- * will not need to remote authenticate on our own site anyway.
- */
-
- if ($mine && $myaddr && (! link_compare($mine,$s)))
- $zurl = $s . (($num_slashes >= 3) ? '' : '/') . $achar . 'zid=' . urlencode($myaddr);
- else
- $zurl = $s;
-
- // put fragment at the end
-
- if($fragment)
- $zurl .= '#' . $fragment;
-
- $arr = array('url' => $s, 'zid' => urlencode($myaddr), 'result' => $zurl);
- call_hooks('zid', $arr);
-
- return $arr['result'];
-}
// Used from within PCSS themes to set theme parameters. If there's a
// puid request variable, that is the "page owner" and normally their theme