"get FCK spellchecker and filebrowser working with session-id in url"

This commit is contained in:
Ralf Becker 2010-04-13 15:12:09 +00:00
parent 00ba3606de
commit a0f5ff9dd5

View File

@ -112,7 +112,7 @@ class html
if ($do_lang) $text = lang($text);
$ttip = ' onmouseover="Tip(\''.str_replace(array("\n","\r","'",'"'),array('','',"\\'",'"'),$text).'\'';
$sticky = false;
if (is_array($options))
{
@ -149,7 +149,7 @@ class html
static function activate_links($content)
{
if (!$content || strlen($content) < 20) return $content; // performance
// Exclude everything which is already a link
$NotAnchor = '(?<!"|href=|href\s=\s|href=\s|href\s=)';
@ -318,7 +318,7 @@ class html
$options .= ' size="'.abs($multiple).'"';
}
// fix width for MSIE in/for selectboxes
if (self::$user_agent == 'msie')
if (self::$user_agent == 'msie')
{
if (stripos($options,'onfocus="') === false)
{
@ -596,6 +596,11 @@ class html
$oFCKeditor->Config['FlashBrowser'] = $oFCKeditor->Config['FlashUpload'] = false;
$oFCKeditor->Config['ImageBrowser'] = $oFCKeditor->Config['ImageUpload'] = false;
if (!$GLOBALS['egw_info']['server']['usecookies'])
{
$extra = egw_session::EGW_SESSION_NAME.'='.$GLOBALS['egw']->session->sessionid.
'&kp3='.$GLOBALS['egw']->session->kp3.'&domain='.$GLOBALS['egw']->session->account_domain;
}
// Activate the image browser+upload, if $_base_href exists and is browsable by the webserver
if ($_base_href && is_dir($_SERVER['DOCUMENT_ROOT'].$_base_href) && file_exists($_SERVER['DOCUMENT_ROOT'].$_base_href.'/.'))
{
@ -604,7 +609,7 @@ class html
// store the path and application in the session, to make sure it can't be called with arbitrary pathes
$GLOBALS['egw']->session->appsession($_base_href,'FCKeditor',$GLOBALS['egw_info']['flags']['currentapp']);
$oFCKeditor->Config['ImageBrowserURL'] = $oFCKeditor->BasePath.'editor/filemanager/browser/default/browser.html?ServerPath='.$_base_href.'&Type=Image&Connector='.$oFCKeditor->BasePath.'editor/filemanager/connectors/php/connector.php';
$oFCKeditor->Config['ImageBrowserURL'] = $oFCKeditor->BasePath.'editor/filemanager/browser/default/browser.html?ServerPath='.$_base_href.'&Type=Image&Connector='.$oFCKeditor->BasePath.'editor/filemanager/connectors/php/connector.php?'.$extra;
$oFCKeditor->Config['ImageBrowser'] = true;
$oFCKeditor->Config['ImageUpload'] = is_writable($_SERVER['DOCUMENT_ROOT'].$_base_href);
}
@ -621,7 +626,7 @@ class html
{
$spell = '_spellcheck';
$oFCKeditor->Config['SpellChecker'] = 'SpellerPages';
$oFCKeditor->Config['SpellerPagesServerScript'] = 'server-scripts/spellchecker.php?enabled=1';
$oFCKeditor->Config['SpellerPagesServerScript'] = 'server-scripts/spellchecker.php?'.$extra;
$oFCKeditor->Config['FirefoxSpellChecker'] = false;
}
// Now setting the user preferences