don't add zid to app links if they're on this system and we're logged in already. This messes up the null arg detection in mod_network.
This commit is contained in:
parent
00cfc4be44
commit
947478ca76
@ -146,9 +146,12 @@ class Apps {
|
|||||||
$ret['type'] = 'system';
|
$ret['type'] = 'system';
|
||||||
|
|
||||||
foreach($ret as $k => $v) {
|
foreach($ret as $k => $v) {
|
||||||
if(strpos($v,'http') === 0)
|
if(strpos($v,'http') === 0) {
|
||||||
|
if(! (local_channel() && strpos($v,z_root()) === 0)) {
|
||||||
$ret[$k] = zid($v);
|
$ret[$k] = zid($v);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(array_key_exists('desc',$ret))
|
if(array_key_exists('desc',$ret))
|
||||||
$ret['desc'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['desc']);
|
$ret['desc'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['desc']);
|
||||||
@ -280,8 +283,11 @@ class Apps {
|
|||||||
$papp['url'] = z_root() . ((strpos($papp['url'],'/') === 0) ? '' : '/') . $papp['url'];
|
$papp['url'] = z_root() . ((strpos($papp['url'],'/') === 0) ? '' : '/') . $papp['url'];
|
||||||
|
|
||||||
foreach($papp as $k => $v) {
|
foreach($papp as $k => $v) {
|
||||||
if(strpos($v,'http') === 0 && $k != 'papp')
|
if(strpos($v,'http') === 0 && $k != 'papp') {
|
||||||
|
if(! (local_channel() && strpos($v,z_root()) === 0)) {
|
||||||
$papp[$k] = zid($v);
|
$papp[$k] = zid($v);
|
||||||
|
}
|
||||||
|
}
|
||||||
if($k === 'desc')
|
if($k === 'desc')
|
||||||
$papp['desc'] = str_replace(array('\'','"'),array(''','&dquot;'),$papp['desc']);
|
$papp['desc'] = str_replace(array('\'','"'),array(''','&dquot;'),$papp['desc']);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user