|
From: FlorinCB <ory...@us...> - 2008-11-06 00:39:26
|
Update of /cvsroot/mxbb/core/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2182 Modified Files: mx_functions_tools.php Log Message: some fixes Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** mx_functions_tools.php 31 Oct 2008 19:14:59 -0000 1.50 --- mx_functions_tools.php 6 Nov 2008 00:39:21 -0000 1.51 *************** *** 81,88 **** // Define censored word matches // Note: This is a workaraound for new Olympus style cache. ! // ! $censors = $mx_cache->obtain_word_list(); ! $this->orig_word = $censors['match']; ! $this->replacement_word = $censors['replace']; // --- 81,113 ---- // Define censored word matches // Note: This is a workaraound for new Olympus style cache. ! // ! static $censors; ! ! // We moved the word censor checks in here because we call this function quite often - and then only need to do the check once ! if (!isset($censors) || !is_array($censors)) ! { ! global $mx_user; ! ! // We check here in future if the user is having viewing censors disabled (and also allowed to do so). ! if (!$mx_user->optionget('viewcensors')) ! { ! $censors = array(); ! } ! else ! { ! $censors = $mx_cache->obtain_word_list(); ! } ! } ! ! if (sizeof($censors)) ! { ! $this->orig_word = $censors['match']; ! $this->replacement_word = $censors['replace']; ! } ! else ! { ! $this->orig_word = array(); ! $this->replacement_word = array(); ! } // *************** *** 110,114 **** // Highlight match color // ! $this->highlight_match_color = $theme['fontcolor3']; } --- 135,139 ---- // Highlight match color // ! $this->highlight_match_color = isset($theme['fontcolor3']) ? $theme['fontcolor3'] : 'FFFFFF'; } |