X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=02c37a93f126b91da56851b954059514467adf23;hb=aff4f63ff8e005bb3ce1d726405fd6d5d2dcfa60;hp=6607c737eb7b28d3701d060afa8891a8d66e3b71;hpb=a4850cb3d7886db727b4c98a98a94c51f008526f;p=friendica.git diff --git a/boot.php b/boot.php index 6607c737eb..02c37a93f1 100644 --- a/boot.php +++ b/boot.php @@ -22,6 +22,7 @@ class App { public $profile; public $user; public $cid; + public $contact; public $content; public $error = false; public $cmd; @@ -190,7 +191,9 @@ function notags($string) { // The PHP built-in tag escape function has traditionally been buggy if(! function_exists('escape_tags')) { function escape_tags($string) { - return(str_replace(array("<",">","&"), array('<','>','&'), $string)); + return(str_replace( + array('&', '"', "'", '<', '>'), + array('&', '"', ''', '<', '>'), $string)); }} if(! function_exists('login')) { @@ -367,6 +370,11 @@ function xmlify($str) { return($buffer); }} +function unxmlify($s) { + $ret = str_replace('&','&', $s); + $ret = str_replace(array('<','>','"','''),array('<','>','"',"'"),$ret); + return $ret; +} function hex2bin($s) { return(pack("H*",$s)); @@ -399,7 +407,7 @@ function paginate(&$a) { } for($i = $numstart; $i <= $numstop; $i++){ - if($i == $pagenum) + if($i == $a->pager['page']) $o .= ''.(($i < 10) ? ' '.$i : $i); else $o .= "".(($i < 10) ? ' '.$i : $i).""; @@ -422,4 +430,16 @@ function paginate(&$a) { $o .= ''."\r\n"; } return $o; -} \ No newline at end of file +} + +function expand_acl($s) { + + if(strlen($s)) { + $a = explode('<',$s); + for($x = 0; $x < count($a); $x ++) { + $a[$x] = intval(str_replace(array('<','>'),array('',''),$a[$x])); + } + return $a; + } + return array(); +}