projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New handler profile/ax/{user_id}
[platal.git]
/
include
/
globals.inc.php.in
diff --git
a/include/globals.inc.php.in
b/include/globals.inc.php.in
index
68cc164
..
82d2500
100644
(file)
--- a/
include/globals.inc.php.in
+++ b/
include/globals.inc.php.in
@@
-21,40
+21,39
@@
class PlatalGlobals
{
class PlatalGlobals
{
-
var
$session;
+
public
$session;
/** The x.org version */
/** The x.org version */
-
var
$version = '@VERSION@';
-
var
$debug = 0;
+
public
$version = '@VERSION@';
+
public
$debug = 0;
/** db params */
/** db params */
- var $dbdb = 'x4dat';
- var $dbhost = 'localhost';
- var $dbuser = 'x4dat';
- var $dbpwd = 'x4dat';
+ public $dbdb = 'x4dat';
+ public $dbhost = 'localhost';
+ public $dbuser = 'x4dat';
+ public $dbpwd = 'x4dat';
+ public $dbcharset = 'utf8';
/** paths */
/** paths */
-
var
$baseurl;
-
var
$spoolroot;
+
public
$baseurl;
+
public
$spoolroot;
-
var
$locale;
-
var
$timezone;
+
public
$locale;
+
public
$timezone;
-
function PlatalGlobals
($sess)
+
public function __construct
($sess)
{
$this->session = $sess;
$base = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
{
$this->session = $sess;
$base = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
- $this->baseurl = trim($base.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']), '/');
+ $this->baseurl =
@
trim($base.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']), '/');
$this->spoolroot = dirname(dirname(__FILE__));
$this->read_config();
$this->spoolroot = dirname(dirname(__FILE__));
$this->read_config();
-
- $this->dbconnect();
$this->setlocale();
}
$this->setlocale();
}
- function read_ini_file($filename)
+
private
function read_ini_file($filename)
{
$array = parse_ini_file($filename, true);
if (!is_array($array)) {
{
$array = parse_ini_file($filename, true);
if (!is_array($array)) {
@@
-75,21
+74,13
@@
class PlatalGlobals
}
}
}
}
- function read_config()
+
private
function read_config()
{
$this->read_ini_file($this->spoolroot.'/configs/platal.ini');
{
$this->read_ini_file($this->spoolroot.'/configs/platal.ini');
-
$this->read_ini_file($this->spoolroot.'/configs/platal.conf');
}
$this->read_ini_file($this->spoolroot.'/configs/platal.conf');
}
- function dbconnect()
- {
- XDB::$connec = @mysqli_connect($this->dbhost, $this->dbuser, $this->dbpwd);
- @mysqli_select_db(XDB::$connec, $this->dbdb);
- mysqli_set_charset(XDB::$connec, 'utf8');
- }
-
- function setlocale()
+ private function setlocale()
{
setlocale(LC_MESSAGES, $this->locale);
setlocale(LC_TIME, $this->locale);
{
setlocale(LC_MESSAGES, $this->locale);
setlocale(LC_TIME, $this->locale);
@@
-97,7
+88,7
@@
class PlatalGlobals
date_default_timezone_set($this->timezone);
}
date_default_timezone_set($this->timezone);
}
- function asso($key=null)
+
public
function asso($key=null)
{
static $aid = null;
{
static $aid = null;