From: Yves K. <yku...@us...> - 2004-11-05 22:41:41
|
Update of /cvsroot/phpwebsite-comm/modules/xwysiwyg/js In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22311/modules/xwysiwyg/js Modified Files: wysiwyg.php Log Message: Moved code to the xwysiwyg-class Some cosmetics Index: wysiwyg.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/xwysiwyg/js/wysiwyg.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wysiwyg.php 31 Oct 2004 19:51:03 -0000 1.5 --- wysiwyg.php 5 Nov 2004 22:40:30 -0000 1.6 *************** *** 1,37 **** <?php // start xwysiwyg code - $xwysiwyg = FALSE; - $xw_button = FALSE; $mods = $GLOBALS["core"]->listModules(TRUE); if (in_array ("xwysiwyg", $mods)) { - require_once(PHPWS_SOURCE_DIR.'mod/xwysiwyg/class/phpSniff.class.php');//include the browser checking code require_once(PHPWS_SOURCE_DIR.'mod/xwysiwyg/class/xwysiwyg.php');//include the xwysiwyg code ! //First thing, check browser version ! //Since I haven't tested, you'll have to add a better list of supported browsers ! $client =& new phpSniff($GET_VARS['UA']); ! //Now we want an inclusion list of browsers ! //These browsers are supposed to work, Galleon or aol versions ! $supported = FALSE; ! $browsers = array("fb.6+", "NS7+","ie5.5+","mz1.3+","op7+","kq3+","ga","aol","ca"); ! foreach($browsers as $search) { ! if($client->browser_is($search)) $supported = TRUE; ! } ! if($supported){ ! if(!isset($GLOBALS['xwysiwyg_settings'])) $settings = PHPWS_xwysiwyg::readConfig(); ! else $settings = $GLOBALS['xwysiwyg_settings']; ! if($settings['request_mode']) { ! $onRequest = TRUE; ! $xwysiwyg = TRUE; ! } else $xwysiwyg = PHPWS_xwysiwyg::isBox($section_name); ! if($_SESSION["OBJ_user"]->allow_access("xwysiwyg","settings")) $xw_button = TRUE; ! } } - if ($xwysiwyg) { $GLOBALS['xwysiwyg_areas'][] = $section_name; //write an array for the theme.php $GLOBALS['xwysiwyg']++; } ! // end xwysiwyg-code ! --- 1,17 ---- <?php // start xwysiwyg code $mods = $GLOBALS["core"]->listModules(TRUE); if (in_array ("xwysiwyg", $mods)) { require_once(PHPWS_SOURCE_DIR.'mod/xwysiwyg/class/xwysiwyg.php');//include the xwysiwyg code ! $answer = PHPWS_xwysiwyg::isSupported($section_name); ! $onRequest = $answer[onRequest]; ! $xwysiwyg = $answer[xwysiwyg]; ! $xw_button = $answer[xwButton]; } if ($xwysiwyg) { $GLOBALS['xwysiwyg_areas'][] = $section_name; //write an array for the theme.php $GLOBALS['xwysiwyg']++; } ! // end xwysiwyg code |