Allow users to disable the Xinha HTML editor
This commit is contained in:
committed by
Chris Morgan
parent
8e6b4fe2fd
commit
caf65e3869
@@ -628,6 +628,22 @@ function HtmlAreaLoaderScript($aTextareas)
|
||||
{
|
||||
static $outputIndex = 0;
|
||||
|
||||
/* Check if the user wants to display the HTML editor (always, for supported browsers or never) */
|
||||
switch($_SESSION['current']->getPref('htmleditor', 'for supported browsers'))
|
||||
{
|
||||
case 'never':
|
||||
return;
|
||||
case 'for supported browsers':
|
||||
if(strstr($_SERVER['HTTP_USER_AGENT'], 'Opera') ||
|
||||
strstr($_SERVER['HTTP_USER_AGENT'], 'Konqueror'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 'always':
|
||||
break;
|
||||
}
|
||||
|
||||
echo '
|
||||
<script type="text/javascript">';
|
||||
// You must set _editor_url to the URL (including trailing slash) where
|
||||
|
||||
@@ -22,3 +22,4 @@ INSERT INTO prefs_list VALUES (0, 'query:mode', 'view', 'view|edit', 'Default AP
|
||||
INSERT INTO prefs_list VALUES (0, 'query:hide_header', 'no', 'yes|no', 'Hide apidb header in query results');
|
||||
INSERT INTO prefs_list VALUES (0, 'query:hide_sidebar', 'no', 'yes|no', 'Hide apidb sidebar in query results');
|
||||
INSERT INTO prefs_list VALUES (0, 'send_email', 'yes', 'yes|no', 'Send email notifications');
|
||||
INSERT INTO prefs_list VALUES (0, 'htmleditor', 'for supported browsers', 'always|for supported browsers|never', 'Display a graphical HTML editor in certain text fields');
|
||||
|
||||
Reference in New Issue
Block a user