[phpMP-CVS] CVS: phpMP/includes debug.php,NONE,1.1 auth.php,1.23,1.24 core.php,1.34,1.35 language.ph
Status: Pre-Alpha
Brought to you by:
heimidal
From: Brian R. <hei...@us...> - 2002-12-02 22:21:11
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv16321/includes Modified Files: auth.php core.php language.php user.php Added Files: debug.php Log Message: This is mostly brainstorming on my account. I used this as a way to figure out how I want things to flow. --- NEW FILE: debug.php --- <? class Debug { function Debug() { } } ?> Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** auth.php 2 Dec 2002 10:59:50 -0000 1.23 --- auth.php 2 Dec 2002 22:21:03 -0000 1.24 *************** *** 4,14 **** { function Auth() { ! // Authenticates user and discovers the privileges that user should have. ! // Does nothing in the way of setting up variables and declaring things scripts need to know. ! } ?> --- 4,30 ---- { + var $curr_user; + function Auth() { ! // Session ID is contained in the URL. ! if( isset( $_GET[SESSID] ) ! { ! ! } ! // We're using the session cookie set by the previous session. ! elseif( isset( $_COOKIE[COOKIE_NAME] ) ! { ! ! $cookie_data = $_COOKIE[COOKIE_NAME]; ! ! } ! ! // Set up cookie/url procedures and such. ! } + + } ?> Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** core.php 2 Dec 2002 11:35:51 -0000 1.34 --- core.php 2 Dec 2002 22:21:03 -0000 1.35 *************** *** 28,33 **** } - print "Config values defined.<br /><br />"; - } --- 28,31 ---- *************** *** 40,49 **** include_once(PHPMP_ROOT . 'config.php'); ! //include_once(PHPMP_ROOT . 'includes/debug.php'); ! //$Debug = new Debug(); global $DB; ! include( PHPMP_ROOT . 'dba/' . DB_TYPE . '.dba' ); $DB = new DB(); $DB->connect(); --- 38,47 ---- include_once(PHPMP_ROOT . 'config.php'); ! include_once(PHPMP_ROOT . 'includes/debug.php'); ! $Debug = new Debug(); global $DB; ! include_once( PHPMP_ROOT . 'dba/' . DB_TYPE . '.dba' ); $DB = new DB(); $DB->connect(); *************** *** 54,63 **** $User = new User(); // Create an instance of User. include_once(PHPMP_ROOT . 'includes/language.php'); include_once(PHPMP_ROOT . 'includes/constants.php'); - include_once(PHPMP_ROOT . 'includes/functions.php'); - include_once(PHPMP_ROOT . 'includes/mpcode.php'); --- 52,62 ---- $User = new User(); // Create an instance of User. + include_once(PHPMP_ROOT . 'includes/functions.php'); + include_once(PHPMP_ROOT . 'includes/language.php'); + $Language = new Language(); include_once(PHPMP_ROOT . 'includes/constants.php'); include_once(PHPMP_ROOT . 'includes/mpcode.php'); *************** *** 67,74 **** while( $my_file = $optional_files[$i] ) { ! ! // We'll use include_once() in order to keep from ! // including a file more than once (through ! // malicious or accidental coding of a page). include_once(PHPMP_ROOT . 'includes/' . $my_file . '.php'); $i++; --- 66,70 ---- while( $my_file = $optional_files[$i] ) { ! include_once(PHPMP_ROOT . 'includes/' . $my_file . '.php'); $i++; *************** *** 81,85 **** // Globalize all major class-containing variables. ! global $Debug, $User, $Language, $Parser, $Template; } --- 77,81 ---- // Globalize all major class-containing variables. ! global $Debug, $User, $MPCode, $Template; } *************** *** 87,89 **** } ! ?> --- 83,85 ---- } ! ?> \ No newline at end of file Index: language.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/language.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** language.php 30 Nov 2002 10:58:23 -0000 1.1 --- language.php 2 Dec 2002 22:21:06 -0000 1.2 *************** *** 14,17 **** --- 14,22 ---- define( "LANGUAGE", DEFAULT_LANG ); } + + global $Local; + + include_once( PHPMP_ROOT . 'languages/' . LANGUAGE . '.php'); + $Local = new Localization(); } Index: user.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/user.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** user.php 2 Dec 2002 10:59:50 -0000 1.1 --- user.php 2 Dec 2002 22:21:07 -0000 1.2 *************** *** 2,6 **** class User // Creates a barrier between the Auth class and the outside world. ! // If user doesn't need to be auth'ed, be isn't. { --- 2,6 ---- class User // Creates a barrier between the Auth class and the outside world. ! // If user doesn't need to be auth'ed, he isn't. { *************** *** 16,20 **** $qry = $DB->query($sql); ! return $DB->fetchArray($qry); } --- 16,20 ---- $qry = $DB->query($sql); ! $this->array = $DB->fetchArray($qry); } *************** *** 35,41 **** $Auth = new Auth(); ! $curr_user = $this->lookup(); ! ! $this->array = $this->snapshot( $curr_user ); } --- 35,39 ---- $Auth = new Auth(); ! $this->snapshot( $Auth->curr_user ); } *************** *** 43,47 **** { ! $this->array = $this->snapshot(1); } --- 41,45 ---- { ! $this->snapshot(1); } |