public $profile;
public $user;
public $cid;
+ public $contact;
public $content;
public $error = false;
public $cmd;
private $scheme;
private $hostname;
private $path;
+ private $baseurl;
private $db;
function __construct() {
}
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),'/');
}
}}
+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) {
return($buffer);
}}
+function unxmlify($s) {
+ $ret = str_replace('&','&', $s);
+ $ret = str_replace(array('<','>','"','''),array('<','>','"',"'"),$ret);
+ return $ret;
+}
function hex2bin($s) {
return(pack("H*",$s));