You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(361) |
Oct
(65) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(798) |
Feb
(694) |
Mar
(586) |
Apr
(145) |
May
(24) |
Jun
(24) |
Jul
(56) |
Aug
(11) |
Sep
(138) |
Oct
(107) |
Nov
(58) |
Dec
(39) |
| 2004 |
Jan
(157) |
Feb
(24) |
Mar
(13) |
Apr
(14) |
May
(73) |
Jun
(106) |
Jul
(217) |
Aug
(91) |
Sep
(116) |
Oct
(357) |
Nov
(27) |
Dec
(272) |
| 2005 |
Jan
(97) |
Feb
(40) |
Mar
(167) |
Apr
(365) |
May
(344) |
Jun
(357) |
Jul
(407) |
Aug
(529) |
Sep
(204) |
Oct
(52) |
Nov
(80) |
Dec
(1) |
| 2006 |
Jan
(2) |
Feb
(1) |
Mar
(11) |
Apr
(112) |
May
(121) |
Jun
(86) |
Jul
(51) |
Aug
(48) |
Sep
(107) |
Oct
(20) |
Nov
(50) |
Dec
(11) |
| 2007 |
Jan
(7) |
Feb
(11) |
Mar
(8) |
Apr
(11) |
May
(2) |
Jun
(25) |
Jul
(67) |
Aug
(134) |
Sep
(54) |
Oct
(69) |
Nov
(10) |
Dec
(74) |
| 2008 |
Jan
(73) |
Feb
(81) |
Mar
(64) |
Apr
(98) |
May
(157) |
Jun
(68) |
Jul
(80) |
Aug
(108) |
Sep
(176) |
Oct
(107) |
Nov
(265) |
Dec
(60) |
| 2009 |
Jan
(149) |
Feb
(140) |
Mar
(195) |
Apr
(141) |
May
(53) |
Jun
(45) |
Jul
(98) |
Aug
(153) |
Sep
(160) |
Oct
(138) |
Nov
(139) |
Dec
(104) |
| 2010 |
Jan
(188) |
Feb
(259) |
Mar
(133) |
Apr
(104) |
May
(42) |
Jun
(121) |
Jul
(38) |
Aug
(223) |
Sep
(259) |
Oct
(255) |
Nov
(106) |
Dec
(157) |
| 2011 |
Jan
(202) |
Feb
(110) |
Mar
(261) |
Apr
(272) |
May
(218) |
Jun
(108) |
Jul
(141) |
Aug
(205) |
Sep
(326) |
Oct
(279) |
Nov
(368) |
Dec
(238) |
| 2012 |
Jan
(239) |
Feb
(3) |
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(6) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
(1) |
Feb
(3) |
Mar
(9) |
Apr
(10) |
May
|
Jun
(1) |
Jul
(3) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(6) |
2
|
3
(3) |
|
4
(18) |
5
|
6
|
7
|
8
|
9
|
10
|
|
11
|
12
(19) |
13
|
14
(8) |
15
(12) |
16
|
17
|
|
18
(2) |
19
|
20
|
21
(20) |
22
|
23
(17) |
24
|
|
25
(47) |
26
|
27
(1) |
28
(3) |
29
(35) |
30
(12) |
31
(14) |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 23:59:23
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/coca/module.coca In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16957/private/lib/xoops2/coca/module.coca Added Files: Tag: xoops2_1_0-branch module.php Log Message: Made preliminary versions of auth and module components from include/common.php code --- NEW FILE: module.php --- <?php //$Id: module.php,v 1.1.2.1 2004/07/31 23:59:13 skalpa Exp $ /** * xoops.coca.module definition * * See the enclosed file LICENSE for licensing information. * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html * * @copyright The Xoops project http://www.xoops.org/ * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @author Skalpa Keo <sk...@xo...> * @since 2.1.0 */ class XoopsCocaModule extends XoopsCocaComponent { var $cocaId = 'xoops.coca.module'; /** * Name of this application * * If set to '.' before instanciation, will guess the current module using the actual request context. */ var $dirname = ''; /** * Pointer to corresponding xoopsModule instance kept for compatibility */ var $xoopsModule = null; function init( $options = array() ) { parent::init( $options ); if ( !empty($this->dirname) ) { if ( $this->dirname == '.' ) { if ( file_exists('./xoops_version.php' ) && false !== ($mod = strstr( $GLOBALS[XOOPS]->hal->phpSelf, '/modules/' ) ) ) { $this->dirname = substr( $mod, 9, strpos( $mod, '/', 9 )-9 ); } else { preg_match( '/http:\\/\\/[^\\/]*(.*)/', defined(XOOPS_REAL_URL)?XOOPS_REAL_URL:XOOPS_URL, $match ); if ( count(explode('/',$match[1]))+1 == count(explode('/',$GLOBALS[XOOPS]->hal->phpSelf)) ) { $this->dirname = 'system'; } } } $module_handler =& xoops_gethandler('module'); $xoopsModule =& $module_handler->getByDirname( $this->dirname ); if (!$xoopsModule || !$xoopsModule->getVar('isactive')) { trigger_error( _MODULENOEXIST, E_USER_WARNING ); return false; } $moduleperm_handler =& xoops_gethandler('groupperm'); $xoopsUser =& $GLOBALS['xoopsUser']; if ($xoopsUser) { if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), $xoopsUser->getGroups())) { redirect_header(XOOPS_URL."/user.php",1,_NOPERM); exit(); } } else { if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), XOOPS_GROUP_ANONYMOUS)) { redirect_header(XOOPS_URL."/user.php",1,_NOPERM); exit(); } } $this->classPath = XOOPS_ROOT_PATH . '/modules/' . $this->dirname; $this->cocaLangFiles = $this->classPath . '/main'; $this->xoopsModule =& $xoopsModule; } return true; } } ?> |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 23:58:50
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/coca/module.coca In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16863/module.coca Log Message: Directory /cvsroot/xoops/xoops2/private/lib/xoops2/coca/module.coca added to the repository --> Using per-directory sticky tag `xoops2_1_0-branch' |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 23:58:30
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/coca/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16809/private/lib/xoops2/coca/kernel Modified Files: Tag: xoops2_1_0-branch kernel.php Log Message: Added cocaLangFiles to xoops.coca.component to allow auto-loading of language files during component instanciation. Index: kernel.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/lib/xoops2/coca/kernel/kernel.php,v retrieving revision 1.3.4.7 retrieving revision 1.3.4.8 diff -C2 -d -r1.3.4.7 -r1.3.4.8 *** kernel.php 31 Jul 2004 03:40:37 -0000 1.3.4.7 --- kernel.php 31 Jul 2004 23:58:22 -0000 1.3.4.8 *************** *** 39,42 **** --- 39,46 ---- var $publicPath = '.'; /** + * @var mixed (string/array) Language files to load when this component is instanciated + */ + var $cocaLangFiles = ''; + /** * @var integer Unique instance identifier that can be used to differentiate several instances of the same component */ *************** *** 395,398 **** --- 399,405 ---- $this->services[$cid] =& $inst; } + if ( isset($this->lang) && !empty($inst->cocaLangFiles) ) { + $this->lang->loadStrings( $inst->cocaLangFiles ); + } return $inst; } else { |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 23:56:50
|
Update of /cvsroot/xoops/xoops2/private/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16560/private/etc Modified Files: Tag: xoops2_1_0-branch rc_core.php services_registry.php Log Message: Made preliminary versions of auth and module components from include/common.php code Index: rc_core.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/etc/rc_core.php,v retrieving revision 1.2.8.6 retrieving revision 1.2.8.7 diff -C2 -d -r1.2.8.6 -r1.2.8.7 *** rc_core.php 31 Jul 2004 03:37:21 -0000 1.2.8.6 --- rc_core.php 31 Jul 2004 23:56:41 -0000 1.2.8.7 *************** *** 4,12 **** set_magic_quotes_runtime(0); ! //require_once XOOPS_ETC_PATH . "/config_{$this->configFile}.php"; ! ! if ( $this->runMode && XOOPS_RUN_DEBUG ) { $this->create( 'xoops.arch.errorhandler' ); ! error_reporting( E_ALL ); } else { error_reporting(0); --- 4,14 ---- set_magic_quotes_runtime(0); ! if ( $this->runMode & XOOPS_RUN_DEBUG ) { $this->create( 'xoops.arch.errorhandler' ); ! if ( $this->runMode & XOOPS_RUN_DEV == XOOPS_RUN_DEV ) { ! error_reporting( E_ALL ); ! } else { ! error_reporting( E_ALL ^ E_NOTICE ); ! } } else { error_reporting(0); *************** *** 31,37 **** } ! $this->create( 'xoops.arch.hal' ); ! $this->create( 'xoops.arch.session', array( 'sessionId' => ($xoopsConfig['use_ssl'] && isset($_POST[$xoopsConfig['sslpost_name']]) && $_POST[$xoopsConfig['sslpost_name']] != '') ? $_POST[$xoopsConfig['sslpost_name']] : 0, 'sessionName' => ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') ? $xoopsConfig['session_name'] : '', --- 33,39 ---- } ! $this->hal =& $this->create( 'xoops.arch.hal' ); ! $this->session =& $this->create( 'xoops.arch.session', array( 'sessionId' => ($xoopsConfig['use_ssl'] && isset($_POST[$xoopsConfig['sslpost_name']]) && $_POST[$xoopsConfig['sslpost_name']] != '') ? $_POST[$xoopsConfig['sslpost_name']] : 0, 'sessionName' => ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') ? $xoopsConfig['session_name'] : '', *************** *** 39,42 **** --- 41,61 ---- ) ); + $this->auth =& $this->create( 'xoops.arch.auth' ); + if ( isset( $auth->xoopsUser ) ) { + $GLOBALS['xoopsUser'] =& $auth->xoopsUser; + $GLOBALS['xoopsUserIsAdmin'] = $auth->xoopsUser->isAdmin(); + } else { + $GLOBALS['xoopsUser'] = ''; + $GLOBALS['xoopsUserIsAdmin'] = false; + } + + + if ( false === ( $module = $this->create( 'xoops.coca.module', array( 'dirname' => '.' ) ) ) ) { + include_once XOOPS_ROOT_PATH."/header.php"; + echo "<h4>"._MODULENOEXIST."</h4>"; + include_once XOOPS_ROOT_PATH."/footer.php"; + exit(); + } + $GLOBALS['xoopsModule'] =& $module->xoopsModule; ?> \ No newline at end of file Index: services_registry.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/etc/services_registry.php,v retrieving revision 1.3.4.8 retrieving revision 1.3.4.9 diff -C2 -d -r1.3.4.8 -r1.3.4.9 *** services_registry.php 31 Jul 2004 03:37:21 -0000 1.3.4.8 --- services_registry.php 31 Jul 2004 23:56:41 -0000 1.3.4.9 *************** *** 22,25 **** --- 22,31 ---- ); + $include['xoops.coca.module'] = array( + 'cocaIdentifier' => 'xoops.coca.module', + 'className' => 'XoopsCocaModule', + 'classPath' => XOOPS_LIB_PATH . '/xoops2/coca/module.coca/module.php', + ); + $include['xoops.arch.hal'] = array( 'cocaIdentifier' => 'xoops.arch.hal', *************** *** 50,53 **** --- 56,66 ---- ); + $include['xoops.arch.auth'] = array( + 'cocaIdentifier' => 'xoops.arch.auth', + 'className' => 'XoopsAuthentication', + 'classPath' => XOOPS_LIB_PATH . '/xoops2/arch/auth.coca/auth.php', + 'singleton' => true, + ); + $include['xoops.arch.errorhandler'] = array( 'cocaIdentifier' => 'xoops.arch.errorhandler', |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 03:40:48
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/coca/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16063/private/lib/xoops2/coca/kernel Modified Files: Tag: xoops2_1_0-branch kernel.php Log Message: Enhanced the instanciation delegation machanism: local factories can now return a component id to specify they want this type of object to be created, instead of having to create the instance by themselves (its quite more flexible like that). Index: kernel.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/lib/xoops2/coca/kernel/kernel.php,v retrieving revision 1.3.4.6 retrieving revision 1.3.4.7 diff -C2 -d -r1.3.4.6 -r1.3.4.7 *** kernel.php 30 Jul 2004 22:33:50 -0000 1.3.4.6 --- kernel.php 31 Jul 2004 03:40:37 -0000 1.3.4.7 *************** *** 372,376 **** $params[1] = $this->getInstanceVars( $desc['cocaIdentifier'], $cid, $options ); $inst =& call_user_func_array( array( $className, 'create' ), $params ); ! } else { $inst =& new $className(); if ( isset( $inst->cocaId ) ) { --- 372,381 ---- $params[1] = $this->getInstanceVars( $desc['cocaIdentifier'], $cid, $options ); $inst =& call_user_func_array( array( $className, 'create' ), $params ); ! if ( is_string($inst) ) { ! $this->import( $inst ); ! $className = $this->registry[$inst]['className']; ! } ! } ! if ( !isset($inst) || !is_object($inst) ) { $inst =& new $className(); if ( isset( $inst->cocaId ) ) { |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 03:38:59
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/arch/hal.coca In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15837/private/lib/xoops2/arch/hal.coca Added Files: Tag: xoops2_1_0-branch hal.php Log Message: Added / ported a few other architecture components: - xoops.arch.hal to reduce differencies between plarforms (from code found in common.php) - xoops.session.* for session handlers - moved session initialisation code to session class - added an experimental (but AFAIK working, safe, and scaling better than db) filesystem-based session handler --- NEW FILE: hal.php --- <?php // $Id: hal.php,v 1.1.2.1 2004/07/31 03:38:48 skalpa Exp $ /** * xoops.arch.hal definition * * See the enclosed file LICENSE for licensing information. * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html * * @copyright The Xoops project http://www.xoops.org/ * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @author Skalpa Keo <sk...@xo...> * @since 2.1.0 */ class XoopsHal extends XoopsCocaComponent { var $cocaId = 'xoops.arch.hal'; function init( $options = array() ) { set_magic_quotes_runtime(0); if ( parent::init( $options ) ) { if ( !isset($_SERVER['PATH_TRANSLATED']) && isset($_SERVER['SCRIPT_FILENAME']) ) { $_SERVER['PATH_TRANSLATED'] =& $_SERVER['SCRIPT_FILENAME']; // For Apache CGI } elseif ( isset($_SERVER['PATH_TRANSLATED']) && !isset($_SERVER['SCRIPT_FILENAME']) ) { $_SERVER['SCRIPT_FILENAME'] =& $_SERVER['PATH_TRANSLATED']; // For IIS/2K now I think :-( } if ( !isset( $_SERVER[ 'REQUEST_URI' ] ) ) { // Not defined by IIS // Under some configs, IIS makes SCRIPT_NAME point to php.exe :-( if ( !( $_SERVER[ 'REQUEST_URI' ] = @$_SERVER['PHP_SELF'] ) ) { $_SERVER[ 'REQUEST_URI' ] = $_SERVER['SCRIPT_NAME']; } if ( isset( $_SERVER[ 'QUERY_STRING' ] ) ) { $_SERVER[ 'REQUEST_URI' ] .= '?' . $_SERVER[ 'QUERY_STRING' ]; } } if ( !function_exists('array_combine') ) { function array_combine( $keys, $vals ) { if ( empty($keys) || empty($vals) || (count($keys) != count($vals)) ) { return false; } $ret = array(); $val = current($vals); foreach ($keys as $k) { $ret[$k] = $val; $val = next($vals); } return $ret; } } // Xoops 2.0.x compatibility $GLOBALS['xoopsRequestUri'] =& $_SERVER[ 'REQUEST_URI' ]; // Deprecated (use the corrected $_SERVER variable now) return true; } } } ?> |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 03:38:58
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/arch/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15837/private/lib/xoops2/arch/session Added Files: Tag: xoops2_1_0-branch session.php xoopsdb.php xoopsfile.php Log Message: Added / ported a few other architecture components: - xoops.arch.hal to reduce differencies between plarforms (from code found in common.php) - xoops.session.* for session handlers - moved session initialisation code to session class - added an experimental (but AFAIK working, safe, and scaling better than db) filesystem-based session handler --- NEW FILE: xoopsdb.php --- <?php // $Id: xoopsdb.php,v 1.1.2.1 2004/07/31 03:38:49 skalpa Exp $ $GLOBALS[XOOPS]->import( 'xoops.arch.session' ); /** * Handler for a session * @package kernel * * @author Kazumi Ono <on...@xo...> * @copyright copyright (c) 2000-2003 XOOPS.org */ class XoopsSessionXoopsdb extends XoopsSessionHandler { var $tableName = 'session'; /** * Database connection * * @var object * @access private */ var $db; /** * Read a session from the database * * @param string &sess_id ID of the session * * @return array Session data */ function read($sess_id) { $db =& $GLOBALS[XOOPS]->create('xoops.db'); $sql = sprintf( 'SELECT sess_data FROM %s WHERE sess_id = %s', $db->prefix($this->tableName), $db->quoteString($sess_id) ); if (false != $result = $db->query($sql)) { if (list($sess_data) = $db->fetchRow($result)) { return $sess_data; } } return ''; } /** * Write a session to the database * * @param string $sess_id * @param string $sess_data * * @return bool **/ function write($sess_id, $sess_data) { $db =& $GLOBALS[XOOPS]->create('xoops.db'); $sess_id = $db->quoteString($sess_id); list($count) = $db->fetchRow($db->query("SELECT COUNT(*) FROM ".$db->prefix($this->tableName)." WHERE sess_id=".$sess_id)); if ( $count > 0 ) { $sql = sprintf('UPDATE %s SET sess_updated = %u, sess_data = %s WHERE sess_id = %s', $db->prefix($this->tableName), time(), $db->quoteString($sess_data), $sess_id); } else { $sql = sprintf('INSERT INTO %s (sess_id, sess_updated, sess_ip, sess_data) VALUES (%s, %u, %s, %s)', $db->prefix($this->tableName), $sess_id, time(), $db->quoteString($_SERVER['REMOTE_ADDR']), $db->quoteString($sess_data)); } if (!$db->queryF($sql)) { return false; } return true; } /** * Destroy a session * * @param string $sess_id * * @return bool **/ function destroy($sess_id) { $db =& $GLOBALS[XOOPS]->create('xoops.db'); $sql = sprintf('DELETE FROM %s WHERE sess_id = %s', $db->prefix($this->tableName), $db->quoteString($sess_id)); if ( !$result = $db->queryF($sql) ) { return false; } return true; } /** * Garbage Collector * * @param int $expire Time in seconds until a session expires * @return bool **/ function gc($expire) { $db =& $GLOBALS[XOOPS]->create('xoops.db'); $mintime = time() - intval($expire); $sql = sprintf('DELETE FROM %s WHERE sess_updated < %u', $db->prefix($this->tableName), $mintime); return $db->queryF($sql); } } ?> --- NEW FILE: xoopsfile.php --- <?php // $Id: xoopsfile.php,v 1.1.2.1 2004/07/31 03:38:49 skalpa Exp $ $GLOBALS[XOOPS]->import( 'xoops.arch.session' ); /** * Filesystem based session handler * * @package arch * @subpackage session * * @copyright copyright (c) 2000-2003 XOOPS.org */ class XoopsSessionXoopsfile extends XoopsSessionHandler { var $savePath; function open( $savePath, $sessionName ) { $this->savePath = $savePath; $this->sessionName = $sessionName; if ( !is_dir( "$savePath/$sessionName" ) ) { return mkdir( "$savePath/$sessionName" ) ? true : false; } return true; } /** * Get session container file path * * @access private */ function filepath( $id ) { $uid = '_' . md5( isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : $_SERVER['HTTP_USER_AGENT'] ) ; return "{$this->savePath}/{$this->sessionName}/$id$uid"; } function read($id) { $data = file_get_contents( $this->filepath($id) ); return !empty($data) ? $data : ''; } function write($id, $data) { if ( false !== ($fp = fopen( $this->filepath($id), "w" )) ) { fwrite( $fp, $data ); fclose( $fp ); return true; } return false; } function destroy($id) { return @unlink($this->filepath($id)); } function gc($expire) { } } ?> --- NEW FILE: session.php --- <?php // $Id: session.php,v 1.1.2.1 2004/07/31 03:38:49 skalpa Exp $ /** * xoops.session service definition * * See the enclosed file LICENSE for licensing information. * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html * * @copyright The Xoops project http://www.xoops.org/ * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @author Skalpa Keo <sk...@xo...> * @since 2.1.0 */ class XoopsSession extends XoopsCocaComponent { var $cocaId = 'xoops.session'; var $handler = 'xoopsdb'; var $sessionId = 0; var $useCustomName = false; var $sessionName = ''; var $savePath = null; var $cacheExpire = 180; var $cacheLimiter = null; function &create( $cid, $options = array() ) { return "xoops.arch.session." . (isset($options['handler']) ? $options['handler'] : 'xoopsdb'); } function init( $options = array() ) { parent::init( $options ); if ( $this->sessionId ) { session_id( $this->sessionId ); } elseif ( $this->useCustomName && !empty($this->sessionName) ) { if ( isset( $_COOKIE[$this->sessionName] ) ) { $this->sessionId = session_id( $_COOKIE[$this->sessionName] ); } else { $_SESSION = array(); // no custom session cookie set, destroy session if any } } if (!$this->sessionId) { $this->sessionId = session_id(); } if ( !is_null($this->savePath) ) { session_save_path( $this->savePath ); } if ( !is_null($this->cacheLimiter) ) { session_cache_limiter( $this->cacheLimiter ); } if ( !is_null($this->cacheExpire) && function_exists('session_cache_expire') ) { session_cache_expire( $this->cacheExpire ); } session_start(); return true; } function setCookieParams( $lifetime, $path = '/', $domain = '', $secure = 0 ) { // Don't use session_set_cookie_params ( see http://www.php.net/manual/en/function.session-set-cookie-params.php ) // if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') { setcookie( $this->sessionName, session_id(), time() + $lifetime, $path, $domain, $secure ); } } /** * Base class for session components that need to call session_set_save_handler() */ class XoopsSessionHandler extends XoopsSession { var $cocaId = 'xoops.arch.session.handler'; var $cocaParentId = 'xoops.arch.session'; function init( $options = array() ) { session_set_save_handler( array(&$this, 'open'), array(&$this, 'close'), array(&$this, 'read'), array(&$this, 'write'), array(&$this, 'destroy'), array(&$this, 'gc') ); return parent::init($options); } function open($save_path, $session_name) { return true; } function close() { return true; } function read($sess_id) { return ''; } function write($sess_id, $sess_data) { return true; } function destroy($sess_id) { return true; } function gc($expire) { return true; } } ?> |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 03:38:23
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/arch/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15773/session Log Message: Directory /cvsroot/xoops/xoops2/private/lib/xoops2/arch/session added to the repository --> Using per-directory sticky tag `xoops2_1_0-branch' |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 03:38:23
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/arch/hal.coca In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15773/hal.coca Log Message: Directory /cvsroot/xoops/xoops2/private/lib/xoops2/arch/hal.coca added to the repository --> Using per-directory sticky tag `xoops2_1_0-branch' |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 03:37:30
|
Update of /cvsroot/xoops/xoops2/private/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15693/private/etc Modified Files: Tag: xoops2_1_0-branch rc_core.php services_registry.php Log Message: Added / ported a few other architecture components: - xoops.arch.hal to reduce differencies between plarforms (from code found in common.php) - xoops.session.* for session handlers - moved session initialisation code to session class - added an experimental (but AFAIK working, safe, and scaling better than db) filesystem-based session handler Index: rc_core.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/etc/rc_core.php,v retrieving revision 1.2.8.5 retrieving revision 1.2.8.6 diff -C2 -d -r1.2.8.5 -r1.2.8.6 *** rc_core.php 31 Jul 2004 02:15:02 -0000 1.2.8.5 --- rc_core.php 31 Jul 2004 03:37:21 -0000 1.2.8.6 *************** *** 27,34 **** if ( isset( $GLOBALS['xoopsOption']['pagetype'] ) ) { if ( !strpos( $GLOBALS['xoopsOption']['pagetype'], '..' ) ) { ! $this->lang->loadStrings( XOOPS_ROOT_PATH . '/' . $GLOBALS['xoopsOption']['pagetype'] ); } } --- 27,41 ---- if ( isset( $GLOBALS['xoopsOption']['pagetype'] ) ) { if ( !strpos( $GLOBALS['xoopsOption']['pagetype'], '..' ) ) { ! $this->lang->loadStrings( 'xoops:/' . $GLOBALS['xoopsOption']['pagetype'] ); } } + $this->create( 'xoops.arch.hal' ); + + $this->create( 'xoops.arch.session', array( + 'sessionId' => ($xoopsConfig['use_ssl'] && isset($_POST[$xoopsConfig['sslpost_name']]) && $_POST[$xoopsConfig['sslpost_name']] != '') ? $_POST[$xoopsConfig['sslpost_name']] : 0, + 'sessionName' => ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') ? $xoopsConfig['session_name'] : '', + 'cacheExpire' => $xoopsConfig['session_expire'] + ) ); Index: services_registry.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/etc/services_registry.php,v retrieving revision 1.3.4.7 retrieving revision 1.3.4.8 diff -C2 -d -r1.3.4.7 -r1.3.4.8 *** services_registry.php 31 Jul 2004 02:15:02 -0000 1.3.4.7 --- services_registry.php 31 Jul 2004 03:37:21 -0000 1.3.4.8 *************** *** 18,22 **** 'cocaIdentifier' => 'xoops.coca.language', 'className' => 'XoopsLangPhpconstants', ! 'classPath' => XOOPS_LIB_PATH . '/xoops2/coca/lang.coca/lang.php' ); --- 18,51 ---- 'cocaIdentifier' => 'xoops.coca.language', 'className' => 'XoopsLangPhpconstants', ! 'classPath' => XOOPS_LIB_PATH . '/xoops2/coca/lang.coca/lang.php', ! 'singleton' => true, ! ); ! ! $include['xoops.arch.hal'] = array( ! 'cocaIdentifier' => 'xoops.arch.hal', ! 'className' => 'XoopsHal', ! 'classPath' => XOOPS_LIB_PATH . '/xoops2/arch/hal.coca/hal.php', ! 'singleton' => true, ! ); ! ! $include['xoops.arch.session'] = array( ! 'cocaIdentifier' => 'xoops.arch.session', ! 'className' => 'XoopsSession', ! 'classPath' => XOOPS_LIB_PATH . '/xoops2/arch/session/session.php', ! 'singleton' => true, ! ); ! ! $include['xoops.arch.session.xoopsdb'] = array( ! 'cocaIdentifier' => 'xoops.arch.session.xoopsdb', ! 'className' => 'XoopsSessionXoopsdb', ! 'classPath' => XOOPS_LIB_PATH . '/xoops2/arch/session/xoopsdb.php', ! 'singleton' => true, ! ); ! ! $include['xoops.arch.session.xoopsfile'] = array( ! 'cocaIdentifier' => 'xoops.arch.session.xoopsfile', ! 'className' => 'XoopsSessionXoopsfile', ! 'classPath' => XOOPS_LIB_PATH . '/xoops2/arch/session/xoopsfile.php', ! 'singleton' => true, ); |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 02:15:17
|
Update of /cvsroot/xoops/xoops2/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7672/include Modified Files: Tag: xoops2_1_0-branch common.php Log Message: Added the xoops.coca.language service Index: common.php =================================================================== RCS file: /cvsroot/xoops/xoops2/include/common.php,v retrieving revision 1.54.4.6 retrieving revision 1.54.4.7 diff -C2 -d -r1.54.4.6 -r1.54.4.7 *** common.php 30 Jul 2004 22:35:24 -0000 1.54.4.6 --- common.php 31 Jul 2004 02:15:09 -0000 1.54.4.7 *************** *** 83,89 **** $GLOBALS['xoopsDB'] =& $xoops2->db; - // ################# Load Config Settings ############## - $config_handler =& xoops_gethandler('config'); - $xoopsConfig =& $config_handler->getConfigsByCat(XOOPS_CONF); if ($xoopsConfig['enable_badips'] == 1 && isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] != '') { --- 83,86 ---- *************** *** 98,127 **** unset($xoopsConfig['badips']); - // for older versions...will be DEPRECATED! - $xoopsConfig['xoops_url'] = XOOPS_URL; - $xoopsConfig['root_path'] = XOOPS_ROOT_PATH."/"; - - - // #################### Include site-wide lang file ################## - if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php") ) { - include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php"; - } else { - include_once XOOPS_ROOT_PATH."/language/english/global.php"; - } - - // ################ Include page-specific lang file ################ - if (isset($xoopsOption['pagetype']) && false === strpos($xoopsOption['pagetype'], '.')) { - if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/".$xoopsOption['pagetype'].".php") ) { - include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/".$xoopsOption['pagetype'].".php"; - } else { - include_once XOOPS_ROOT_PATH."/language/english/".$xoopsOption['pagetype'].".php"; - } - } $xoopsOption = array(); - if ( !defined("XOOPS_USE_MULTIBYTES") ) { - define("XOOPS_USE_MULTIBYTES",0); - } - /**#@+ * Host abstraction layer --- 95,100 ---- *************** *** 267,270 **** --- 240,244 ---- } if ($xoopsModule->getVar('hasconfig') == 1 || $xoopsModule->getVar('hascomments') == 1 || $xoopsModule->getVar( 'hasnotification' ) == 1) { + $config_handler =& xoops_gethandler('config'); $xoopsModuleConfig =& $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid')); } |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 02:15:11
|
Update of /cvsroot/xoops/xoops2/private/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7617/private/etc Modified Files: Tag: xoops2_1_0-branch rc_core.php services_registry.php Log Message: Added the xoops.coca.language service Index: rc_core.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/etc/rc_core.php,v retrieving revision 1.2.8.4 retrieving revision 1.2.8.5 diff -C2 -d -r1.2.8.4 -r1.2.8.5 *** rc_core.php 30 Jul 2004 22:27:55 -0000 1.2.8.4 --- rc_core.php 31 Jul 2004 02:15:02 -0000 1.2.8.5 *************** *** 18,21 **** --- 18,35 ---- // @todo: we shouldn't have to do this as early as this $this->db =& $this->create( 'xoops.db' ); + $GLOBALS['xoopsDB'] =& $this->db; + // ################# Load Config Settings ############## + $config_handler =& xoops_gethandler('config'); + $xoopsConfig =& $config_handler->getConfigsByCat(XOOPS_CONF); + $GLOBALS['xoopsConfig'] =& $xoopsConfig; + + $this->lang =& $this->create( 'xoops.coca.language', array( 'language' => $xoopsConfig['language'] ) ); + if ( isset( $GLOBALS['xoopsOption']['pagetype'] ) ) { + if ( !strpos( $GLOBALS['xoopsOption']['pagetype'], '..' ) ) { + $this->lang->loadStrings( XOOPS_ROOT_PATH . '/' . $GLOBALS['xoopsOption']['pagetype'] ); + } + } + + ?> \ No newline at end of file Index: services_registry.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/etc/services_registry.php,v retrieving revision 1.3.4.6 retrieving revision 1.3.4.7 diff -C2 -d -r1.3.4.6 -r1.3.4.7 *** services_registry.php 30 Jul 2004 22:27:55 -0000 1.3.4.6 --- services_registry.php 31 Jul 2004 02:15:02 -0000 1.3.4.7 *************** *** 15,18 **** --- 15,24 ---- ); + $include['xoops.coca.language'] = array( + 'cocaIdentifier' => 'xoops.coca.language', + 'className' => 'XoopsLangPhpconstants', + 'classPath' => XOOPS_LIB_PATH . '/xoops2/coca/lang.coca/lang.php' + ); + $include['xoops.arch.errorhandler'] = array( 'cocaIdentifier' => 'xoops.arch.errorhandler', |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 02:14:31
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/coca/lang.coca In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7585/private/lib/xoops2/coca/lang.coca Added Files: Tag: xoops2_1_0-branch lang.php Log Message: Added the xoops.coca.language service --- NEW FILE: lang.php --- <?php //$Id: lang.php,v 1.1.2.1 2004/07/31 02:14:22 skalpa Exp $ /** * XoopsLanguage class definition * * @copyright The Xoops project http://www.xoops.org/ * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @package xoops * @subpackage lang * @author Skalpa Keo <sk...@xo...> * @since 2.1.0 * @internal Almost a straight copy from the Xoops 2.0.x include/common.php code * --------------------------------------------------------------------------------- * See the enclosed file LICENSE for licensing information. * If you did not receive this file, see http://www.fsf.org/copyleft/gpl.html * --------------------------------------------------------------------------------- */ class XoopsLang extends XoopsCocaComponent { var $cocaId = 'xoops.coca.language'; /** * Current language * @var string */ var $language = 'english'; /** * Default language (to load a default file when not available in the requested language) * @var string */ var $defaultLanguage = 'english'; /** * List of files that must be loaded on service instanciation */ var $persistentFiles = array( 'xoops:/global' ); /** * Initialization: include the global language files */ function init( $options = array() ) { if ( parent::init( $options ) ) { foreach( $this->persistentFiles as $file ) { $this->loadStrings( $file, '', $this ); } } // One of the global files must define XOOPS_USE_MULTIBYTES if ( !defined("XOOPS_USE_MULTIBYTES") ) { define("XOOPS_USE_MULTIBYTES",0); } return true; } function loadStrings( $defname, $lang = '' ) { return $GLOBALS[XOOPS]->lang->loadStrings( $defname, $lang, isset($this)?$this:null ); } } class XoopsLangPhpconstants extends XoopsLang { var $cocaId = 'xoops.coca.language.php_constants'; var $cocaParentId = 'xoops.coca.language'; /** * Return the real path to a language resource file given a specified mask. * * This method accepts a mask built like /path/to/language/{lcid}/myfile.php and will replace {lcid} * with the specified language if the file exists or the default language otherwise.<br /> * NB: The mask can point to any kind of file, so we may use this function will something like * /path/to/themes/.../language/{lcid]/strings.js if we want to (to be continued...). */ function makeFilepath( $mask, $curlang = '' ) { if ( empty($curlang) ) { $curlang = $this->language; } if ( is_readable( $path = str_replace( '{lcid}', empty($curlang)?$this->language:$curlang, $mask ) ) ) { return $path; } return str_replace( '{lcid}', $this->defaultLanguage, $mask ); } /** * Include the specified language file * * xo-mod:filename, xo-mod:/modname/filename * xo-lib:filename, xo-lib:/my.coca.id/filename * * Language files should be stored at the following locations: * - For a module: {moddir}/language/langcode/files.php * - For a component: {classPath}/resources/language/langcode/files.php */ function convertXoopsPath( $path, $me= null ) { switch ( substr( $path, 0, 7 ) ) { case 'xo-mod:': if ( $path{7}!='/' ) { if ( !isset( $GLOBALS['xoopsModule'] ) ) { return ''; } $modname = $GLOBALS['xoopsModule']->getVar('dirname','n'); $defname = substr($path, 7); } else { $modname = substr( $path, 8, strpos( $path, '/', 8 )-8 ); $defname = substr( $path, 9+strlen($modname) ); } return XOOPS_ROOT_PATH . "/modules/$modname/language/{lcid}/$defname.php"; break; case 'xo-lib:': if ( $path{7}!='/' ) { if ( !isset($me) ) { return ''; } $clspath = $me->classPath; $defname = substr($path, 7); } else { $cid = substr($path, 8, strpos($path, '/', 8)-8); $clspath = $GLOBALS[XOOPS]->getClassVar( $cid, 'classPath', false ); $defname = substr( $path, 9+strlen($cid) ); } return $clspath . "/resources/language/{lcid}/$defname.php"; break; case 'xoops:/': $path = XOOPS_ROOT_PATH . substr($path,6); default: $base = substr( $path, 0, $n = strrpos( $path, '/' ) ); $defname = substr( $path, $n+1 ); return $base . '/language/{lcid}/' . $defname . '.php'; break; } return ''; } /** * Load a language strings file * @param string $file File to be loaded * @param string $lang Language to load (defaults to $this->language) * @param object $me Current component (for relative xo-lib: paths) * @return string Path to the file that was included (or false) */ function loadStrings( $file, $lang = '', $me = null ) { $defname = $this->convertXoopsPath( $file, $me ); if ( !empty($defname) ) { if ( !include_once( $path = $this->makeFilepath( $defname, $lang ) ) ) { trigger_error( "Cannot load $file language file", E_USER_WARNING ); } return $path; } return false; } } ?> |
|
From: Skalpa K. <sk...@us...> - 2004-07-31 02:11:56
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/coca/lang.coca In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7347/lang.coca Log Message: Directory /cvsroot/xoops/xoops2/private/lib/xoops2/coca/lang.coca added to the repository --> Using per-directory sticky tag `xoops2_1_0-branch' |
|
From: Skalpa K. <sk...@us...> - 2004-07-30 22:35:33
|
Update of /cvsroot/xoops/xoops2/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9966/include Modified Files: Tag: xoops2_1_0-branch common.php Log Message: Moved database instanciation to /etc/rc_core Index: common.php =================================================================== RCS file: /cvsroot/xoops/xoops2/include/common.php,v retrieving revision 1.54.4.5 retrieving revision 1.54.4.6 diff -C2 -d -r1.54.4.5 -r1.54.4.6 *** common.php 30 Jul 2004 04:32:18 -0000 1.54.4.5 --- common.php 30 Jul 2004 22:35:24 -0000 1.54.4.6 *************** *** 58,65 **** define( 'XOOPS_CACHE_PATH', XOOPS_ROOT_PATH . '/cache' ); require_once XOOPS_LIB_PATH . '/xoops2/coca/kernel/kernel.php'; // Initialize xoops kernel // default mode set to debug for dev purposes, must be switched to 0 for releases ! $GLOBALS[XOOPS] =& new Xoops2Kernel( array( 'runMode' => defined('XOOPS_RUN_MODE') ? XOOPS_RUN_MODE : XOOPS_RUN_DEBUG, --- 58,72 ---- define( 'XOOPS_CACHE_PATH', XOOPS_ROOT_PATH . '/cache' ); + // ############## Include common functions file ############## + include_once XOOPS_ROOT_PATH.'/include/functions.php'; + require_once XOOPS_ROOT_PATH.'/kernel/object.php'; + require_once XOOPS_ROOT_PATH.'/class/criteria.php'; + include_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php"; + include_once XOOPS_ROOT_PATH."/include/version.php"; + require_once XOOPS_LIB_PATH . '/xoops2/coca/kernel/kernel.php'; // Initialize xoops kernel // default mode set to debug for dev purposes, must be switched to 0 for releases ! new Xoops2Kernel( array( 'runMode' => defined('XOOPS_RUN_MODE') ? XOOPS_RUN_MODE : XOOPS_RUN_DEBUG, *************** *** 69,99 **** ); // ---------------------------------------------------------------------------------------------- // @todo: all the following should be moved to /etc/rc_xxx.php and classes, line after line ;-) ! $GLOBALS['xoopsLogger'] =& $GLOBALS[XOOPS]->services['xoops.arch.logger']; ! ! if (!defined('XOOPS_XMLRPC')) { ! define('XOOPS_DB_CHKREF', 1); ! } else { ! define('XOOPS_DB_CHKREF', 0); ! } ! ! // ############## Include common functions file ############## ! include_once XOOPS_ROOT_PATH.'/include/functions.php'; ! ! // #################### Connect to DB ################## ! require_once XOOPS_ROOT_PATH.'/class/database/databasefactory.php'; ! if ($_SERVER['REQUEST_METHOD'] != 'POST' || !xoops_refcheck(XOOPS_DB_CHKREF)) { ! define('XOOPS_DB_PROXY', 1); ! } ! $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection(); ! ! // ################# Include required files ############## ! require_once XOOPS_ROOT_PATH.'/kernel/object.php'; ! require_once XOOPS_ROOT_PATH.'/class/criteria.php'; ! ! // #################### Include text sanitizer ################## ! include_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php"; // ################# Load Config Settings ############## --- 76,85 ---- ); + global $xoops2; // ---------------------------------------------------------------------------------------------- // @todo: all the following should be moved to /etc/rc_xxx.php and classes, line after line ;-) ! $GLOBALS['xoopsLogger'] =& $xoops2->services['xoops.arch.logger']; ! $GLOBALS['xoopsDB'] =& $xoops2->db; // ################# Load Config Settings ############## *************** *** 112,118 **** unset($xoopsConfig['badips']); - // ################# Include version info file ############## - include_once XOOPS_ROOT_PATH."/include/version.php"; - // for older versions...will be DEPRECATED! $xoopsConfig['xoops_url'] = XOOPS_URL; --- 98,101 ---- |
|
From: Skalpa K. <sk...@us...> - 2004-07-30 22:33:59
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/coca/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9747/private/lib/xoops2/coca/kernel Modified Files: Tag: xoops2_1_0-branch kernel.php Log Message: Added $GLOBALS['xoops2'] assignment to the constructor to make the global variable available to objects instanciated during execution of /etc/rc Index: kernel.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/lib/xoops2/coca/kernel/kernel.php,v retrieving revision 1.3.4.5 retrieving revision 1.3.4.6 diff -C2 -d -r1.3.4.5 -r1.3.4.6 *** kernel.php 29 Jul 2004 19:34:44 -0000 1.3.4.5 --- kernel.php 30 Jul 2004 22:33:50 -0000 1.3.4.6 *************** *** 186,189 **** --- 186,190 ---- parent::init( $options ); + $GLOBALS['xoops2'] =& $this; if ( !empty( $this->instanceName ) ) { $this->instancePath = $this->instanceName . '/'; |
|
From: Skalpa K. <sk...@us...> - 2004-07-30 22:32:01
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/arch/errorhandler.coca In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9423/private/lib/xoops2/arch/errorhandler.coca Modified Files: Tag: xoops2_1_0-branch errorhandler.php Log Message: Updated the shutdown method to deal with php output buffering auto-cleaning ( php automatically calls ob_end_flush() before it calls any register_shutdown_function() function ) Index: errorhandler.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/lib/xoops2/arch/errorhandler.coca/Attic/errorhandler.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** errorhandler.php 29 Jul 2004 19:38:28 -0000 1.1.2.1 --- errorhandler.php 30 Jul 2004 22:31:52 -0000 1.1.2.2 *************** *** 65,72 **** function shutdown() { ! $output = ob_get_contents(); ! ob_end_clean(); $errors = $this->activated ? $this->renderErrors() : ''; ! echo str_replace( '<!--XOOPS_DEBUG-->', $errors, $output ); } --- 65,79 ---- function shutdown() { ! if ( false === ( $output = ob_get_contents() ) ) { ! $output = ''; ! } else { ! ob_end_clean(); ! } $errors = $this->activated ? $this->renderErrors() : ''; ! if ( strpos( $output, '<!--XOOPS_DEBUG_ERRORS-->' ) !== false ) { ! echo str_replace( '<!--XOOPS_DEBUG_ERRORS-->', $errors, $output ); ! } else { ! echo $output . $errors; ! } } *************** *** 102,106 **** function handleError($errNo, $errStr, $errFile, $errLine) { if ( $this->activated ) { ! $errFile = str_replace( XOOPS_ROOT_PATH, '/path/to/xoops', str_replace( DIRECTORY_SEPARATOR, '/', $errFile ) ); if ( ($errNo & error_reporting()) == 0 ) { return; --- 109,113 ---- function handleError($errNo, $errStr, $errFile, $errLine) { if ( $this->activated ) { ! $errFile = str_replace( XOOPS_ROOT_PATH . '/', '', str_replace( DIRECTORY_SEPARATOR, '/', $errFile ) ); if ( ($errNo & error_reporting()) == 0 ) { return; |
|
From: Skalpa K. <sk...@us...> - 2004-07-30 22:29:02
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8958/private/lib/xoops2/db Added Files: Tag: xoops2_1_0-branch db.php mysql.php Log Message: Added xoops.db and xoops.db.mysql from xoops 2.0.x classes. Straight port, just updated logger related calls. --- NEW FILE: mysql.php --- <?php // $Id: mysql.php,v 1.1.2.1 2004/07/30 22:28:53 skalpa Exp $ /** * connection to a mysql database * * @abstract * * @author Kazumi Ono <on...@xo...> * @copyright copyright (c) 2000-2003 XOOPS.org * * @package xoops.db * @subpackage mysql */ class XoopsDbMysql extends XoopsDb { var $pconnect = XOOPS_DB_PCONNECT; /** * Database connection * @var resource */ var $conn; /** * Instanciate a xoops.db.mysql object */ function &create( $options = array() ) { if ( $_SERVER['REQUEST_METHOD'] != 'POST' || !xoops_refcheck( !defined(XOOPS_XMLRPC)?1:0 ) ) { $className = 'XoopsDbMysqlProxy'; } else { $className = 'XoopsDbMysqlSafe'; } return new $className( $options ); } /** * connect to the database * * @param bool $selectdb select the database now? * @return bool successful? */ function connect( $selectdb = true ) { $host = $this->host . ( $this->port ? ':' . $this->port : '' ); if ( $this->pconnect ) { $this->conn = @mysql_pconnect( $host, $this->user, $this->password ); } else { $this->conn = @mysql_connect( $host, $this->user, $this->password ); } if (!$this->conn) { if ( isset($this->logger) ) { $this->logger->addQuery('', $this->error(), $this->errno()); } trigger_error( "Cannot connect to database", E_USER_ERROR ); return false; } if( $selectdb ){ if ( !mysql_select_db($this->database) ) { if ( isset($this->logger) ) { $this->logger->addQuery( '', $this->error(), $this->errno() ); } trigger_error( "Cannot select database {$this->database}", E_USER_ERROR ); return false; } } return true; } /** * generate an ID for a new row * * This is for compatibility only. Will always return 0, because MySQL supports * autoincrement for primary keys. * * @param string $sequence name of the sequence from which to get the next ID * @return int always 0, because mysql has support for autoincrement */ function genId($sequence) { return 0; // will use auto_increment } /** * Get a result row as an enumerated array * * @param resource $result * @return array */ function fetchRow($result) { return @mysql_fetch_row($result); } /** * Fetch a result row as an associative array * * @return array */ function fetchArray($result) { return @mysql_fetch_assoc( $result ); } /** * Fetch a result row as an associative array * * @return array */ function fetchBoth($result) { return @mysql_fetch_array( $result, MYSQL_BOTH ); } /** * Get the ID generated from the previous INSERT operation * * @return int */ function getInsertId() { return mysql_insert_id($this->conn); } /** * Get number of rows in result * * @param resource query result * @return int */ function getRowsNum($result) { return @mysql_num_rows($result); } /** * Get number of affected rows * * @return int */ function getAffectedRows() { return mysql_affected_rows($this->conn); } /** * Close MySQL connection * */ function close() { mysql_close($this->conn); } /** * will free all memory associated with the result identifier result. * * @param resource query result * @return bool TRUE on success or FALSE on failure. */ function freeRecordSet($result) { return mysql_free_result($result); } /** * Returns the text of the error message from previous MySQL operation * * @return bool Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred. */ function error() { return @mysql_error(); } /** * Returns the numerical value of the error message from previous MySQL operation * * @return int Returns the error number from the last MySQL function, or 0 (zero) if no error occurred. */ function errno() { return @mysql_errno(); } /** * Returns escaped string text with single quotes around it to be safely stored in database * * @param string $str unescaped string text * @return string escaped string text with single quotes around */ function quoteString($str) { $str = "'".str_replace('\\"', '"', addslashes($str))."'"; return $str; } /** * perform a query on the database * * @param string $sql a valid MySQL query * @param int $limit number of records to return * @param int $start offset of first record to return * @return resource query result or FALSE if successful * or TRUE if successful and no result */ function &queryF($sql, $limit=0, $start=0) { if ( !empty($limit) ) { if (empty($start)) { $start = 0; } $sql = $sql. ' LIMIT '.(int)$start.', '.(int)$limit; } if ( false === ( $result = mysql_query($sql, $this->conn) ) ) { if ( isset($this->logger) ) { $this->logger->addQuery($sql, $this->error(), $this->errno()); } return false; } if ( isset($this->logger) ) { $this->logger->addQuery($sql); } return $result; } /** * perform a query * * This method is empty and does nothing! It should therefore only be * used if nothing is exactly what you want done! ;-) * * @param string $sql a valid MySQL query * @param int $limit number of records to return * @param int $start offset of first record to return * * @abstract */ function &query($sql, $limit=0, $start=0) { } /** * perform queries from SQL dump file in a batch * * @param string $file file path to an SQL dump file * * @return bool FALSE if failed reading SQL file or TRUE if the file has been read and queries executed */ function queryFromFile($file){ if (false !== ($fp = fopen($file, 'r'))) { include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php'; $sql_queries = trim(fread($fp, filesize($file))); SqlUtility::splitMySqlFile($pieces, $sql_queries); foreach ($pieces as $query) { // [0] contains the prefixed query // [4] contains unprefixed table name $prefixed_query = SqlUtility::prefixQuery(trim($query), $this->prefix()); if ($prefixed_query != false) { $this->query($prefixed_query[0]); } } return true; } return false; } } /** * Safe Connection to a MySQL database. * * * @author Kazumi Ono <on...@xo...> * @copyright copyright (c) 2000-2003 XOOPS.org * * @package kernel * @subpackage database */ class XoopsDbMysqlSafe extends XoopsDbMysql { /** * perform a query on the database * * @param string $sql a valid MySQL query * @param int $limit number of records to return * @param int $start offset of first record to return * @return resource query result or FALSE if successful * or TRUE if successful and no result */ function &query($sql, $limit=0, $start=0) { return $this->queryF($sql, $limit, $start); } } /** * Read-Only connection to a MySQL database. * * This class allows only SELECT queries to be performed through its * {@link query()} method for security reasons. * * * @author Kazumi Ono <on...@xo...> * @copyright copyright (c) 2000-2003 XOOPS.org * * @package kernel * @subpackage database */ class XoopsDbMysqlProxy extends XoopsDbMysql { /** * perform a query on the database * * this method allows only SELECT queries for safety. * * @param string $sql a valid MySQL query * @param int $limit number of records to return * @param int $start offset of first record to return * @return resource query result or FALSE if unsuccessful */ function &query($sql, $limit=0, $start=0) { $sql = ltrim($sql); if (strtolower(substr($sql, 0, 6)) == 'select') { //if (preg_match("/^SELECT.*/i", $sql)) { return $this->queryF($sql, $limit, $start); } if ( isset($this->logger) ) { $this->logger->addQuery($sql, 'Action not allowed', 0); } return false; } } ?> --- NEW FILE: db.php --- <?php // $Id: db.php,v 1.1.2.1 2004/07/30 22:28:53 skalpa Exp $ /** * xoops.db service * * @copyright copyright (c) 2000-2003 XOOPS.org * * @package kernel * @subpackage database */ class XoopsDb extends XoopsCocaComponent { var $cocaId = 'xoops.db'; /** * Type of database * @var string */ var $dbtype = ''; /** * Connection related variables */ var $user = XOOPS_DB_USER; var $password = XOOPS_DB_PASS; var $host = XOOPS_DB_HOST; var $port = 0; var $database = XOOPS_DB_NAME; /** * Should we connect on creation ? * @var boolean */ var $autoConnect = true; /** * Prefix for tables in the database * @var string */ var $prefix = XOOPS_DB_PREFIX; /** * reference to a {@link XoopsLogger} object * @see XoopsLogger * @var object XoopsLogger */ var $logger = null; /** * Instanciate a xoops.db service */ function &create( $cid, $options = array() ) { if ( !isset($options['dbtype']) ) { $options['dbtype'] = 'mysql'; } if ( ! $db =& $GLOBALS[XOOPS]->create( "xoops.db.{$options['dbtype']}", $options ) ) { return false; } return $db; } function init( $options = array() ) { if ( parent::init($options) ) { if ( isset( $GLOBALS[XOOPS]->services['xoops.arch.logger'] ) ) { $this->logger =& $GLOBALS[XOOPS]->services['xoops.arch.logger']; } if ( !$this->autoConnect || $this->connect() ) { return true; } trigger_error("Unable to connect to database", E_USER_ERROR); } return false; } /** * attach the prefix.'_' to a given tablename * * if tablename is empty, only prefix will be returned * * @param string $tablename tablename * @return string prefixed tablename, just prefix if tablename is empty */ function prefix( $table = '' ) { return $this->prefix . ( empty($table) ? '' : '_' . $table ); } } /** * Xoops 2.0.x backward compatibility * * @deprecated */ class XoopsDatabase extends XoopsDb { } class Database { function &getInstance() { return $GLOBALS[XOOPS]->create( 'xoops.db' ); } } ?> |
|
From: Skalpa K. <sk...@us...> - 2004-07-30 22:28:30
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8848/db Log Message: Directory /cvsroot/xoops/xoops2/private/lib/xoops2/db added to the repository --> Using per-directory sticky tag `xoops2_1_0-branch' |
|
From: Skalpa K. <sk...@us...> - 2004-07-30 22:28:07
|
Update of /cvsroot/xoops/xoops2/private/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8739/private/etc Modified Files: Tag: xoops2_1_0-branch rc_core.php services_registry.php Log Message: Added xoops.db and xoops.db.mysql from xoops 2.0.x classes. Straight port, just updated logger related calls. Index: rc_core.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/etc/rc_core.php,v retrieving revision 1.2.8.3 retrieving revision 1.2.8.4 diff -C2 -d -r1.2.8.3 -r1.2.8.4 *** rc_core.php 30 Jul 2004 04:48:33 -0000 1.2.8.3 --- rc_core.php 30 Jul 2004 22:27:55 -0000 1.2.8.4 *************** *** 16,20 **** $logger->startTime(); ! ?> \ No newline at end of file --- 16,21 ---- $logger->startTime(); ! // @todo: we shouldn't have to do this as early as this ! $this->db =& $this->create( 'xoops.db' ); ?> \ No newline at end of file Index: services_registry.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/etc/services_registry.php,v retrieving revision 1.3.4.5 retrieving revision 1.3.4.6 diff -C2 -d -r1.3.4.5 -r1.3.4.6 *** services_registry.php 30 Jul 2004 04:48:33 -0000 1.3.4.5 --- services_registry.php 30 Jul 2004 22:27:55 -0000 1.3.4.6 *************** *** 31,34 **** --- 31,48 ---- ); + $include['xoops.db'] = array( + 'cocaIdentifier' => 'xoops.db', + 'className' => 'XoopsDb', + 'classPath' => XOOPS_LIB_PATH . '/xoops2/db/db.php', + 'singleton' => true, + ); + + $include['xoops.db.mysql'] = array( + 'cocaIdentifier' => 'xoops.db.mysql', + 'className' => 'XoopsDbMysql', + 'classPath' => XOOPS_LIB_PATH . '/xoops2/db/mysql.php', + 'singleton' => false, + ); + $include['xoops.html.element'] = array( 'cocaIdentifier' => 'xoops.html.element', |
|
From: Jan P. <mi...@us...> - 2004-07-30 18:30:25
|
Update of /cvsroot/xoops/xoops2/class/xoopsform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32169/class/xoopsform Modified Files: Tag: xoops2071-branch formelement.php Log Message: Fixed php notice of _extra not being set Index: formelement.php =================================================================== RCS file: /cvsroot/xoops/xoops2/class/xoopsform/formelement.php,v retrieving revision 1.10 retrieving revision 1.10.18.1 diff -C2 -d -r1.10 -r1.10.18.1 *** formelement.php 23 Oct 2003 07:08:00 -0000 1.10 --- formelement.php 30 Jul 2004 18:30:16 -0000 1.10.18.1 *************** *** 88,92 **** * @var string */ ! var $_extra; /** --- 88,92 ---- * @var string */ ! var $_extra = ""; /** |
|
From: Skalpa K. <sk...@us...> - 2004-07-30 04:48:44
|
Update of /cvsroot/xoops/xoops2/private/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30914/private/etc Modified Files: Tag: xoops2_1_0-branch rc_core.php services_registry.php Log Message: Added xoops.arch.logger component from the XoopsLogger class. Index: rc_core.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/etc/rc_core.php,v retrieving revision 1.2.8.2 retrieving revision 1.2.8.3 diff -C2 -d -r1.2.8.2 -r1.2.8.3 *** rc_core.php 29 Jul 2004 19:32:10 -0000 1.2.8.2 --- rc_core.php 30 Jul 2004 04:48:33 -0000 1.2.8.3 *************** *** 13,17 **** } ! --- 13,18 ---- } ! $logger =& $this->create( 'xoops.arch.logger' ); ! $logger->startTime(); Index: services_registry.php =================================================================== RCS file: /cvsroot/xoops/xoops2/private/etc/services_registry.php,v retrieving revision 1.3.4.4 retrieving revision 1.3.4.5 diff -C2 -d -r1.3.4.4 -r1.3.4.5 *** services_registry.php 29 Jul 2004 19:40:16 -0000 1.3.4.4 --- services_registry.php 30 Jul 2004 04:48:33 -0000 1.3.4.5 *************** *** 23,26 **** --- 23,34 ---- ); + $include['xoops.arch.logger'] = array( + 'cocaIdentifier' => 'xoops.arch.logger', + 'className' => 'XoopsLogger', + 'classPath' => XOOPS_LIB_PATH . '/xoops2/arch/logger.coca/logger.php', + 'singleton' => true, + 'mustShutdown' => true, + ); + $include['xoops.html.element'] = array( 'cocaIdentifier' => 'xoops.html.element', |
|
From: Skalpa K. <sk...@us...> - 2004-07-30 04:47:49
|
Update of /cvsroot/xoops/xoops2/private/lib/xoops2/arch/logger.coca In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30805/private/lib/xoops2/arch/logger.coca Added Files: Tag: xoops2_1_0-branch logger.php Log Message: Added xoops.arch.logger component from the XoopsLogger class. --- NEW FILE: logger.php --- <?php // $Id: logger.php,v 1.1.2.1 2004/07/30 04:47:39 skalpa Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // // <http://www.xoops.org/> // // ------------------------------------------------------------------------ // // 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. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // 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 // // ------------------------------------------------------------------------ // // Author: Kazumi Ono (AKA onokazu) // // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // /** * Collects information for a page request * * <b>Singelton:</b> There can be only one instance of this class and it must * be accessed through the {@link instance()} method! * * records information about database queries, blocks, and execution time * and can display it as HTML * * @author Kazumi Ono <on...@xo...> * @copyright copyright (c) 2000-2003 XOOPS.org * * @package kernel */ class XoopsLogger extends XoopsCocaComponent { var $cocaId = 'xoops.arch.logger'; /**#@+ * @var array */ var $queries = array(); var $blocks = array(); var $extra = array(); var $logstart = array(); var $logend = array(); /**#@-*/ function init( $options = array() ) { parent::init( $options ); ob_start(); return true; } function shutdown() { if ( false === ( $output = ob_get_contents() ) ) { $output = ''; } else { ob_end_clean(); } if ( strpos( $output, '<!--XOOPS_DEBUG_QUERIES-->' ) !== false ) { $output = str_replace( '<!--XOOPS_DEBUG_QUERIES-->', $this->dumpQueries(), $output ); } if ( strpos( $output, '<!--XOOPS_DEBUG_BLOCKS-->' ) !== false ) { $output = str_replace( '<!--XOOPS_DEBUG_BLOCKS-->', $this->dumpBlocks(), $output ); } if ( strpos( $output, '<!--XOOPS_DEBUG_TIMERS-->' ) !== false ) { $output = str_replace( '<!--XOOPS_DEBUG_TIMERS-->', $this->dumpTimers(), $output ); } echo $output; } function &instance() { return $GLOBALS[XOOPS]->services['xoops.arch.logger']; } /** * start a timer * * @param string $name name of the timer * */ function startTime($name = 'XOOPS') { $this->logstart[$name] = explode(' ', microtime()); } /** * stop a timer * * @param string $name name of the timer */ function stopTime($name = 'XOOPS') { $this->logend[$name] = explode(' ', microtime()); } /** * log a database query * * @param string $sql SQL string * @param string $error error message (if any) * @param int $errno error number (if any) */ function addQuery($sql, $error=null, $errno=null) { $this->queries[] = array('sql' => $sql, 'error' => $error, 'errno' => $errno); } /** * log display of a block * * @param string $name name of the block * @param bool $cached was the block cached? * @param int $cachetime cachetime of the block */ function addBlock($name, $cached = false, $cachetime = 0) { $this->blocks[] = array('name' => $name, 'cached' => $cached, 'cachetime' => $cachetime); } /** * log extra information * * @param string $name name for the entry * @param int $cachetime cachetime for the entry */ function addExtra($name, $cachetime = 0) { $this->extra[] = array('name' => $name, 'cachetime' => $cachetime); } /** * get the logged queries in a HTML table * * @return string HTML table with queries */ function dumpQueries() { $ret = "Total: " . count($this->queries) . " queries.<br />"; foreach ($this->queries as $q) { if (isset($q['error'])) { $ret .= '<div class="query failed">' . htmlentities( $q['sql'] ) . "<br /><b>Error number:</b>{$q['errno']}<br /><b>Error message:</b>{$q['error']}</div>"; } else { $ret .= '<div class="query">' . htmlentities( $q['sql'] ) . '</div>'; } } return $ret; } /** * get the logged blocks in a HTML table * * @return string HTML table with blocks */ function dumpBlocks() { $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th colspan="2">Blocks</th></tr>'; $class = 'even'; foreach ($this->blocks as $b) { if ($b['cached']) { $ret .= '<tr><td class="'.$class.'"><b>'.$b['name'].':</b> Cached (regenerates every '.$b['cachetime'].' seconds)</td></tr>'; } else { $ret .= '<tr><td class="'.$class.'"><b>'.$b['name'].':</b> No Cache</td></tr>'; } $class = ($class == 'odd') ? 'even' : 'odd'; } $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->blocks).'</span> blocks</td></tr></table><br />'; return $ret; } /** * get all timers information in a HTML table * * @return string HTML table with extra information */ function dumpTimers() { $ret = '<table cellspacing="0"><thead><tr><th scope="col">Timer</th>' . '<th scope="col">Start</th><th scope="col">Stop</th><th scope="col">Delta</th></tr></thead>'; if ( isset( $this->logstart['XOOPS'] ) ) { $ret .= $this->dumpTimer('XOOPS'); } foreach ($this->logstart as $k=>$v) { if ($k!='XOOPS') { $ret .= $this->dumpTimer($k); } } $ret .= '</table>'; return $ret; } function dumpTimer( $name ) { $start = $this->logstart[$name]; $stop = isset($this->logend[$name])?$this->logend[$name]:explode(' ',microtime()); $start = (float)$start[0] + (float)$start[1]; $stop = (float)$stop[0] + (float)$stop[1]; return sprintf( '<tr><th scope="row">%s</th><td>%.3f</td><td>%.3f</td><td>%.3f</td></tr>', $name, $start, $stop, $stop-$start ); } /** * get extra information in a HTML table * * @return string HTML table with extra information */ function dumpExtra() { $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th colspan="2">Extra</th></tr>'; $class = 'even'; foreach ($this->extra as $ex) { $ret .= '<tr><td class="'.$class.'"><b>'.$ex['name'].':</b> Cached (regenerates every '.$ex['cachetime'].' seconds)</td></tr>'; $class = ($class == 'odd') ? 'even' : 'odd'; } $ret .= '</table><br />'; return $ret; } /** * get all logged information formatted in HTML tables * * @return string HTML output */ function dumpAll() { $ret = $this->dumpQueries(); $ret .= $this->dumpBlocks(); if (count($this->logstart) > 0) { $ret .= '<table class="outer" width="100%" cellspacing="1"><tr><th>Execution Time</th></tr>'; $class = 'even'; foreach ($this->logstart as $k => $v) { $ret .= '<tr><td class="'.$class.'"><b>'.$k.'</b> took <span style="color:#ff0000;">'.$this->dumpTime($k).'</span> seconds to load.</td></tr>'; $class = ($class == 'odd') ? 'even' : 'odd'; } $ret .= '</table><br />'; } $ret .= $this->dumpExtra(); return $ret; } } ?> |
|
From: Skalpa K. <sk...@us...> - 2004-07-30 04:34:18
|
Update of /cvsroot/xoops/xoops2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29345 Modified Files: Tag: xoops2_1_0-branch footer.php header.php Log Message: Added xoops.arch.logger component from the XoopsLogger class. Index: header.php =================================================================== RCS file: /cvsroot/xoops/xoops2/header.php,v retrieving revision 1.40 retrieving revision 1.40.10.1 diff -C2 -d -r1.40 -r1.40.10.1 *** header.php 13 Jun 2004 05:47:31 -0000 1.40 --- header.php 30 Jul 2004 04:34:09 -0000 1.40.10.1 *************** *** 243,248 **** // need this also $xoopsTheme['thename'] = $xoopsConfig['theme_set']; - ob_start(); } } ! ?> --- 243,250 ---- // need this also $xoopsTheme['thename'] = $xoopsConfig['theme_set']; } } ! ! ob_start(); ! ! ?> \ No newline at end of file Index: footer.php =================================================================== RCS file: /cvsroot/xoops/xoops2/footer.php,v retrieving revision 1.13 retrieving revision 1.13.24.1 diff -C2 -d -r1.13 -r1.13.24.1 *** footer.php 28 Sep 2003 01:06:44 -0000 1.13 --- footer.php 30 Jul 2004 04:34:09 -0000 1.13.24.1 *************** *** 26,32 **** // ------------------------------------------------------------------------ // if ( !defined("XOOPS_FOOTER_INCLUDED") ) { define("XOOPS_FOOTER_INCLUDED",1); ! $xoopsLogger->stopTime(); if ($xoopsOption['theme_use_smarty'] == 0) { // the old way --- 26,37 ---- // ------------------------------------------------------------------------ // + global $xoops2; + + $xoopsContent = ob_get_contents(); + ob_end_clean(); + if ( !defined("XOOPS_FOOTER_INCLUDED") ) { define("XOOPS_FOOTER_INCLUDED",1); ! if ($xoopsOption['theme_use_smarty'] == 0) { // the old way *************** *** 52,61 **** } else { if (isset($xoopsCachedTemplate)) { ! $xoopsTpl->assign('dummy_content', ob_get_contents()); $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch($xoopsCachedTemplate, $xoopsCachedTemplateId)); } else { ! $xoopsTpl->assign('xoops_contents', ob_get_contents()); } - ob_end_clean(); } if (!headers_sent()) { --- 57,65 ---- } else { if (isset($xoopsCachedTemplate)) { ! $xoopsTpl->assign('dummy_content', $xoopsContent); $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch($xoopsCachedTemplate, $xoopsCachedTemplateId)); } else { ! $xoopsTpl->assign('xoops_contents', $xoopsContent); } } if (!headers_sent()) { *************** *** 69,81 **** $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html'); } ! if ($xoopsConfig['debug_mode'] == 2 && $xoopsUserIsAdmin) { ! $dummyfile = 'dummy_'.time().'.html'; ! $fp = fopen(XOOPS_CACHE_PATH.'/'.$dummyfile, 'w'); ! fwrite($fp, $xoopsLogger->dumpAll()); ! fclose($fp); ! echo '<script language=javascript> ! debug_window = openWithSelfMain("'.XOOPS_URL.'/misc.php?action=showpopups&type=debug&file='.$dummyfile.'", "popup", 680, 450); ! </script>'; } } ! ?> --- 73,80 ---- $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html'); } ! if ( isset( $xoops2->services['xoops.arch.logger'] ) ) { ! $xoops2->services['xoops.arch.logger']->stopTime(); } + $GLOBALS[XOOPS]->shutdown(); } ! ?> \ No newline at end of file |
|
From: Skalpa K. <sk...@us...> - 2004-07-30 04:32:27
|
Update of /cvsroot/xoops/xoops2/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29015/include Modified Files: Tag: xoops2_1_0-branch common.php Log Message: Added xoops.arch.logger component from the XoopsLogger class. Index: common.php =================================================================== RCS file: /cvsroot/xoops/xoops2/include/common.php,v retrieving revision 1.54.4.4 retrieving revision 1.54.4.5 diff -C2 -d -r1.54.4.4 -r1.54.4.5 *** common.php 29 Jul 2004 19:44:05 -0000 1.54.4.4 --- common.php 30 Jul 2004 04:32:18 -0000 1.54.4.5 *************** *** 72,78 **** // @todo: all the following should be moved to /etc/rc_xxx.php and classes, line after line ;-) ! include_once XOOPS_ROOT_PATH.'/class/logger.php'; ! $xoopsLogger =& XoopsLogger::instance(); ! $xoopsLogger->startTime(); if (!defined('XOOPS_XMLRPC')) { define('XOOPS_DB_CHKREF', 1); --- 72,77 ---- // @todo: all the following should be moved to /etc/rc_xxx.php and classes, line after line ;-) ! $GLOBALS['xoopsLogger'] =& $GLOBALS[XOOPS]->services['xoops.arch.logger']; ! if (!defined('XOOPS_XMLRPC')) { define('XOOPS_DB_CHKREF', 1); |