From: <var...@us...> - 2014-11-19 10:16:15
|
Revision: 9336 http://sourceforge.net/p/phpwiki/code/9336 Author: vargenau Date: 2014-11-19 10:16:06 +0000 (Wed, 19 Nov 2014) Log Message: ----------- Fix database backend test Modified Paths: -------------- trunk/lib/Request.php Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2014-11-18 17:32:01 UTC (rev 9335) +++ trunk/lib/Request.php 2014-11-19 10:16:06 UTC (rev 9336) @@ -838,8 +838,6 @@ */ function __construct($logfile, $do_sql = false) { - //global $request; // request not yet initialized! - $this->logfile = $logfile; if ($logfile and !is_writeable($logfile)) { trigger_error @@ -850,16 +848,13 @@ 'ACCESS_LOG') , E_USER_NOTICE); } - //$request->_accesslog =& $this; - //if (empty($request->_accesslog->entries)) register_shutdown_function("Request_AccessLogEntry_shutdown_function"); if ($do_sql) { - if (!$request->_dbi->isSQL()) { + global $DBParams; + if (!in_array($DBParams['dbtype'], array('SQL', 'ADODB', 'PDO'))) { trigger_error("Unsupported database backend for ACCESS_LOG_SQL. Need DATABASE_TYPE=SQL or ADODB or PDO."); } else { - global $DBParams; - //$this->_dbi =& $request->_dbi; $this->logtable = (!empty($DBParams['prefix']) ? $DBParams['prefix'] : '') . "accesslog"; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |