phpmp-commits Mailing List for phpMyPublications (Page 4)
Status: Pre-Alpha
Brought to you by:
heimidal
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
(69) |
May
(1) |
Jun
|
Jul
(53) |
Aug
(27) |
Sep
|
Oct
|
Nov
(35) |
Dec
(71) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(5) |
Feb
(65) |
Mar
|
Apr
(15) |
May
(40) |
Jun
(72) |
Jul
|
Aug
(2) |
Sep
(95) |
Oct
(37) |
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Cameron C. <nor...@us...> - 2003-09-15 03:13:56
|
Update of /cvsroot/phpmp/phpMP/core/dba
In directory sc8-pr-cvs1:/tmp/cvs-serv744/core/dba
Modified Files:
mysql.php
Log Message:
wibble. added more functions.
Index: mysql.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/dba/mysql.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** mysql.php 14 Sep 2003 08:11:55 -0000 1.5
--- mysql.php 15 Sep 2003 03:13:52 -0000 1.6
***************
*** 173,176 ****
--- 173,249 ----
return $rowset;
}
+
+ //
+ // sql_insert_id
+ //
+ function sql_insert_id()
+ {
+ if( $this->db_connection_id)
+ {
+ if( $result = @mysql_insert_id($this->db_connection_id))
+ {
+ return $result;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ //
+ // sql_free_result
+ //
+ function sql_free_result($db_query_id = 0)
+ {
+ if(! $db_query_id)
+ {
+ $db_query_id = $this->db_query_result;
+ }
+
+ unset($this->db_row[$db_query_id]);
+ unset($this->db_rowset[$db_query_id]);
+
+ if( @mysql_free_result($db_query_id))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ //
+ // sql_error
+ //
+ function sql_error($db_query_id = 0)
+ {
+ if(! $db_query_id)
+ {
+ $db_query_id = $this->db_query_result;
+ }
+
+ $result = @mysql_error($db_query_id);
+ return $result;
+ }
+
+ //
+ // sql_errno
+ //
+ function sql_errno($db_query_id = 0)
+ {
+ if(! $db_query_id)
+ {
+ $db_query_id = $this->db_query_result;
+ }
+
+ $result = @mysql_errno($db_query_id);
+ return $result;
+ }
} // End of sql_db
?>
|
|
From: Brian R. <hei...@us...> - 2003-09-15 02:44:15
|
Update of /cvsroot/phpmp/phpMP/docs/sql In directory sc8-pr-cvs1:/tmp/cvs-serv28190/docs/sql Modified Files: mysql_structure.sql Log Message: Updated current Database structure. Index: mysql_structure.sql =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/sql/mysql_structure.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** mysql_structure.sql 14 Sep 2003 06:52:26 -0000 1.1 --- mysql_structure.sql 15 Sep 2003 02:44:12 -0000 1.2 *************** *** 1,11 **** ! # phpMyAdmin MySQL-Dump ! # version 2.5.0-rc1 ! # http://www.phpmyadmin.net/ (download page) # # Host: localhost ! # Generation Time: Apr 23, 2003 at 01:14 AM ! # Server version: 4.0.12 ! # PHP Version: 4.3.0 # Database : `phpmp` # -------------------------------------------------------- --- 1,14 ---- ! # phpMyAdmin SQL Dump ! # version 2.5.3-rc2 ! # http://www.phpmyadmin.net # # Host: localhost ! # Generation Time: Sep 14, 2003 at 08:46 PM ! # Server version: 4.0.14 ! # PHP Version: 4.3.2 ! # # Database : `phpmp` + # + # -------------------------------------------------------- *************** *** 13,19 **** # Table structure for table `phpmp_config` # - # Creation: Apr 22, 2003 at 08:46 AM - # Last update: Apr 22, 2003 at 11:54 PM - # CREATE TABLE `phpmp_config` ( --- 16,19 ---- *************** *** 23,31 **** ) TYPE=MyISAM; # ! # Table structure for table `phpmp_sessions` # ! # Creation: Apr 22, 2003 at 05:34 PM ! # Last update: Apr 23, 2003 at 01:11 AM # --- 23,93 ---- ) TYPE=MyISAM; + # -------------------------------------------------------- + # ! # Table structure for table `phpmp_groups` ! # ! ! CREATE TABLE `phpmp_groups` ( ! `group_id` int(11) NOT NULL auto_increment, ! `group_name` varchar(255) NOT NULL default '', ! PRIMARY KEY (`group_id`) ! ) TYPE=MyISAM; ! ! # -------------------------------------------------------- ! # ! # Table structure for table `phpmp_modules` ! # ! ! CREATE TABLE `phpmp_modules` ( ! `module_id` int(11) NOT NULL auto_increment, ! `module_name` varchar(40) NOT NULL default '', ! PRIMARY KEY (`module_id`) ! ) TYPE=MyISAM; ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `phpmp_modules_data` ! # ! ! CREATE TABLE `phpmp_modules_data` ( ! `module_id` int(11) NOT NULL default '0', ! `data_description` varchar(40) NOT NULL default '', ! `data_contents` varchar(255) NOT NULL default '', ! PRIMARY KEY (`module_id`) ! ) TYPE=MyISAM; ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `phpmp_profile_fields` ! # ! ! CREATE TABLE `phpmp_profile_fields` ( ! `profile_field_id` int(11) NOT NULL auto_increment, ! `profile_field_name` varchar(40) NOT NULL default '', ! PRIMARY KEY (`profile_field_id`) ! ) TYPE=MyISAM; ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `phpmp_profile_fields_data` ! # ! ! CREATE TABLE `phpmp_profile_fields_data` ( ! `user_id` int(11) NOT NULL default '0', ! `profile_field_id` int(11) NOT NULL default '0', ! `profile_field_data` varchar(255) NOT NULL default '', ! PRIMARY KEY (`user_id`), ! KEY `profile_field_id` (`profile_field_id`) ! ) TYPE=MyISAM; ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `phpmp_sessions` # *************** *** 38,54 **** `session_ip` varchar(8) NOT NULL default '', PRIMARY KEY (`session_key`) ! ) TYPE=Heap; # # Table structure for table `phpmp_users` # - # Creation: Apr 23, 2003 at 12:34 AM - # Last update: Apr 23, 2003 at 12:37 AM - # CREATE TABLE `phpmp_users` ( `user_id` mediumint(8) NOT NULL auto_increment, `user_name` varchar(24) NOT NULL default '', ! `user_passwd` varchar(32) NOT NULL default '', `active` tinyint(1) NOT NULL default '0', `email` varchar(255) NOT NULL default '', --- 100,115 ---- `session_ip` varchar(8) NOT NULL default '', PRIMARY KEY (`session_key`) ! ) TYPE=HEAP; ! ! # -------------------------------------------------------- # # Table structure for table `phpmp_users` # CREATE TABLE `phpmp_users` ( `user_id` mediumint(8) NOT NULL auto_increment, `user_name` varchar(24) NOT NULL default '', ! `password` varchar(32) NOT NULL default '', `active` tinyint(1) NOT NULL default '0', `email` varchar(255) NOT NULL default '', *************** *** 58,62 **** `date_format` varchar(32) NOT NULL default '', `template` varchar(32) NOT NULL default '', - `signature` varchar(255) NOT NULL default '', PRIMARY KEY (`user_id`) ! ) TYPE=MyISAM AUTO_INCREMENT=3 ; \ No newline at end of file --- 119,122 ---- `date_format` varchar(32) NOT NULL default '', `template` varchar(32) NOT NULL default '', PRIMARY KEY (`user_id`) ! ) TYPE=MyISAM; \ No newline at end of file |
|
From: Adam A. <ra...@us...> - 2003-09-15 00:20:12
|
Update of /cvsroot/phpmp/phpMP/core/dba In directory sc8-pr-cvs1:/tmp/cvs-serv1760/core/dba Added Files: oracle8.php Log Message: --- NEW FILE: oracle8.php --- <?php /* * phpMP - The PHP Modular Portal System * Copyright (C) 2002-2003 Brian Rose and the phpMP group * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: oracle8.php,v 1.1 2003/09/15 00:20:08 rasadam Exp $ * */ ?> |
|
From: Adam A. <ra...@us...> - 2003-09-15 00:20:11
|
Update of /cvsroot/phpmp/phpMP/docs In directory sc8-pr-cvs1:/tmp/cvs-serv1760/docs Modified Files: Changelog Log Message: Index: Changelog =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/Changelog,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** Changelog 15 Sep 2003 00:16:38 -0000 1.43 --- Changelog 15 Sep 2003 00:20:08 -0000 1.44 *************** *** 1,3 **** --- 1,6 ---- 2003-09-14 [R45] + * core/dba/postgresql.php **NEW** + * core/dba/firebird.php **NEW** + * core/dba/oracle8.php **NEW** * directories.php **NEW** * Changed the way paths for the main directories |
|
From: Adam A. <ra...@us...> - 2003-09-15 00:16:43
|
Update of /cvsroot/phpmp/phpMP/docs In directory sc8-pr-cvs1:/tmp/cvs-serv1082/docs Modified Files: Changelog Log Message: Index: Changelog =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/Changelog,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** Changelog 14 Sep 2003 22:23:02 -0000 1.42 --- Changelog 15 Sep 2003 00:16:38 -0000 1.43 *************** *** 1,2 **** --- 1,7 ---- + 2003-09-14 [R45] + * directories.php **NEW** + * Changed the way paths for the main directories + are referenced (Now a constant) + 2003-09-14 [Heimidal] * core/main.php |
|
From: Brian R. <hei...@us...> - 2003-09-14 22:23:05
|
Update of /cvsroot/phpmp/phpMP/docs In directory sc8-pr-cvs1:/tmp/cvs-serv10879/docs Modified Files: Changelog Log Message: Updated Changelog. Index: Changelog =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/Changelog,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** Changelog 14 Sep 2003 09:34:39 -0000 1.41 --- Changelog 14 Sep 2003 22:23:02 -0000 1.42 *************** *** 1,3 **** --- 1,16 ---- 2003-09-14 [Heimidal] + * core/main.php + * docs/config.php.sample + Database info is now stored in $dbinfo as + an array that can be unset later for + security purposes. + * core/admin.php **REMOVED** + * core/language.php **REMOVED** + All language-discovery code has been moved + to the Portal class for the time being. + Eventually it will probably be moved + into the User class. + + 2003-09-14 [Heimidal] * entire file structure * includes/ **REMOVED** |
|
From: Brian R. <hei...@us...> - 2003-09-14 22:11:08
|
Update of /cvsroot/phpmp/phpMP/docs In directory sc8-pr-cvs1:/tmp/cvs-serv8352/docs Modified Files: config.php.sample Log Message: Switching over to the new config.php layout as well as moving to the new DBAL. Index: config.php.sample =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/config.php.sample,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** config.php.sample 4 Feb 2003 21:43:16 -0000 1.2 --- config.php.sample 14 Sep 2003 22:11:04 -0000 1.3 *************** *** 9,18 **** define( "PHPMP_INSTALLED", TRUE ); ! define( "DB_TYPE", "mysql" ); ! define( "DB_HOST", "localhost" ); ! define( "DB_NAME", "phpmp" ); ! define( "DB_TABLE_PREFIX", "phpmp_" ); ! define( "DB_USER", "phpmp" ); ! define( "DB_PASSWD", "passwd" ); ?> --- 9,20 ---- define( "PHPMP_INSTALLED", TRUE ); ! $dbinfo = array( ! 'type' => 'mysql', ! 'host' => 'localhost', ! 'name' => 'phpmp', ! 'prefix'=> 'phpmp_', ! 'user' => 'phpmp', ! 'passwd'=> 'password' ! ); ?> |
|
From: Brian R. <hei...@us...> - 2003-09-14 22:11:07
|
Update of /cvsroot/phpmp/phpMP/core
In directory sc8-pr-cvs1:/tmp/cvs-serv8352/core
Modified Files:
main.php
Log Message:
Switching over to the new config.php layout as well as moving to the new DBAL.
Index: main.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/main.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** main.php 14 Sep 2003 21:58:04 -0000 1.6
--- main.php 14 Sep 2003 22:11:04 -0000 1.7
***************
*** 80,86 ****
$Debug = new Debug();
! include_once( C_PHPMP_ROOT . CORE_DIR . 'dba/' . DB_TYPE . '.php' );
! $DB = new sql_db();
$DB->connect();
define('DB_CONFIG_TABLE', DB_NAME . '.' . DB_TABLE_PREFIX . 'config');
--- 80,88 ----
$Debug = new Debug();
! include_once( C_PHPMP_ROOT . CORE_DIR . 'dba/' . $dbinfo['type'] . '.php' );
! $DB = new sql_db($dbinfo['type'], $dbinfo['user'], $dbinfo['pass'], $dbinfo['name'], false);
$DB->connect();
+
+ unset($dbinfo);
define('DB_CONFIG_TABLE', DB_NAME . '.' . DB_TABLE_PREFIX . 'config');
|
|
From: Brian R. <hei...@us...> - 2003-09-14 22:01:10
|
Update of /cvsroot/phpmp/phpMP/core In directory sc8-pr-cvs1:/tmp/cvs-serv6047/core Removed Files: admin.php Log Message: Bye bye. --- admin.php DELETED --- |
|
From: Brian R. <hei...@us...> - 2003-09-14 21:58:07
|
Update of /cvsroot/phpmp/phpMP/core
In directory sc8-pr-cvs1:/tmp/cvs-serv5235/core
Modified Files:
main.php
Log Message:
I am an idiot. >_<
Index: main.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/main.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** main.php 14 Sep 2003 21:55:51 -0000 1.5
--- main.php 14 Sep 2003 21:58:04 -0000 1.6
***************
*** 55,59 ****
* @desc Initiates all core components.
*/
! function Main()
{
// The following code ensures that, no matter what, the dreaded
--- 55,59 ----
* @desc Initiates all core components.
*/
! function Portal()
{
// The following code ensures that, no matter what, the dreaded
|
|
From: Brian R. <hei...@us...> - 2003-09-14 21:55:56
|
Update of /cvsroot/phpmp/phpMP/core
In directory sc8-pr-cvs1:/tmp/cvs-serv4582/core
Modified Files:
functions.php main.php session.php template.php user.php
Removed Files:
language.php
Log Message:
Moved the lang array to $User. No need for a class with only one function.
Index: functions.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/functions.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** functions.php 14 Sep 2003 09:24:25 -0000 1.3
--- functions.php 14 Sep 2003 21:55:51 -0000 1.4
***************
*** 24,29 ****
/**
! * @return void
! * @desc Creates vars with no other place. Temporary.
*/
function create_vars()
--- 24,29 ----
/**
! * @return void
! * @desc Creates vars with no other place. Temporary.
*/
function create_vars()
***************
*** 31,36 ****
global $Portal, $User;
! ( $User->get('date_format') != '' ) ? ($Portal->set('date_format', $User->get('date_format'))) : ($Portal->set('date_format', $Portal->get('default_date_format')));
! $Portal->set('time_now', date( $Portal->get('date_format') ) ); // This is here...for now.
}
--- 31,36 ----
global $Portal, $User;
! ( $User->get('date_format') != '' ) ? ($Portal->cfg_set('date_format', $User->get('date_format'))) : ($Portal->cfg_set('date_format', $Portal->cfg_get('default_date_format')));
! $Portal->cfg_set('time_now', date( $Portal->cfg_get('date_format') ) ); // This is here...for now.
}
Index: main.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/main.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** main.php 14 Sep 2003 21:35:19 -0000 1.4
--- main.php 14 Sep 2003 21:55:51 -0000 1.5
***************
*** 72,76 ****
//error_reporting(E_ERROR | E_WARNING | E_PARSE);
! $blah = include_once( C_PHPMP_ROOT . 'config.php' );
// Globalize all major class-containing variables.
--- 72,76 ----
//error_reporting(E_ERROR | E_WARNING | E_PARSE);
! include_once( C_PHPMP_ROOT . 'config.php' );
// Globalize all major class-containing variables.
***************
*** 108,114 ****
$Session->start();
$Session->run();
!
! include_once(C_PHPMP_ROOT . CORE_DIR . 'language.php');
! $Language = new Language();
include_once(C_PHPMP_ROOT . CORE_DIR . 'mpcode.php');
--- 108,127 ----
$Session->start();
$Session->run();
!
! $cfg_lang = $this->cfg_get('default_lang');
! $usr_lang = $User->get('language');
! $lang = '';
!
! (empty($usr_lang)) ? $lang = $cfg_lang : $lang = $usr_lang;
!
! $this->cfg_set('language', $lang);
! $lang_file = C_PHPMP_ROOT . LANGUAGE_DIR . $lang . '/lang_main.php';
!
! if (!file_exists($lang_file))
! {
! trigger_error("localization error - \"$lang_file\" does not exist.", E_USER_ERROR);
! }
!
! include_once($lang_file);
include_once(C_PHPMP_ROOT . CORE_DIR . 'mpcode.php');
Index: session.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/session.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** session.php 14 Sep 2003 09:24:25 -0000 1.3
--- session.php 14 Sep 2003 21:55:51 -0000 1.4
***************
*** 36,42 ****
var $page;
! /**
! * @return void
! * @desc Starts a session. Must be called implicitly.
*/
function start()
--- 36,42 ----
var $page;
! /**
! * @return void
! * @desc Starts a session. Must be called implicitly.
*/
function start()
***************
*** 51,57 ****
}
! /**
! * @return void
! * @desc Destroys sessions. Used for logging out.
*/
function destroy()
--- 51,57 ----
}
! /**
! * @return void
! * @desc Destroys sessions. Used for logging out.
*/
function destroy()
***************
*** 59,63 ****
global $DB, $Portal, $SID;
! $exp_time = time() + $Portal->get('session_length');
$this->page = basename($_SERVER['REQUEST_URI']);
--- 59,63 ----
global $DB, $Portal, $SID;
! $exp_time = time() + $Portal->cfg_get('session_length');
$this->page = basename($_SERVER['REQUEST_URI']);
***************
*** 74,86 ****
$this->session_user_id = ANONYMOUS;
! setcookie($Portal->get('cookie_name') . '_auto', '', time() - 31536000, $Portal->get('cookie_path'), $Portal->get('cookie_domain'), $Portal->get('cookie_secure'));
$cookie_data = urlencode( ANONYMOUS . ':' . $this->session_key );
! (setcookie($Portal->get('cookie_name') . '_data', $cookie_data, $cur_time + $Portal->get('session_length'), $Portal->get('cookie_path'), $Portal->get('cookie_domain'), $Portal->get('cookie_secure'))) ? ($SID = "?sid=") : ($SID = "?sid=" . $this->session_key);
}
! /**
! * @return void
! * @desc Logs a user in.
*/
function login()
--- 74,86 ----
$this->session_user_id = ANONYMOUS;
! setcookie($Portal->cfg_get('cookie_name') . '_auto', '', time() - 31536000, $Portal->cfg_get('cookie_path'), $Portal->cfg_get('cookie_domain'), $Portal->cfg_get('cookie_secure'));
$cookie_data = urlencode( ANONYMOUS . ':' . $this->session_key );
! (setcookie($Portal->cfg_get('cookie_name') . '_data', $cookie_data, $cur_time + $Portal->cfg_get('session_length'), $Portal->cfg_get('cookie_path'), $Portal->cfg_get('cookie_domain'), $Portal->cfg_get('cookie_secure'))) ? ($SID = "?sid=") : ($SID = "?sid=" . $this->session_key);
}
! /**
! * @return void
! * @desc Logs a user in.
*/
function login()
***************
*** 116,120 ****
{
$auto_cookie_data = urlencode( $this->session_user_id . ':' . $passwd_enc . ':' . $User->get('invisible_mode') );
! setcookie($Portal->get('cookie_name') . '_auto', $auto_cookie_data, time() + 31536000, $Portal->get('cookie_path'), $Portal->get('cookie_domain'), $Portal->get('cookie_secure'));
}
}
--- 116,120 ----
{
$auto_cookie_data = urlencode( $this->session_user_id . ':' . $passwd_enc . ':' . $User->get('invisible_mode') );
! setcookie($Portal->cfg_get('cookie_name') . '_auto', $auto_cookie_data, time() + 31536000, $Portal->cfg_get('cookie_path'), $Portal->cfg_get('cookie_domain'), $Portal->cfg_get('cookie_secure'));
}
}
***************
*** 125,131 ****
}
! /**
! * @return void
! * @desc Saves the session data to the database.
*/
function run()
--- 125,131 ----
}
! /**
! * @return void
! * @desc Saves the session data to the database.
*/
function run()
***************
*** 149,153 ****
$cur_time = time(); // Time as of right now.
! $exp_time = $cur_time + $Portal->get('session_length'); // Time at which this session will become invalid.
$this->ip = $User->get_ip_encoded(); // Gets the user's IP address.
--- 149,153 ----
$cur_time = time(); // Time as of right now.
! $exp_time = $cur_time + $Portal->cfg_get('session_length'); // Time at which this session will become invalid.
$this->ip = $User->get_ip_encoded(); // Gets the user's IP address.
***************
*** 219,230 ****
$cookie_data = urlencode( $this->session_user_id . ':' . $this->session_key );
! (setcookie($Portal->get('cookie_name') . '_data', $cookie_data, $cur_time + $Portal->get('session_length'), $Portal->get('cookie_path'), $Portal->get('cookie_domain'), $Portal->get('cookie_secure'))) ? ($SID = "?sid=") : ($SID = "?sid=" . $this->session_key);
$this->clean();
}
! /**
* @return void
! * @param clean_all boolean
! * @desc Cleans out old session data.
*/
function clean($clean_all = false)
--- 219,230 ----
$cookie_data = urlencode( $this->session_user_id . ':' . $this->session_key );
! (setcookie($Portal->cfg_get('cookie_name') . '_data', $cookie_data, $cur_time + $Portal->cfg_get('session_length'), $Portal->cfg_get('cookie_path'), $Portal->cfg_get('cookie_domain'), $Portal->cfg_get('cookie_secure'))) ? ($SID = "?sid=") : ($SID = "?sid=" . $this->session_key);
$this->clean();
}
! /**
* @return void
! * @param clean_all boolean
! * @desc Cleans out old session data.
*/
function clean($clean_all = false)
***************
*** 248,254 ****
}
! /**
! * @return void
! * @desc Grabs session data for the user.
*/
function get_session_data()
--- 248,254 ----
}
! /**
! * @return void
! * @desc Grabs session data for the user.
*/
function get_session_data()
***************
*** 257,263 ****
// Let's see if we have a standard cookie available.
! if(!empty($_COOKIE[$Portal->get('cookie_name') . '_data']))
{
! $cookie_data = $_COOKIE[$Portal->get('cookie_name') . '_data'];
$cookie_array = explode(':', urldecode( $cookie_data ) );
--- 257,263 ----
// Let's see if we have a standard cookie available.
! if(!empty($_COOKIE[$Portal->cfg_get('cookie_name') . '_data']))
{
! $cookie_data = $_COOKIE[$Portal->cfg_get('cookie_name') . '_data'];
$cookie_array = explode(':', urldecode( $cookie_data ) );
***************
*** 284,290 ****
if( ($this->session_user_id == ANONYMOUS) || empty($this->session_user_id) )
{
! if( !empty( $_COOKIE[$Portal->get('cookie_name') . '_auto'] ) ) // We have an autologin cookie set.
{
! $auto_cookie_data = $_COOKIE[$Portal->get('cookie_name') . '_auto'];
$auto_cookie_array = explode(':', urldecode( $auto_cookie_data ) );
--- 284,290 ----
if( ($this->session_user_id == ANONYMOUS) || empty($this->session_user_id) )
{
! if( !empty( $_COOKIE[$Portal->cfg_get('cookie_name') . '_auto'] ) ) // We have an autologin cookie set.
{
! $auto_cookie_data = $_COOKIE[$Portal->cfg_get('cookie_name') . '_auto'];
$auto_cookie_array = explode(':', urldecode( $auto_cookie_data ) );
***************
*** 306,310 ****
{
// We'll unset the cookie and continue on like nothing ever happened.
! setcookie($Portal->get('cookie_name') . '_auto', '', time() - 31536000, $Portal->get('cookie_path'), $Portal->get('cookie_domain'), $Portal->get('cookie_secure'));
return false;
$this->session_user_id = ANONYMOUS;
--- 306,310 ----
{
// We'll unset the cookie and continue on like nothing ever happened.
! setcookie($Portal->cfg_get('cookie_name') . '_auto', '', time() - 31536000, $Portal->cfg_get('cookie_path'), $Portal->cfg_get('cookie_domain'), $Portal->cfg_get('cookie_secure'));
return false;
$this->session_user_id = ANONYMOUS;
Index: template.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/template.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** template.php 14 Sep 2003 09:24:25 -0000 1.3
--- template.php 14 Sep 2003 21:55:51 -0000 1.4
***************
*** 119,123 ****
function display($handle)
{
! global $Portal, $Local;
if ($filename = $this->_tpl_load($handle))
--- 119,123 ----
function display($handle)
{
! global $Portal;
if ($filename = $this->_tpl_load($handle))
***************
*** 138,142 ****
global $Portal, $user;
! $filename = $this->cachedir . $this->filename[$handle] . '.' . (($this->static_lang) ? $Portal->get('language') . '.' : '') . 'php';
// Recompile page if the original template is newer, otherwise load the compiled version
--- 138,142 ----
global $Portal, $user;
! $filename = $this->cachedir . $this->filename[$handle] . '.' . (($this->static_lang) ? $Portal->cfg_get('language') . '.' : '') . 'php';
// Recompile page if the original template is newer, otherwise load the compiled version
***************
*** 231,235 ****
function _tpl_include($filename, $include = true)
{
! global $user, $Portal, $Local;
$handle = $filename;
--- 231,235 ----
function _tpl_include($filename, $include = true)
{
! global $user, $Portal;
$handle = $filename;
***************
*** 334,338 ****
case 'INCLUDEPHP':
! if ($Portal->get('tpl_php'))
{
$temp = '';
--- 334,338 ----
case 'INCLUDEPHP':
! if ($Portal->cfg_get('tpl_php'))
{
$temp = '';
***************
*** 343,347 ****
case 'PHP':
! if ($Portal->get('tpl_php'))
{
$temp = '';
--- 343,347 ----
case 'PHP':
! if ($Portal->cfg_get('tpl_php'))
{
$temp = '';
***************
*** 395,406 ****
if (!$this->static_lang)
{
! global $Local;
! $text_blocks = preg_replace('#\{L_([a-z0-9\-_]*?)\}#is', "<?php echo ((isset(\$this->_tpldata['.'][0]['L_\\1'])) ? \$this->_tpldata['.'][0]['L_\\1'] : ((isset(\$Local->lang['\\1'])) ? \$Local->lang['\\1'] : '{ ' . ucfirst(strtolower(str_replace('_', ' ', '\\1'))) . ' }')); ?>", $text_blocks);
}
else
{
! global $Local;
! $text_blocks = preg_replace('#\{L_([A-Z0-9\-_]*?)\}#e', "'<?php echo ((isset(\$this->_tpldata[\'.\'][0][\'L_\\1\'])) ? \$this->_tpldata[\'.\'][0][\'L_\\1\'] : \'' . ((isset(\$Local->lang['\\1'])) ? \$Local->lang['\\1'] : '') . '\'); ?>'" , $text_blocks);
}
$text_blocks = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "<?php echo \$this->_tpldata['.'][0]['\\1']; ?>", $text_blocks);
--- 395,406 ----
if (!$this->static_lang)
{
! global $User;
! $text_blocks = preg_replace('#\{L_([a-z0-9\-_]*?)\}#is', "<?php echo ((isset(\$this->_tpldata['.'][0]['L_\\1'])) ? \$this->_tpldata['.'][0]['L_\\1'] : ((isset(\$User->lang['\\1'])) ? \$User->lang['\\1'] : '{ ' . ucfirst(strtolower(str_replace('_', ' ', '\\1'))) . ' }')); ?>", $text_blocks);
}
else
{
! global $User;
! $text_blocks = preg_replace('#\{L_([A-Z0-9\-_]*?)\}#e', "'<?php echo ((isset(\$this->_tpldata[\'.\'][0][\'L_\\1\'])) ? \$this->_tpldata[\'.\'][0][\'L_\\1\'] : \'' . ((isset(\$User->lang['\\1'])) ? \$User->lang['\\1'] : '') . '\'); ?>'" , $text_blocks);
}
$text_blocks = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "<?php echo \$this->_tpldata['.'][0]['\\1']; ?>", $text_blocks);
***************
*** 697,701 ****
global $user, $Portal;
! $filename = $this->cachedir . $this->filename[$handle] . '.' . (($this->static_lang) ? $Portal->get('language') . '.' : '') . 'php';
if ($fp = @fopen($filename, 'w+'))
--- 697,701 ----
global $user, $Portal;
! $filename = $this->cachedir . $this->filename[$handle] . '.' . (($this->static_lang) ? $Portal->cfg_get('language') . '.' : '') . 'php';
if ($fp = @fopen($filename, 'w+'))
Index: user.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/user.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** user.php 14 Sep 2003 06:37:52 -0000 1.1
--- user.php 14 Sep 2003 21:55:51 -0000 1.2
***************
*** 27,36 ****
var $_data;
! /**
* @return boolean
* @param userkey mixed(string,array)
! * @param userval string optional
! * @desc Set a variable in userdata.
*/
function set($userkey, $userval = false)
--- 27,37 ----
var $_data;
+ var $lang;
! /**
* @return boolean
* @param userkey mixed(string,array)
! * @param userval string optional
! * @desc Set a variable in userdata.
*/
function set($userkey, $userval = false)
***************
*** 74,81 ****
}
! /**
! * @return void
* @desc Fetches the user's IP in hex-encoded form.
! * Taken from phpBB2.
*/
function get_ip_encoded()
--- 75,82 ----
}
! /**
! * @return void
* @desc Fetches the user's IP in hex-encoded form.
! * Taken from phpBB2.
*/
function get_ip_encoded()
***************
*** 93,101 ****
}
! /**
* @return string
! * @param encoded_ip string
* @desc Decodes a hexed IP.
! * Taken from phpBB2.
*/
function decode_ip($encoded_ip)
--- 94,102 ----
}
! /**
* @return string
! * @param encoded_ip string
* @desc Decodes a hexed IP.
! * Taken from phpBB2.
*/
function decode_ip($encoded_ip)
--- language.php DELETED ---
|
|
From: Brian R. <hei...@us...> - 2003-09-14 21:55:55
|
Update of /cvsroot/phpmp/phpMP/language/en
In directory sc8-pr-cvs1:/tmp/cvs-serv4582/language/en
Modified Files:
lang_main.php
Log Message:
Moved the lang array to $User. No need for a class with only one function.
Index: lang_main.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/language/en/lang_main.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** lang_main.php 14 Sep 2003 09:24:25 -0000 1.2
--- lang_main.php 14 Sep 2003 21:55:52 -0000 1.3
***************
*** 25,29 ****
global $Portal;
! $Language->lang = array(
//
--- 25,29 ----
global $Portal;
! $User->lang = array(
//
***************
*** 69,73 ****
// Other various parts of the templates.
//
! 'POWERED_BY' => 'Powered by phpMP ' . $Portal->get('version') . ' © 2003 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.',
'COPYRIGHT' => 'All content is property of its respective owner. All rights reserved.'
--- 69,73 ----
// Other various parts of the templates.
//
! 'POWERED_BY' => 'Powered by phpMP ' . $Portal->cfg_get('version') . ' © 2003 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.',
'COPYRIGHT' => 'All content is property of its respective owner. All rights reserved.'
|
|
From: Brian R. <hei...@us...> - 2003-09-14 21:55:55
|
Update of /cvsroot/phpmp/phpMP
In directory sc8-pr-cvs1:/tmp/cvs-serv4582
Modified Files:
index.php
Log Message:
Moved the lang array to $User. No need for a class with only one function.
Index: index.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/index.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -r1.52 -r1.53
*** index.php 14 Sep 2003 21:50:32 -0000 1.52
--- index.php 14 Sep 2003 21:55:51 -0000 1.53
***************
*** 31,39 ****
$Template->assign_vars( array(
! 'C_SITE_NAME' => $Portal->get('site_name'),
! 'C_SITE_ADDRESS' => $Portal->get('site_domain') . $Portal->get('rel_path'),
! 'C_VERSION' => $Portal->get('version'),
! 'C_REL_PATH' => $Portal->get('rel_path'),
! 'C_TEMPLATE' => $Portal->get('template'),
'U_USERNAME' => $User->get('user_name')
) );
--- 31,39 ----
$Template->assign_vars( array(
! 'C_SITE_NAME' => $Portal->cfg_get('site_name'),
! 'C_SITE_ADDRESS' => $Portal->cfg_get('site_domain') . $Portal->cfg_get('rel_path'),
! 'C_VERSION' => $Portal->cfg_get('version'),
! 'C_REL_PATH' => $Portal->cfg_get('rel_path'),
! 'C_TEMPLATE' => $Portal->cfg_get('template'),
'U_USERNAME' => $User->get('user_name')
) );
|
|
From: Adam A. <ra...@us...> - 2003-09-14 21:50:36
|
Update of /cvsroot/phpmp/phpMP
In directory sc8-pr-cvs1:/tmp/cvs-serv3566
Modified Files:
index.php
Log Message:
Including the directories file might help...
Index: index.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/index.php,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** index.php 14 Sep 2003 21:35:19 -0000 1.51
--- index.php 14 Sep 2003 21:50:32 -0000 1.52
***************
*** 24,27 ****
--- 24,28 ----
define('C_PHPMP_ROOT', './');
+ include_once( C_PHPMP_ROOT . 'directories.php' );
include_once( C_PHPMP_ROOT . CORE_DIR .'main.php' );
$Portal = new Portal();
|
|
From: Adam A. <ra...@us...> - 2003-09-14 21:35:22
|
Update of /cvsroot/phpmp/phpMP/core
In directory sc8-pr-cvs1:/tmp/cvs-serv308/core
Modified Files:
admin.php main.php
Log Message:
Trying to update paths...
Index: admin.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/admin.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** admin.php 14 Sep 2003 09:24:25 -0000 1.2
--- admin.php 14 Sep 2003 21:35:19 -0000 1.3
***************
*** 118,122 ****
function parse_site($sname, $ovrtpl, $deftpl, $deflang, $defdate, $accact, $systime, $portperms)
{
! include_once( C_PHPMP_ROOT . 'dba/' . DB_TYPE . '.dba' );
$DB = new DB;
--- 118,122 ----
function parse_site($sname, $ovrtpl, $deftpl, $deflang, $defdate, $accact, $systime, $portperms)
{
! include_once( C_PHPMP_ROOT . CORE_DIR . 'dba/' . DB_TYPE . '.php' );
$DB = new DB;
***************
*** 142,146 ****
function _show_user()
{
! include_once( C_PHPMP_ROOT . 'dba/' . DB_TYPE . '.dba' );
$DB = new DB;
--- 142,146 ----
function _show_user()
{
! include_once( C_PHPMP_ROOT . CORE_DIR . 'dba/' . DB_TYPE . '.php' );
$DB = new DB;
***************
*** 171,175 ****
if (!$userid || $userid == 1) { print "Invalid User"; return; }
! include_once( C_PHPMP_ROOT . 'dba/' . DB_TYPE . '.dba' );
$DB = new DB;
--- 171,175 ----
if (!$userid || $userid == 1) { print "Invalid User"; return; }
! include_once( C_PHPMP_ROOT . CORE_DIR . 'dba/' . DB_TYPE . '.php' );
$DB = new DB;
***************
*** 220,224 ****
function parse_user($userid, $username, $passwd, $email, $auth_level, $date_format, $template, $signature, $delete)
{
! include_once( C_PHPMP_ROOT . 'dba/' . DB_TYPE . '.dba' );
$DB = new DB;
--- 220,224 ----
function parse_user($userid, $username, $passwd, $email, $auth_level, $date_format, $template, $signature, $delete)
{
! include_once( C_PHPMP_ROOT . CORE_DIR . 'dba/' . DB_TYPE . '.php' );
$DB = new DB;
Index: main.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/main.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** main.php 14 Sep 2003 21:08:31 -0000 1.3
--- main.php 14 Sep 2003 21:35:19 -0000 1.4
***************
*** 28,36 ****
var $_cfgvars;
! /**
! * @return arr array
! * @param arr array
* @desc Strips magic quotes from the
! * superglobal arrays.
*/
function strip_magic_quotes($arr)
--- 28,36 ----
var $_cfgvars;
! /**
! * @return arr array
! * @param arr array
* @desc Strips magic quotes from the
! * superglobal arrays.
*/
function strip_magic_quotes($arr)
***************
*** 51,57 ****
}
! /**
! * @return void
! * @desc Initiates all core components.
*/
function Main()
--- 51,57 ----
}
! /**
! * @return void
! * @desc Initiates all core components.
*/
function Main()
***************
*** 77,84 ****
global $Debug, $DB, $User, $MPCode, $Template;
! include_once( C_PHPMP_ROOT . 'core/debug.php' );
$Debug = new Debug();
! include_once( C_PHPMP_ROOT . 'core/dba/' . DB_TYPE . '.php' );
$DB = new sql_db();
$DB->connect();
--- 77,84 ----
global $Debug, $DB, $User, $MPCode, $Template;
! include_once( C_PHPMP_ROOT . CORE_DIR . '/debug.php' );
$Debug = new Debug();
! include_once( C_PHPMP_ROOT . CORE_DIR . 'dba/' . DB_TYPE . '.php' );
$DB = new sql_db();
$DB->connect();
***************
*** 91,107 ****
define('DB_TEMPLATE_VARS_TABLE', DB_NAME . '.' . DB_TABLE_PREFIX . 'template_vars');
! include_once(C_PHPMP_ROOT . 'core/config.init.php');
$this->_cfg_start();
! include_once(C_PHPMP_ROOT . 'core/constants.php');
! include_once(C_PHPMP_ROOT . 'core/functions.php');
! include_once(C_PHPMP_ROOT . 'core/user.php');
$User = new User(); // Create an instance of User.
create_vars();
! include_once(C_PHPMP_ROOT . 'core/session.php');
$Session = new Session();
--- 91,107 ----
define('DB_TEMPLATE_VARS_TABLE', DB_NAME . '.' . DB_TABLE_PREFIX . 'template_vars');
! include_once(C_PHPMP_ROOT . CORE_DIR . 'config.init.php');
$this->_cfg_start();
! include_once(C_PHPMP_ROOT . CORE_DIR . 'constants.php');
! include_once(C_PHPMP_ROOT . CORE_DIR . 'functions.php');
! include_once(C_PHPMP_ROOT . CORE_DIR . 'user.php');
$User = new User(); // Create an instance of User.
create_vars();
! include_once(C_PHPMP_ROOT . CORE_DIR . 'session.php');
$Session = new Session();
***************
*** 109,118 ****
$Session->run();
! include_once(C_PHPMP_ROOT . 'core/language.php');
$Language = new Language();
! include_once(C_PHPMP_ROOT . 'core/mpcode.php');
! include_once(C_PHPMP_ROOT . 'core/template.php');
$Template = new Template();
--- 109,118 ----
$Session->run();
! include_once(C_PHPMP_ROOT . CORE_DIR . 'language.php');
$Language = new Language();
! include_once(C_PHPMP_ROOT . CORE_DIR . 'mpcode.php');
! include_once(C_PHPMP_ROOT . CORE_DIR . 'template.php');
$Template = new Template();
***************
*** 130,136 ****
}
! /**
! * @return void
! * @desc Fetches Config vars.
*/
function _cfg_start()
--- 130,136 ----
}
! /**
! * @return void
! * @desc Fetches Config vars.
*/
function _cfg_start()
|
|
From: Adam A. <ra...@us...> - 2003-09-14 21:35:22
|
Update of /cvsroot/phpmp/phpMP
In directory sc8-pr-cvs1:/tmp/cvs-serv308
Modified Files:
index.php
Log Message:
Trying to update paths...
Index: index.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/index.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -r1.50 -r1.51
*** index.php 14 Sep 2003 09:24:25 -0000 1.50
--- index.php 14 Sep 2003 21:35:19 -0000 1.51
***************
*** 24,28 ****
define('C_PHPMP_ROOT', './');
! include_once( C_PHPMP_ROOT . 'core/main.php' );
$Portal = new Portal();
--- 24,28 ----
define('C_PHPMP_ROOT', './');
! include_once( C_PHPMP_ROOT . CORE_DIR .'main.php' );
$Portal = new Portal();
|
|
From: Adam A. <ra...@us...> - 2003-09-14 21:26:10
|
Update of /cvsroot/phpmp/phpMP
In directory sc8-pr-cvs1:/tmp/cvs-serv30943
Modified Files:
directories.php
Log Message:
All directories have their paths defined in the constants, so anyone wanting to customise their file structure (though they can easily appear to do so with mod_rewrite + Apache) can do so without updating the path in each file
Index: directories.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/directories.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** directories.php 14 Sep 2003 21:19:51 -0000 1.1
--- directories.php 14 Sep 2003 21:26:07 -0000 1.2
***************
*** 1,3 ****
! <?php
/*
--- 1,3 ----
! T<?php
/*
***************
*** 23,25 ****
*/
! ?>
\ No newline at end of file
--- 23,42 ----
*/
! /* This file contains constants that define the paths to certain phpMP directories.
! You can easily modify your phpMP structure by renaming your directories and
! changing the constants below to suite. */
!
! // Adminstration Area
! define('ADMIN_DIR', 'admin/');
! // phpMP Core files
! define('CORE_DIR', 'core/');
! // Languages Directory
! define('LANGUAGE_DIR', 'language/');
! // Directory containing all modules
! define('MODULES_DIR', 'modules/');
! // Templates Directory (Files, CSS, Images)
! define('TEMPLATES_DIR', 'templates/');
! // Template Cache Directory
! define('CACHE_DIR', 'template_cache/');
!
! ?>
\ No newline at end of file
|
|
From: Adam A. <ra...@us...> - 2003-09-14 21:19:54
|
Update of /cvsroot/phpmp/phpMP In directory sc8-pr-cvs1:/tmp/cvs-serv29558 Added Files: directories.php Log Message: Initial directory constants file ... yes blank --- NEW FILE: directories.php --- <?php /* * phpMP - The PHP Modular Portal System * Copyright (C) 2002-2003 Brian Rose and the phpMP group * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: directories.php,v 1.1 2003/09/14 21:19:51 rasadam Exp $ * */ ?> |
|
From: Adam A. <ra...@us...> - 2003-09-14 21:09:15
|
Update of /cvsroot/phpmp/phpMP/core/dba In directory sc8-pr-cvs1:/tmp/cvs-serv27466/core/dba Added Files: firebird.php Log Message: Another blank file, this is for the Firebird RDBMS... based on Interbase --- NEW FILE: firebird.php --- <?php /* * phpMP - The PHP Modular Portal System * Copyright (C) 2002-2003 Brian Rose and the phpMP group * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: firebird.php,v 1.1 2003/09/14 21:09:11 rasadam Exp $ * */ ?> |
|
From: Brian R. <hei...@us...> - 2003-09-14 21:08:34
|
Update of /cvsroot/phpmp/phpMP/core
In directory sc8-pr-cvs1:/tmp/cvs-serv27247/core
Modified Files:
main.php
Log Message:
Missed a few Config class calls.
Index: main.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/main.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** main.php 14 Sep 2003 09:28:02 -0000 1.2
--- main.php 14 Sep 2003 21:08:31 -0000 1.3
***************
*** 55,59 ****
* @desc Initiates all core components.
*/
! function Core()
{
// The following code ensures that, no matter what, the dreaded
--- 55,59 ----
* @desc Initiates all core components.
*/
! function Main()
{
// The following code ensures that, no matter what, the dreaded
***************
*** 119,130 ****
if( $User->get('template') == false )
{
! $Config->set('template', $Config->get('default_tpl'));
}
else
{
! $Config->set('template', $User->get('template'));
}
! $Template->set_template( $Config->get('template'), false, true );
$DB->close();
}
--- 119,130 ----
if( $User->get('template') == false )
{
! $this->cfg_set('template', $this->cfg_get('default_tpl'));
}
else
{
! $this->cfg_set('template', $User->get('template'));
}
! $Template->set_template( $this->cfg_get('template'), false, true );
$DB->close();
}
|
|
From: Adam A. <ra...@us...> - 2003-09-14 21:03:35
|
Update of /cvsroot/phpmp/phpMP/core/dba In directory sc8-pr-cvs1:/tmp/cvs-serv25760/core/dba Modified Files: postgresql.php Log Message: Testing line ending stuff.. Index: postgresql.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/core/dba/postgresql.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** postgresql.php 14 Sep 2003 20:55:27 -0000 1.1 --- postgresql.php 14 Sep 2003 21:03:31 -0000 1.2 *************** *** 1,25 **** ! <?php ! ! /* ! * phpMP - The PHP Modular Portal System ! * Copyright (C) 2002-2003 Brian Rose and the phpMP group ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! * ! * $Id$ ! * ! */ ! ?> --- 1,25 ---- ! <?php ! ! /* ! * phpMP - The PHP Modular Portal System ! * Copyright (C) 2002-2003 Brian Rose and the phpMP group ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! * ! * $Id$ ! * ! */ ! ?> |
|
From: Adam A. <ra...@us...> - 2003-09-14 20:55:33
|
Update of /cvsroot/phpmp/phpMP/core/dba In directory sc8-pr-cvs1:/tmp/cvs-serv23722/core/dba Added Files: postgresql.php Log Message: Just a file with a header, don't get too excited yet --- NEW FILE: postgresql.php --- <?php /* * phpMP - The PHP Modular Portal System * Copyright (C) 2002-2003 Brian Rose and the phpMP group * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: postgresql.php,v 1.1 2003/09/14 20:55:27 rasadam Exp $ * */ ?> |
|
From: Brian R. <hei...@us...> - 2003-09-14 09:34:43
|
Update of /cvsroot/phpmp/phpMP/docs In directory sc8-pr-cvs1:/tmp/cvs-serv6383/docs Modified Files: Changelog Log Message: Updated Changelog. Index: Changelog =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/Changelog,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** Changelog 30 Jun 2003 02:42:46 -0000 1.40 --- Changelog 14 Sep 2003 09:34:39 -0000 1.41 *************** *** 1,2 **** --- 1,25 ---- + 2003-09-14 [Heimidal] + * entire file structure + * includes/ **REMOVED** + * core/ **NEW** + All contents of includes/ has been moved + to core/. + * install/ **NEW** + * modules/ **NEW** + * templates_cache/ **NEW** + * core/dba/sql/ **REMOVED** + * docs/sql/ **NEW** + * core/core.php **REMOVED** + * core/main.php **NEW** + Contents of core.php moved here. + Core class renamed to Portal. + * core/config.init.php **REMOVED** + Consolidated into Portal class. + * core/dba/mysql.php **NEW** + Refresh of DBA. + * languages/ **REMOVED** + * language/ **NEW** + * language/en/ **NEW** + 2003-06-29 [Heimidal] * almost all files (so check them all) |
|
From: Brian R. <hei...@us...> - 2003-09-14 09:28:08
|
Update of /cvsroot/phpmp/phpMP/core
In directory sc8-pr-cvs1:/tmp/cvs-serv5456/core
Modified Files:
main.php
Log Message:
Removed a deprecated option.
Index: main.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/main.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** main.php 14 Sep 2003 09:24:25 -0000 1.1
--- main.php 14 Sep 2003 09:28:02 -0000 1.2
***************
*** 53,60 ****
/**
* @return void
- * @param optional_files array
* @desc Initiates all core components.
*/
! function Core( $optional_files = array() )
{
// The following code ensures that, no matter what, the dreaded
--- 53,59 ----
/**
* @return void
* @desc Initiates all core components.
*/
! function Core()
{
// The following code ensures that, no matter what, the dreaded
***************
*** 114,129 ****
include_once(C_PHPMP_ROOT . 'core/mpcode.php');
-
- // This while() statement will loop through the
- // $optional_files and include each file.
- if(count($optional_files) > 0)
- {
- $i = 0;
- while( $my_file = $optional_files[$i] )
- {
- include_once(C_PHPMP_ROOT . 'core/' . $my_file . '.php');
- $i++;
- }
- }
include_once(C_PHPMP_ROOT . 'core/template.php');
--- 113,116 ----
|
|
From: Brian R. <hei...@us...> - 2003-09-14 09:24:30
|
Update of /cvsroot/phpmp/phpMP/core
In directory sc8-pr-cvs1:/tmp/cvs-serv4793/core
Modified Files:
admin.php debug.php functions.php language.php mpcode.php
session.php template.php
Added Files:
main.php
Removed Files:
core.php
Log Message:
core/core.php has been moved to core/main.php. The Core class has been renamed to Portal.
--- NEW FILE: main.php ---
<?php
/*
* phpMP - The PHP Modular Portal System
* Copyright (C) 2002-2003 Brian Rose and the phpMP group
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id: main.php,v 1.1 2003/09/14 09:24:25 heimidal Exp $
*
*/
class Portal // Does, literally, everything.
{
var $_cfgvars;
/**
* @return arr array
* @param arr array
* @desc Strips magic quotes from the
* superglobal arrays.
*/
function strip_magic_quotes($arr)
{
foreach ($arr as $k => $v)
{
if (is_array($v))
{
$arr[$k] = strip_magic_quotes($v);
}
else
{
$arr[$k] = stripslashes($v);
}
}
return $arr;
}
/**
* @return void
* @param optional_files array
* @desc Initiates all core components.
*/
function Core( $optional_files = array() )
{
// The following code ensures that, no matter what, the dreaded
// magic_quotes function will *never* mess with our data.
// The addslashes() function *should* be used when necessary.
// The stripslashes() function is worthless with these fixes in place.
set_magic_quotes_runtime(0);
if (get_magic_quotes_gpc())
{
if (!empty($_GET)) { $_GET = $this->strip_magic_quotes($_GET); }
if (!empty($_POST)) { $_POST = $this->strip_magic_quotes($_POST); }
if (!empty($_COOKIE)) { $_COOKIE = $this->strip_magic_quotes($_COOKIE); }
}
error_reporting(E_ALL);
//error_reporting(E_ERROR | E_WARNING | E_PARSE);
$blah = include_once( C_PHPMP_ROOT . 'config.php' );
// Globalize all major class-containing variables.
global $Debug, $DB, $User, $MPCode, $Template;
include_once( C_PHPMP_ROOT . 'core/debug.php' );
$Debug = new Debug();
include_once( C_PHPMP_ROOT . 'core/dba/' . DB_TYPE . '.php' );
$DB = new sql_db();
$DB->connect();
define('DB_CONFIG_TABLE', DB_NAME . '.' . DB_TABLE_PREFIX . 'config');
define('DB_USERS_TABLE', DB_NAME . '.' . DB_TABLE_PREFIX . 'users');
define('DB_SESSIONS_TABLE', DB_NAME . '.' . DB_TABLE_PREFIX . 'sessions');
define('DB_MODULES_TABLE', DB_NAME . '.' . DB_TABLE_PREFIX . 'modules');
define('DB_BLOCK_TABLE', DB_NAME . '.' . DB_TABLE_PREFIX . 'blocks');
define('DB_TEMPLATE_VARS_TABLE', DB_NAME . '.' . DB_TABLE_PREFIX . 'template_vars');
include_once(C_PHPMP_ROOT . 'core/config.init.php');
$this->_cfg_start();
include_once(C_PHPMP_ROOT . 'core/constants.php');
include_once(C_PHPMP_ROOT . 'core/functions.php');
include_once(C_PHPMP_ROOT . 'core/user.php');
$User = new User(); // Create an instance of User.
create_vars();
include_once(C_PHPMP_ROOT . 'core/session.php');
$Session = new Session();
$Session->start();
$Session->run();
include_once(C_PHPMP_ROOT . 'core/language.php');
$Language = new Language();
include_once(C_PHPMP_ROOT . 'core/mpcode.php');
// This while() statement will loop through the
// $optional_files and include each file.
if(count($optional_files) > 0)
{
$i = 0;
while( $my_file = $optional_files[$i] )
{
include_once(C_PHPMP_ROOT . 'core/' . $my_file . '.php');
$i++;
}
}
include_once(C_PHPMP_ROOT . 'core/template.php');
$Template = new Template();
if( $User->get('template') == false )
{
$Config->set('template', $Config->get('default_tpl'));
}
else
{
$Config->set('template', $User->get('template'));
}
$Template->set_template( $Config->get('template'), false, true );
$DB->close();
}
/**
* @return void
* @desc Fetches Config vars.
*/
function _cfg_start()
{
global $DB;
$result = $DB->query( "SELECT * FROM " . DB_CONFIG_TABLE );
// Loop through all config values from DB.
// Define each key as its respective value.
while( $row = $DB->fetch_array( $result ) )
{
$this->_cfgvars[$row['config_key']] = $row['config_value'];
}
}
/**
* @return unknown
* @param cfgkey unknown
* @param cfgval unknown
* @desc Inserts the value of a given key into the Config array.
*/
function cfg_set($cfgkey, $cfgval)
{
if( (!empty($cfgkey)) && (preg_match('/^[a-z][a-z0-9_-]+/', $cfgkey)) && (!empty($cfgval)) )
{
$this->_cfgvars[$cfgkey] = $cfgval;
return true;
}
else
{
return false;
}
}
/**
* @return unknown
* @param cfgkey unknown
* @desc Fetches config array values.
*/
function cfg_get($cfgkey)
{
if( !empty($this->_cfgvars[$cfgkey]) )
{
return $this->_cfgvars[$cfgkey];
}
else
{
return false;
}
}
}
?>
Index: admin.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/admin.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** admin.php 14 Sep 2003 06:37:52 -0000 1.1
--- admin.php 14 Sep 2003 09:24:25 -0000 1.2
***************
*** 108,112 ****
if (C_USE_PORTAL_PERMS == 1) { $checked = "CHECKED"; } else { $checked = ""; }
print "<input type=\"checkbox\" name=\"portperms\" value=\"1\" " . $checked . "> Use Portal Permissions?<br>";
! print "<input type=\"submit\" name=\"submit_general\" value=\"Submit Configuration\">";
print "</form>";
}
--- 108,112 ----
if (C_USE_PORTAL_PERMS == 1) { $checked = "CHECKED"; } else { $checked = ""; }
print "<input type=\"checkbox\" name=\"portperms\" value=\"1\" " . $checked . "> Use Portal Permissions?<br>";
! print "<input type=\"submit\" name=\"submit_general\" value=\"Submit Portaluration\">";
print "</form>";
}
Index: debug.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/debug.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** debug.php 14 Sep 2003 07:02:10 -0000 1.2
--- debug.php 14 Sep 2003 09:24:25 -0000 1.3
***************
*** 46,50 ****
function msg_display($errno, $msg_text, $errfile, $errline)
{
! global $DB, $Core, $User, $Template;
switch($errno)
--- 46,50 ----
function msg_display($errno, $msg_text, $errfile, $errline)
{
! global $DB, $Portal, $User, $Template;
switch($errno)
***************
*** 66,70 ****
case E_USER_NOTICE:
! echo "A User Notice has been issued. Please notify the <a href=\"mailto: " . $Core['site_contact'] . "\">board administrator</a>.";
break;
}
--- 66,70 ----
case E_USER_NOTICE:
! echo "A User Notice has been issued. Please notify the <a href=\"mailto: " . $Portal['site_contact'] . "\">board administrator</a>.";
break;
}
Index: functions.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/functions.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** functions.php 14 Sep 2003 07:02:10 -0000 1.2
--- functions.php 14 Sep 2003 09:24:25 -0000 1.3
***************
*** 29,36 ****
function create_vars()
{
! global $Core, $User;
! ( $User->get('date_format') != '' ) ? ($Core->set('date_format', $User->get('date_format'))) : ($Core->set('date_format', $Core->get('default_date_format')));
! $Core->set('time_now', date( $Core->get('date_format') ) ); // This is here...for now.
}
--- 29,36 ----
function create_vars()
{
! global $Portal, $User;
! ( $User->get('date_format') != '' ) ? ($Portal->set('date_format', $User->get('date_format'))) : ($Portal->set('date_format', $Portal->get('default_date_format')));
! $Portal->set('time_now', date( $Portal->get('date_format') ) ); // This is here...for now.
}
Index: language.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/language.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** language.php 14 Sep 2003 07:02:10 -0000 1.2
--- language.php 14 Sep 2003 09:24:25 -0000 1.3
***************
*** 33,39 ****
function Language()
{
! global $Core, $User, $Local;
! $cfg_lang = $Core->get('default_lang');
$usr_lang = $User->get('language');
$lang = '';
--- 33,39 ----
function Language()
{
! global $Portal, $User, $Local;
! $cfg_lang = $Portal->get('default_lang');
$usr_lang = $User->get('language');
$lang = '';
***************
*** 41,45 ****
(empty($usr_lang)) ? $lang = $cfg_lang : $lang = $usr_lang;
! $Core->set('language', $lang);
$lang_file = C_PHPMP_ROOT . 'languages/' . $lang . '/lang_main.php';
--- 41,45 ----
(empty($usr_lang)) ? $lang = $cfg_lang : $lang = $usr_lang;
! $Portal->set('language', $lang);
$lang_file = C_PHPMP_ROOT . 'languages/' . $lang . '/lang_main.php';
Index: mpcode.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/mpcode.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** mpcode.php 14 Sep 2003 06:37:52 -0000 1.1
--- mpcode.php 14 Sep 2003 09:24:25 -0000 1.2
***************
*** 49,53 ****
// This may not be the best way, but it works
function _replace($string) {
! include (C_PHPMP_ROOT . "includes/mpcode_arrays.php");
foreach ($mpcode as $key => $code) {
--- 49,53 ----
// This may not be the best way, but it works
function _replace($string) {
! include (C_PHPMP_ROOT . "core/mpcode_arrays.php");
foreach ($mpcode as $key => $code) {
Index: session.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/session.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** session.php 14 Sep 2003 07:02:10 -0000 1.2
--- session.php 14 Sep 2003 09:24:25 -0000 1.3
***************
*** 57,63 ****
function destroy()
{
! global $DB, $Core, $SID;
! $exp_time = time() + $Core->get('session_length');
$this->page = basename($_SERVER['REQUEST_URI']);
--- 57,63 ----
function destroy()
{
! global $DB, $Portal, $SID;
! $exp_time = time() + $Portal->get('session_length');
$this->page = basename($_SERVER['REQUEST_URI']);
***************
*** 74,81 ****
$this->session_user_id = ANONYMOUS;
! setcookie($Core->get('cookie_name') . '_auto', '', time() - 31536000, $Core->get('cookie_path'), $Core->get('cookie_domain'), $Core->get('cookie_secure'));
$cookie_data = urlencode( ANONYMOUS . ':' . $this->session_key );
! (setcookie($Core->get('cookie_name') . '_data', $cookie_data, $cur_time + $Core->get('session_length'), $Core->get('cookie_path'), $Core->get('cookie_domain'), $Core->get('cookie_secure'))) ? ($SID = "?sid=") : ($SID = "?sid=" . $this->session_key);
}
--- 74,81 ----
$this->session_user_id = ANONYMOUS;
! setcookie($Portal->get('cookie_name') . '_auto', '', time() - 31536000, $Portal->get('cookie_path'), $Portal->get('cookie_domain'), $Portal->get('cookie_secure'));
$cookie_data = urlencode( ANONYMOUS . ':' . $this->session_key );
! (setcookie($Portal->get('cookie_name') . '_data', $cookie_data, $cur_time + $Portal->get('session_length'), $Portal->get('cookie_path'), $Portal->get('cookie_domain'), $Portal->get('cookie_secure'))) ? ($SID = "?sid=") : ($SID = "?sid=" . $this->session_key);
}
***************
*** 86,90 ****
function login()
{
! global $User, $DB, $Core;
$this->do_login == true;
--- 86,90 ----
function login()
{
! global $User, $DB, $Portal;
$this->do_login == true;
***************
*** 116,120 ****
{
$auto_cookie_data = urlencode( $this->session_user_id . ':' . $passwd_enc . ':' . $User->get('invisible_mode') );
! setcookie($Core->get('cookie_name') . '_auto', $auto_cookie_data, time() + 31536000, $Core->get('cookie_path'), $Core->get('cookie_domain'), $Core->get('cookie_secure'));
}
}
--- 116,120 ----
{
$auto_cookie_data = urlencode( $this->session_user_id . ':' . $passwd_enc . ':' . $User->get('invisible_mode') );
! setcookie($Portal->get('cookie_name') . '_auto', $auto_cookie_data, time() + 31536000, $Portal->get('cookie_path'), $Portal->get('cookie_domain'), $Portal->get('cookie_secure'));
}
}
***************
*** 131,135 ****
function run()
{
! global $User, $DB, $Core, $SID;
if( isset($_POST['do_login']) && ($_POST['do_login'] == true) )
--- 131,135 ----
function run()
{
! global $User, $DB, $Portal, $SID;
if( isset($_POST['do_login']) && ($_POST['do_login'] == true) )
***************
*** 149,153 ****
$cur_time = time(); // Time as of right now.
! $exp_time = $cur_time + $Core->get('session_length'); // Time at which this session will become invalid.
$this->ip = $User->get_ip_encoded(); // Gets the user's IP address.
--- 149,153 ----
$cur_time = time(); // Time as of right now.
! $exp_time = $cur_time + $Portal->get('session_length'); // Time at which this session will become invalid.
$this->ip = $User->get_ip_encoded(); // Gets the user's IP address.
***************
*** 219,223 ****
$cookie_data = urlencode( $this->session_user_id . ':' . $this->session_key );
! (setcookie($Core->get('cookie_name') . '_data', $cookie_data, $cur_time + $Core->get('session_length'), $Core->get('cookie_path'), $Core->get('cookie_domain'), $Core->get('cookie_secure'))) ? ($SID = "?sid=") : ($SID = "?sid=" . $this->session_key);
$this->clean();
}
--- 219,223 ----
$cookie_data = urlencode( $this->session_user_id . ':' . $this->session_key );
! (setcookie($Portal->get('cookie_name') . '_data', $cookie_data, $cur_time + $Portal->get('session_length'), $Portal->get('cookie_path'), $Portal->get('cookie_domain'), $Portal->get('cookie_secure'))) ? ($SID = "?sid=") : ($SID = "?sid=" . $this->session_key);
$this->clean();
}
***************
*** 254,263 ****
function get_session_data()
{
! global $Core, $DB, $User;
// Let's see if we have a standard cookie available.
! if(!empty($_COOKIE[$Core->get('cookie_name') . '_data']))
{
! $cookie_data = $_COOKIE[$Core->get('cookie_name') . '_data'];
$cookie_array = explode(':', urldecode( $cookie_data ) );
--- 254,263 ----
function get_session_data()
{
! global $Portal, $DB, $User;
// Let's see if we have a standard cookie available.
! if(!empty($_COOKIE[$Portal->get('cookie_name') . '_data']))
{
! $cookie_data = $_COOKIE[$Portal->get('cookie_name') . '_data'];
$cookie_array = explode(':', urldecode( $cookie_data ) );
***************
*** 284,290 ****
if( ($this->session_user_id == ANONYMOUS) || empty($this->session_user_id) )
{
! if( !empty( $_COOKIE[$Core->get('cookie_name') . '_auto'] ) ) // We have an autologin cookie set.
{
! $auto_cookie_data = $_COOKIE[$Core->get('cookie_name') . '_auto'];
$auto_cookie_array = explode(':', urldecode( $auto_cookie_data ) );
--- 284,290 ----
if( ($this->session_user_id == ANONYMOUS) || empty($this->session_user_id) )
{
! if( !empty( $_COOKIE[$Portal->get('cookie_name') . '_auto'] ) ) // We have an autologin cookie set.
{
! $auto_cookie_data = $_COOKIE[$Portal->get('cookie_name') . '_auto'];
$auto_cookie_array = explode(':', urldecode( $auto_cookie_data ) );
***************
*** 306,310 ****
{
// We'll unset the cookie and continue on like nothing ever happened.
! setcookie($Core->get('cookie_name') . '_auto', '', time() - 31536000, $Core->get('cookie_path'), $Core->get('cookie_domain'), $Core->get('cookie_secure'));
return false;
$this->session_user_id = ANONYMOUS;
--- 306,310 ----
{
// We'll unset the cookie and continue on like nothing ever happened.
! setcookie($Portal->get('cookie_name') . '_auto', '', time() - 31536000, $Portal->get('cookie_path'), $Portal->get('cookie_domain'), $Portal->get('cookie_secure'));
return false;
$this->session_user_id = ANONYMOUS;
Index: template.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/template.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** template.php 14 Sep 2003 07:02:10 -0000 1.2
--- template.php 14 Sep 2003 09:24:25 -0000 1.3
***************
*** 119,123 ****
function display($handle)
{
! global $Core, $Local;
if ($filename = $this->_tpl_load($handle))
--- 119,123 ----
function display($handle)
{
! global $Portal, $Local;
if ($filename = $this->_tpl_load($handle))
***************
*** 136,142 ****
function _tpl_load(&$handle)
{
! global $Core, $user;
! $filename = $this->cachedir . $this->filename[$handle] . '.' . (($this->static_lang) ? $Core->get('language') . '.' : '') . 'php';
// Recompile page if the original template is newer, otherwise load the compiled version
--- 136,142 ----
function _tpl_load(&$handle)
{
! global $Portal, $user;
! $filename = $this->cachedir . $this->filename[$handle] . '.' . (($this->static_lang) ? $Portal->get('language') . '.' : '') . 'php';
// Recompile page if the original template is newer, otherwise load the compiled version
***************
*** 231,235 ****
function _tpl_include($filename, $include = true)
{
! global $user, $Core, $Local;
$handle = $filename;
--- 231,235 ----
function _tpl_include($filename, $include = true)
{
! global $user, $Portal, $Local;
$handle = $filename;
***************
*** 257,261 ****
function compile($code, $no_echo = false, $echo_var = '')
{
! global $Core;
error_reporting(E_ERROR | E_WARNING | E_PARSE);
--- 257,261 ----
function compile($code, $no_echo = false, $echo_var = '')
{
! global $Portal;
error_reporting(E_ERROR | E_WARNING | E_PARSE);
***************
*** 334,338 ****
case 'INCLUDEPHP':
! if ($Core->get('tpl_php'))
{
$temp = '';
--- 334,338 ----
case 'INCLUDEPHP':
! if ($Portal->get('tpl_php'))
{
$temp = '';
***************
*** 343,347 ****
case 'PHP':
! if ($Core->get('tpl_php'))
{
$temp = '';
--- 343,347 ----
case 'PHP':
! if ($Portal->get('tpl_php'))
{
$temp = '';
***************
*** 695,701 ****
function compile_write(&$handle, $data)
{
! global $user, $Core;
! $filename = $this->cachedir . $this->filename[$handle] . '.' . (($this->static_lang) ? $Core->get('language') . '.' : '') . 'php';
if ($fp = @fopen($filename, 'w+'))
--- 695,701 ----
function compile_write(&$handle, $data)
{
! global $user, $Portal;
! $filename = $this->cachedir . $this->filename[$handle] . '.' . (($this->static_lang) ? $Portal->get('language') . '.' : '') . 'php';
if ($fp = @fopen($filename, 'w+'))
--- core.php DELETED ---
|