|
From: Jon O. <jon...@us...> - 2006-12-17 18:33:51
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv8218/includes Modified Files: mx_functions_core.php Log Message: phpBB Config cache - more flexible. Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** mx_functions_core.php 10 Dec 2006 15:40:18 -0000 1.37 --- mx_functions_core.php 17 Dec 2006 18:33:44 -0000 1.38 *************** *** 55,68 **** { /** ! * Get phpbb config data * * @access public * @return unknown */ ! function obtain_phpbb_config() { global $db; ! if ($config = $this->get('phpbb_config')) { return $config; --- 55,69 ---- { /** ! * Enter description here... * * @access public + * @param boolean $use_cache * @return unknown */ ! function obtain_phpbb_config($use_cache = true) { global $db; ! if (($config = $this->get('phpbb_config')) && $use_cache) { return $config; *************** *** 73,77 **** FROM " . CONFIG_TABLE; ! if( !($result = $db->sql_query($sql)) ) { mx_message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql); --- 74,78 ---- FROM " . CONFIG_TABLE; ! if( !($result = $db->sql_query($sql, 120)) ) { mx_message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql); *************** *** 83,87 **** } $db->sql_freeresult($result); ! $this->put('phpbb_config', $config); return ( $config ); --- 84,92 ---- } $db->sql_freeresult($result); ! ! if ($use_cache) ! { ! $this->put('phpbb_config', $config); ! } return ( $config ); |