From: Pierre Habouzit (MadCoder Date: Sun, 17 Apr 2005 15:26:12 +0000 (+0000) Subject: make xorg.globals.inc.php be platal/globals.inc.php ===> run make again ! X-Git-Tag: xorg/old~215 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=182f2caaae2e9f7c657c4e98b18ed8320863a080;p=platal.git make xorg.globals.inc.php be platal/globals.inc.php ===> run make again ! git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-547 --- diff --git a/Makefile b/Makefile index 1248fd6..f618347 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ dist: clean pkg-dist bzdist: clean pkg-bzdist clean: - rm -rf locale include/xorg.globals.inc.php + rm -rf include/platal/globals.inc.php rm -f htdocs/banana/banana.css htdocs/valid.html include/banana htdocs/banana/img htdocs/banana/xface.php %: %.in Makefile @@ -43,7 +43,7 @@ devel: build templates_c htdocs/valid.html ################################################################################ # diogenes package targets -pkg-build: include/xorg.globals.inc.php +pkg-build: include/platal/globals.inc.php $(PKG_DIST): pkg-build mkdir $(PKG_DIST) diff --git a/include/.arch-inventory b/include/.arch-inventory deleted file mode 100644 index a69f64c..0000000 --- a/include/.arch-inventory +++ /dev/null @@ -1 +0,0 @@ -precious ^(xorg.globals.inc.php)$ diff --git a/include/platal/.arch-inventory b/include/platal/.arch-inventory new file mode 100644 index 0000000..cbd87cd --- /dev/null +++ b/include/platal/.arch-inventory @@ -0,0 +1 @@ +precious ^(globals.inc.php)$ diff --git a/include/xorg.globals.inc.php.in b/include/platal/globals.inc.php.in similarity index 69% rename from include/xorg.globals.inc.php.in rename to include/platal/globals.inc.php.in index cde232b..2d17fd0 100644 --- a/include/xorg.globals.inc.php.in +++ b/include/platal/globals.inc.php.in @@ -35,10 +35,10 @@ class CoreConfig // {{{ class XorgGlobals -class XorgGlobals extends DiogenesCoreGlobals +class PlatalGlobals extends DiogenesCoreGlobals { var $page = 'XorgPage'; - var $session = 'XorgSession'; + var $session; var $menu; var $hook; @@ -66,43 +66,9 @@ class XorgGlobals extends DiogenesCoreGlobals var $spoolroot = '/var/spool/xorg'; var $root = null; - function init() + function PlatalGlobals($sess) { - global $globals; - require_once('xorg/hook.inc.php'); - require_once('xorg/menu.inc.php'); - - $globals = new XorgGlobals; - $globals->core = new CoreConfig; - $globals->root = dirname(dirname(__FILE__)); - $globals->hook = new XOrgHook(); - $globals->menu = new XOrgMenu(); - - $globals->hook->config(null); - - $array = parse_ini_file($globals->root.'/configs/platal.conf', true); - if (!is_array($array)) { - return; - } - - foreach ($array as $cat=>$conf) { - $c = strtolower($cat); - foreach ($conf as $key=>$val) { - if ($c == 'core' && isset($globals->$key)) { - $globals->$key=$val; - } else { - $globals->$c->$key = $val; - } - } - } - - $globals->hook->menu(null); - - $globals->dbconnect(); - if ($globals->debug & 1) { - $globals->db->trace_on(); - } - $globals->xdb =& new XOrgDB; + $this->session = $sess; } } diff --git a/include/xorg.inc.php b/include/xorg.inc.php index 6375c82..c4a1d36 100644 --- a/include/xorg.inc.php +++ b/include/xorg.inc.php @@ -20,7 +20,7 @@ ***************************************************************************/ require_once('platal.inc.php'); -require_once('xorg.globals.inc.php'); +require_once('xorg/globals.inc.php'); require_once('xorg/session.inc.php'); XorgGlobals::init(); XorgSession::init(); diff --git a/include/xorg/globals.inc.php b/include/xorg/globals.inc.php new file mode 100644 index 0000000..322b8ef --- /dev/null +++ b/include/xorg/globals.inc.php @@ -0,0 +1,76 @@ +PlatalGlobals('XorgSession'); + } + + function init() + { + global $globals; + require_once('xorg/hook.inc.php'); + require_once('xorg/menu.inc.php'); + + $globals = new XorgGlobals; + $globals->core = new CoreConfig; + $globals->root = dirname(dirname(dirname(__FILE__))); + $globals->hook = new XOrgHook(); + $globals->menu = new XOrgMenu(); + + $globals->hook->config(null); + + $array = parse_ini_file($globals->root.'/configs/platal.conf', true); + if (!is_array($array)) { + return; + } + + foreach ($array as $cat=>$conf) { + $c = strtolower($cat); + foreach ($conf as $key=>$val) { + if ($c == 'core' && isset($globals->$key)) { + $globals->$key=$val; + } else { + $globals->$c->$key = $val; + } + } + } + + $globals->hook->menu(null); + + $globals->dbconnect(); + if ($globals->debug & 1) { + $globals->db->trace_on(); + } + $globals->xdb =& new XOrgDB; + } +} + +// }}} + +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker: +?>