aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-17 15:25:30 -0800
committerzotlabs <mike@macgirvin.com>2018-01-17 15:25:30 -0800
commitc331e585b8ada2c281815193df0d3e1b172ebe0e (patch)
treeae61759099b99682e6dc797c32981e2a720edf06
parent82306682c601688041ccfd9a7b259bc607301a37 (diff)
downloadvolse-hubzilla-c331e585b8ada2c281815193df0d3e1b172ebe0e.tar.gz
volse-hubzilla-c331e585b8ada2c281815193df0d3e1b172ebe0e.tar.bz2
volse-hubzilla-c331e585b8ada2c281815193df0d3e1b172ebe0e.zip
remove sendzid core code from core (put in plugin where it belongs)
-rw-r--r--include/import.php3
-rw-r--r--include/zid.php14
2 files changed, 12 insertions, 5 deletions
diff --git a/include/import.php b/include/import.php
index 51791347a..9920df8be 100644
--- a/include/import.php
+++ b/include/import.php
@@ -82,7 +82,8 @@ function import_channel($channel, $account_id, $seize) {
'channel_r_storage', 'channel_r_pages', 'channel_w_stream', 'channel_w_wall',
'channel_w_comment', 'channel_w_mail', 'channel_w_like', 'channel_w_tagwall',
'channel_w_chat', 'channel_w_storage', 'channel_w_pages', 'channel_a_republish',
- 'channel_a_delegate', 'perm_limits', 'channel_password', 'channel_salt'
+ 'channel_a_delegate', 'perm_limits', 'channel_password', 'channel_salt',
+ 'channel_moved'
];
$clean = array();
diff --git a/include/zid.php b/include/zid.php
index 6ebc9a6ab..b3a7d1e6a 100644
--- a/include/zid.php
+++ b/include/zid.php
@@ -127,8 +127,11 @@ function clean_query_string($s = '') {
* @return string
*/
function zidify_callback($match) {
- $is_zid = ((feature_enabled(local_channel(), 'sendzid')) || (strpos($match[1], 'zrl')) ? true : false);
- $replace = '<a' . $match[1] . ' href="' . (($is_zid) ? zid($match[2]) : $match[2]) . '"';
+
+ $arr = [ 'zid' => ((strpos($match[1],'zrl')) ? true : false), 'url' => $match[2] ];
+ call_hooks('zidify', $arr);
+
+ $replace = '<a' . $match[1] . ' href="' . (intval($arr['zid']) ? zid($arr['url']) : $arr['url']) . '"';
$x = str_replace($match[0], $replace, $match[0]);
@@ -136,8 +139,11 @@ function zidify_callback($match) {
}
function zidify_img_callback($match) {
- $is_zid = ((feature_enabled(local_channel(), 'sendzid')) || (strpos($match[1], 'zrl')) ? true : false);
- $replace = '<img' . $match[1] . ' src="' . (($is_zid) ? zid($match[2]) : $match[2]) . '"';
+
+ $arr = [ 'zid' => ((strpos($match[1],'zrl')) ? true : false), 'url' => $match[2] ];
+ call_hooks('zidify', $arr);
+
+ $replace = '<img' . $match[1] . ' src="' . (intval($arr['zid']) ? zid($arr['url']) : $arr['url']) . '"';
$x = str_replace($match[0], $replace, $match[0]);