6
See this is what I did and XOOPS didn't restart any more :
/**
* Retreive an editor according to the module's option "form_options"
*/
/** Comment the old news_getWysiwygForm function
* function &news_getWysiwygForm($caption, $name, $value = '', $width = '100%', $height = '400px', $supplemental='')
* {
* $editor = false;
* $x22=false;
* $xv=str_replace('XOOPS ','',XOOPS_VERSION);
* if(substr($xv,2,1)=='2') {
* $x22=true;
* }
*
* $editor_configs=array();
* $editor_configs['name'] =$name;
* $editor_configs['value'] = $value;
* $editor_configs['rows'] = 35;
* $editor_configs['cols'] = 60;
* $editor_configs['width'] = '100%';
* $editor_configs['height'] = '400px';
*/
function &news_getWysiwygForm($caption, $name, $value = '', $rows = 35, $cols = 60, $supplemental='')
{
$editor_configs = array();
$editor_configs['name'] = $name;
$editor_configs['value'] = $value;
$editor_configs['rows'] = $rows ? $rows : 35;
$editor_configs['cols'] = $cols ? $cols : 60;
$editor_configs['width'] = "100%";
$editor_configs['height'] = "400px";
$editor = new XoopsFormEditor($caption, news_getmoduleoption('form_options'), $editor_configs);
return $editor;
}