Commit 7a7f57fa authored by Mario's avatar Mario

Merge branch 'dev' into 4.4RC

parents 0e002421 047dd317
Pipeline #157594 passed with stage
in 6 minutes and 55 seconds
......@@ -46,18 +46,20 @@ class Linkinfo extends \Zotlabs\Web\Controller {
logger('linkinfo: ' . $url);
// Replace plink URL with 'share' tag if possible
if (preg_match("/mid=b64\.(\w+)(&.+)?$/", $url, $mid)) {
$r = q("SELECT id FROM item WHERE mid = '%s' AND uid = %d LIMIT 1",
dbesc(base64url_decode($mid[1])),
intval(local_channel())
);
if ($r) {
echo "[share=" . $r[0]['id'] . "][/share]";
killme();
}
}
// Replace plink URL with 'share' tag if possible
preg_match("/(mid=b64\.|display\/|posts\/)([\w\-]+)(&.+)?$/", $url, $mid);
if (!empty($mid) && $mid[1] == 'mid=b64.')
$mid[2] = base64_decode($mid[2]);
$r = q("SELECT id FROM item WHERE mid = '%s' AND uid = %d LIMIT 1",
dbesc((empty($mid) ? $url : $mid[2])),
intval(local_channel())
);
if ($r) {
echo "[share=" . $r[0]['id'] . "][/share]";
killme();
}
$result = z_fetch_url($url,false,0,array('novalidate' => true, 'nobody' => true));
if($result['success']) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment