Merge remote-tracking branch 'origin/master' into admin_message_et2

This commit is contained in:
Hadi Nategh 2018-10-29 15:15:35 +01:00
commit bd3a8c6fa7
2 changed files with 28 additions and 1 deletions

View File

@ -158,6 +158,25 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
this.tinymce = tinymce.init(settings);
},
/**
* set disabled
*
* @param {type} _value
* @returns {undefined}
*/
set_disabled: function(_value)
{
this._super.apply(this, arguments);
if (_value)
{
jQuery(this.tinymce_container).css('display', 'none');
}
else
{
jQuery(this.tinymce_container).css('display', 'flex');
}
},
/**
* Callback function runs when the filepicker in image dialog is clicked
*
@ -212,6 +231,8 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
this.editor.execCommand('fontName', true, egw.preference('rte_font', 'common'));
this.editor.execCommand('fontSize', true, egw.preference('rte_font_size', 'common')
+ egw.preference('rte_font_unit', 'common'));
if (!this.disabled) jQuery(this.editor.editorContainer).css('display', 'flex');
this.tinymce_container = this.editor.editorContainer;
},
/**
@ -262,6 +283,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
}
this.editor = null;
this.tinymce = null;
this.tinymce_container = null;
this.htmlNode.remove();
this.htmlNode = null;
this._super.apply(this, arguments);

View File

@ -757,7 +757,12 @@ class Db
if (($this->readonly || $this->log_updates) && !preg_match('/^\(?(SELECT|SET|SHOW)/i', $Query_String))
{
if ($this->log_updates) error_log($Query_String.': '.function_backtrace());
if ($this->readonly) return 0;
if ($this->readonly)
{
$this->Error = 'Database is readonly';
$this->Errno = -2;
return 0;
}
}
if ($num_rows > 0)
{