mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-14 09:58:16 +01:00
"get FCK spellchecker and filebrowser working with session-id in url"
This commit is contained in:
parent
00ba3606de
commit
a0f5ff9dd5
@ -112,7 +112,7 @@ class html
|
|||||||
if ($do_lang) $text = lang($text);
|
if ($do_lang) $text = lang($text);
|
||||||
|
|
||||||
$ttip = ' onmouseover="Tip(\''.str_replace(array("\n","\r","'",'"'),array('','',"\\'",'"'),$text).'\'';
|
$ttip = ' onmouseover="Tip(\''.str_replace(array("\n","\r","'",'"'),array('','',"\\'",'"'),$text).'\'';
|
||||||
|
|
||||||
$sticky = false;
|
$sticky = false;
|
||||||
if (is_array($options))
|
if (is_array($options))
|
||||||
{
|
{
|
||||||
@ -149,7 +149,7 @@ class html
|
|||||||
static function activate_links($content)
|
static function activate_links($content)
|
||||||
{
|
{
|
||||||
if (!$content || strlen($content) < 20) return $content; // performance
|
if (!$content || strlen($content) < 20) return $content; // performance
|
||||||
|
|
||||||
// Exclude everything which is already a link
|
// Exclude everything which is already a link
|
||||||
$NotAnchor = '(?<!"|href=|href\s=\s|href=\s|href\s=)';
|
$NotAnchor = '(?<!"|href=|href\s=\s|href=\s|href\s=)';
|
||||||
|
|
||||||
@ -318,7 +318,7 @@ class html
|
|||||||
$options .= ' size="'.abs($multiple).'"';
|
$options .= ' size="'.abs($multiple).'"';
|
||||||
}
|
}
|
||||||
// fix width for MSIE in/for selectboxes
|
// fix width for MSIE in/for selectboxes
|
||||||
if (self::$user_agent == 'msie')
|
if (self::$user_agent == 'msie')
|
||||||
{
|
{
|
||||||
if (stripos($options,'onfocus="') === false)
|
if (stripos($options,'onfocus="') === false)
|
||||||
{
|
{
|
||||||
@ -596,6 +596,11 @@ class html
|
|||||||
$oFCKeditor->Config['FlashBrowser'] = $oFCKeditor->Config['FlashUpload'] = false;
|
$oFCKeditor->Config['FlashBrowser'] = $oFCKeditor->Config['FlashUpload'] = false;
|
||||||
$oFCKeditor->Config['ImageBrowser'] = $oFCKeditor->Config['ImageUpload'] = 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
|
// 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.'/.'))
|
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
|
// 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']);
|
$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['ImageBrowser'] = true;
|
||||||
$oFCKeditor->Config['ImageUpload'] = is_writable($_SERVER['DOCUMENT_ROOT'].$_base_href);
|
$oFCKeditor->Config['ImageUpload'] = is_writable($_SERVER['DOCUMENT_ROOT'].$_base_href);
|
||||||
}
|
}
|
||||||
@ -621,7 +626,7 @@ class html
|
|||||||
{
|
{
|
||||||
$spell = '_spellcheck';
|
$spell = '_spellcheck';
|
||||||
$oFCKeditor->Config['SpellChecker'] = 'SpellerPages';
|
$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;
|
$oFCKeditor->Config['FirefoxSpellChecker'] = false;
|
||||||
}
|
}
|
||||||
// Now setting the user preferences
|
// Now setting the user preferences
|
||||||
|
Loading…
Reference in New Issue
Block a user