]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
more poll stuff ahead of item revamp
[friendica.git] / boot.php
index c94548c3f3bcdf16a815e54990d9844ec86c3588..1ecd6e677c6a6a85274b3585a1f6b26978a9913a 100644 (file)
--- 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;
@@ -32,6 +33,7 @@ class App {
        private $scheme;
        private $hostname;
        private $path;
+       private $baseurl;
        private $db;
 
        function __construct() {
@@ -68,12 +70,20 @@ class App {
        }
 
        function get_baseurl($ssl = false) {
-               
-               return (($ssl) ? 'https' : $this->scheme) . "://" . $this->hostname
+               if(strlen($this->baseurl))
+                       return $this->baseurl;
+
+               $this->baseurl = (($ssl) ? 'https' : $this->scheme) . "://" . $this->hostname
                        . ((isset($this->path) && strlen($this->path)) 
                        ? '/' . $this->path : '' );
+               return $this->baseurl;
+       }
+
+       function set_baseurl($url) {
+               $this->baseurl = $url;
        }
 
+
        function set_path($p) {
                $this->path = ltrim(trim($p),'/');
        } 
@@ -329,6 +339,11 @@ function notice($s) {
 
 }}
 
+if(! function_exists('get_max_import_size')) {
+function get_max_import_size() {
+       global $a;
+       return ((x($a->config,'max_import_size')) ? $a->config['max_import_size'] : 0 );
+}}
 
 if(! function_exists('xmlify')) {
 function xmlify($str) {
@@ -369,6 +384,11 @@ function xmlify($str) {
        return($buffer);
 }}
 
+function unxmlify($s) {
+       $ret = str_replace('&','&', $s);
+       $ret = str_replace(array('&lt;','&gt;','&quot;','&apos;'),array('<','>','"',"'"),$ret);
+       return $ret;    
+}
 
 function hex2bin($s) {
        return(pack("H*",$s));