mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-29 04:39:01 +02:00
Merge remote-tracking branch 'origin/3'
This commit is contained in:
commit
58409f64c0
@ -256,7 +256,7 @@ form.small .field input.text, form.small .field textarea, form.small .field sele
|
|||||||
.cms .ss-ui-button.ui-state-hover, .cms .ss-ui-button:hover { text-decoration: none; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3; -webkit-box-shadow: 0 0 5px #b3b3b3; box-shadow: 0 0 5px #b3b3b3; }
|
.cms .ss-ui-button.ui-state-hover, .cms .ss-ui-button:hover { text-decoration: none; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3; -webkit-box-shadow: 0 0 5px #b3b3b3; box-shadow: 0 0 5px #b3b3b3; }
|
||||||
.cms .ss-ui-button:active, .cms .ss-ui-button:focus, .cms .ss-ui-button.ui-state-active, .cms .ss-ui-button.ui-state-focus { border: 1px solid #b3b3b3; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3 inset; -webkit-box-shadow: 0 0 5px #b3b3b3 inset; box-shadow: 0 0 5px #b3b3b3 inset; }
|
.cms .ss-ui-button:active, .cms .ss-ui-button:focus, .cms .ss-ui-button.ui-state-active, .cms .ss-ui-button.ui-state-focus { border: 1px solid #b3b3b3; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3 inset; -webkit-box-shadow: 0 0 5px #b3b3b3 inset; box-shadow: 0 0 5px #b3b3b3 inset; }
|
||||||
.cms .ss-ui-button.ss-ui-action-minor span { padding-left: 0; padding-right: 0; }
|
.cms .ss-ui-button.ss-ui-action-minor span { padding-left: 0; padding-right: 0; }
|
||||||
.cms .ss-ui-button.ss-ui-action-constructive { text-shadow: none; font-weight: bold; color: white; border-color: #1F9433; border-bottom-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzkzYmU0MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFmOTQzMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #93be42), color-stop(100%, #1f9433)); background: -moz-linear-gradient(#93be42, #1f9433); background: -webkit-linear-gradient(#93be42, #1f9433); background: linear-gradient(#93be42, #1f9433); text-shadow: #1c872f 0 -1px -1px; }
|
.cms .ss-ui-button.ss-ui-action-constructive { text-shadow: none; font-weight: bold; color: white; border-color: #1F9433; border-bottom-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzk0YmU0MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFmOTQzMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #94be42), color-stop(100%, #1f9433)); background: -moz-linear-gradient(#94be42, #1f9433); background: -webkit-linear-gradient(#94be42, #1f9433); background: linear-gradient(#94be42, #1f9433); text-shadow: #1c872f 0 -1px -1px; }
|
||||||
.cms .ss-ui-button.ss-ui-action-constructive.ui-state-hover, .cms .ss-ui-button.ss-ui-action-constructive:hover { border-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2E0Y2EzYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzIzYTkzYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a4ca3a), color-stop(100%, #23a93a)); background: -moz-linear-gradient(#a4ca3a, #23a93a); background: -webkit-linear-gradient(#a4ca3a, #23a93a); background: linear-gradient(#a4ca3a, #23a93a); }
|
.cms .ss-ui-button.ss-ui-action-constructive.ui-state-hover, .cms .ss-ui-button.ss-ui-action-constructive:hover { border-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2E0Y2EzYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzIzYTkzYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a4ca3a), color-stop(100%, #23a93a)); background: -moz-linear-gradient(#a4ca3a, #23a93a); background: -webkit-linear-gradient(#a4ca3a, #23a93a); background: linear-gradient(#a4ca3a, #23a93a); }
|
||||||
.cms .ss-ui-button.ss-ui-action-constructive:active, .cms .ss-ui-button.ss-ui-action-constructive:focus, .cms .ss-ui-button.ss-ui-action-constructive.ui-state-active, .cms .ss-ui-button.ss-ui-action-constructive.ui-state-focus { background-color: #1d8c30; -moz-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); -webkit-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); }
|
.cms .ss-ui-button.ss-ui-action-constructive:active, .cms .ss-ui-button.ss-ui-action-constructive:focus, .cms .ss-ui-button.ss-ui-action-constructive.ui-state-active, .cms .ss-ui-button.ss-ui-action-constructive.ui-state-focus { background-color: #1d8c30; -moz-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); -webkit-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); }
|
||||||
.cms .ss-ui-button.ss-ui-action-destructive { color: #f00; background-color: #e6e6e6; }
|
.cms .ss-ui-button.ss-ui-action-destructive { color: #f00; background-color: #e6e6e6; }
|
||||||
@ -440,6 +440,7 @@ body.cms { overflow: hidden; }
|
|||||||
.cms-content-header .cms-content-header-info { float: left; padding-top: 7px; }
|
.cms-content-header .cms-content-header-info { float: left; padding-top: 7px; }
|
||||||
.cms-content-header .cms-content-header-info * { display: inline-block; }
|
.cms-content-header .cms-content-header-info * { display: inline-block; }
|
||||||
.cms-content-header .cms-content-header-info .section-icon { opacity: 0.2; margin-right: 4px; background-repeat: no-repeat; }
|
.cms-content-header .cms-content-header-info .section-icon { opacity: 0.2; margin-right: 4px; background-repeat: no-repeat; }
|
||||||
|
.cms-content-header .cms-content-header-info .cms_backlink { vertical-align: middle; }
|
||||||
.cms-content-header .ss-ui-button { line-height: 24px; }
|
.cms-content-header .ss-ui-button { line-height: 24px; }
|
||||||
.cms-content-header .ss-ui-button .ui-button-text { line-height: 1.4; }
|
.cms-content-header .ss-ui-button .ui-button-text { line-height: 1.4; }
|
||||||
|
|
||||||
|
@ -170,6 +170,7 @@
|
|||||||
st = this.getTree(),
|
st = this.getTree(),
|
||||||
ids = this.getIDs(),
|
ids = this.getIDs(),
|
||||||
allIds = [],
|
allIds = [],
|
||||||
|
viewMode = $('.cms-content-batchactions-button'),
|
||||||
selectedAction = this.find(':input[name=Action]').val();
|
selectedAction = this.find(':input[name=Action]').val();
|
||||||
|
|
||||||
// Default to refreshing the entire tree
|
// Default to refreshing the entire tree
|
||||||
@ -180,7 +181,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If no action is selected, enable all nodes
|
// If no action is selected, enable all nodes
|
||||||
if(!selectedAction || selectedAction == -1) {
|
if(!selectedAction || selectedAction == -1 || !viewMode.hasClass('active')) {
|
||||||
$(rootNode).find('li').each(function() {
|
$(rootNode).find('li').each(function() {
|
||||||
$(this).setEnabled(true);
|
$(this).setEnabled(true);
|
||||||
});
|
});
|
||||||
@ -354,11 +355,12 @@
|
|||||||
tree.addClass('multiple');
|
tree.addClass('multiple');
|
||||||
tree.removeClass('draggable');
|
tree.removeClass('draggable');
|
||||||
form.serializeFromTree();
|
form.serializeFromTree();
|
||||||
$('#Form_BatchActionsForm').refreshSelected();
|
|
||||||
} else {
|
} else {
|
||||||
tree.removeClass('multiple');
|
tree.removeClass('multiple');
|
||||||
tree.addClass('draggable');
|
tree.addClass('draggable');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#Form_BatchActionsForm').refreshSelected();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -139,6 +139,10 @@ body.cms {
|
|||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cms_backlink {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset to default styles
|
// Reset to default styles
|
||||||
|
@ -26,8 +26,7 @@ Used in side panels and action tabs
|
|||||||
.cms .ss-gridfield .right > * { float: right; margin-left: 8px; }
|
.cms .ss-gridfield .right > * { float: right; margin-left: 8px; }
|
||||||
.cms .ss-gridfield .right .pagination-records-number { font-size: 1.0em; padding: 6px 3px 6px 0; color: white; text-shadow: 0px -1px 0 rgba(0, 0, 0, 0.2); font-weight: normal; }
|
.cms .ss-gridfield .right .pagination-records-number { font-size: 1.0em; padding: 6px 3px 6px 0; color: white; text-shadow: 0px -1px 0 rgba(0, 0, 0, 0.2); font-weight: normal; }
|
||||||
.cms .ss-gridfield .left { float: left; }
|
.cms .ss-gridfield .left { float: left; }
|
||||||
.cms .ss-gridfield .left > * { margin-right: 8px; float: left; font-size: 14.4px; }
|
.cms .ss-gridfield .left > * { margin-right: 8px; float: left; }
|
||||||
.cms .ss-gridfield .ss-gridfield-buttonrow { font-size: 14.4px; }
|
|
||||||
.cms .ss-gridfield .grid-levelup { text-indent: -9999em; margin-bottom: 6px; }
|
.cms .ss-gridfield .grid-levelup { text-indent: -9999em; margin-bottom: 6px; }
|
||||||
.cms .ss-gridfield .grid-levelup a.list-parent-link { background: transparent url(../images/gridfield-level-up.png) no-repeat 0 0; display: block; }
|
.cms .ss-gridfield .grid-levelup a.list-parent-link { background: transparent url(../images/gridfield-level-up.png) no-repeat 0 0; display: block; }
|
||||||
.cms .ss-gridfield .add-existing-autocompleter span { float: left; display: inline-block; vertical-align: top; *vertical-align: auto; *zoom: 1; *display: inline; }
|
.cms .ss-gridfield .add-existing-autocompleter span { float: left; display: inline-block; vertical-align: top; *vertical-align: auto; *zoom: 1; *display: inline; }
|
||||||
|
@ -238,7 +238,14 @@ class Oembed_Result extends ViewableData {
|
|||||||
if(isset($options['class'])) {
|
if(isset($options['class'])) {
|
||||||
$this->extraClass = $options['class'];
|
$this->extraClass = $options['class'];
|
||||||
}
|
}
|
||||||
|
if($options) {
|
||||||
|
if(isset($options['width'])) {
|
||||||
|
$this->Width = $options['width'];
|
||||||
|
}
|
||||||
|
if(isset($options['height'])) {
|
||||||
|
$this->Height = $options['height'];
|
||||||
|
}
|
||||||
|
}
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,14 +99,9 @@ $gf_grid_x: 16px;
|
|||||||
& > * {
|
& > * {
|
||||||
margin-right:$gf_grid_x/2;
|
margin-right:$gf_grid_x/2;
|
||||||
float: left;
|
float: left;
|
||||||
font-size: $gf_grid_y*1.2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ss-gridfield-buttonrow {
|
|
||||||
font-size: $gf_grid_y*1.2;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.ss-gridfield {
|
.ss-gridfield {
|
||||||
.grid-levelup {
|
.grid-levelup {
|
||||||
|
216
thirdparty/tinymce-spellchecker/rpc.php
vendored
216
thirdparty/tinymce-spellchecker/rpc.php
vendored
@ -1,112 +1,104 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* $Id: rpc.php 915 2008-09-03 08:45:28Z spocke $
|
* $Id: rpc.php 915 2008-09-03 08:45:28Z spocke $
|
||||||
*
|
*
|
||||||
* @package MCManager.includes
|
* @package MCManager.includes
|
||||||
* @author Moxiecode
|
* @author Moxiecode
|
||||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("./includes/general.php");
|
require_once("./includes/general.php");
|
||||||
|
|
||||||
// Set RPC response headers
|
// Set RPC response headers
|
||||||
header('Content-Type: text/plain');
|
header('Content-Type: text/plain');
|
||||||
header('Content-Encoding: UTF-8');
|
header('Content-Encoding: UTF-8');
|
||||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
header("Pragma: no-cache");
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
$raw = "";
|
$raw = "";
|
||||||
|
|
||||||
// Try param
|
// Try param
|
||||||
if (isset($_POST["json_data"]))
|
if (isset($_POST["json_data"]))
|
||||||
$raw = getRequestParam("json_data");
|
$raw = getRequestParam("json_data");
|
||||||
|
|
||||||
// Try globals array
|
// Try stream
|
||||||
if (!$raw && isset($_GLOBALS) && isset($_GLOBALS["HTTP_RAW_POST_DATA"]))
|
if (!$raw) {
|
||||||
$raw = $_GLOBALS["HTTP_RAW_POST_DATA"];
|
if (!function_exists('file_get_contents')) {
|
||||||
|
$fp = fopen("php://input", "r");
|
||||||
// Try globals variable
|
if ($fp) {
|
||||||
if (!$raw && isset($HTTP_RAW_POST_DATA))
|
$raw = "";
|
||||||
$raw = $HTTP_RAW_POST_DATA;
|
|
||||||
|
while (!feof($fp))
|
||||||
// Try stream
|
$raw = fread($fp, 1024);
|
||||||
if (!$raw) {
|
|
||||||
if (!function_exists('file_get_contents')) {
|
fclose($fp);
|
||||||
$fp = fopen("php://input", "r");
|
}
|
||||||
if ($fp) {
|
} else
|
||||||
$raw = "";
|
$raw = "" . file_get_contents("php://input");
|
||||||
|
}
|
||||||
while (!feof($fp))
|
|
||||||
$raw = fread($fp, 1024);
|
// No input data
|
||||||
|
if (!$raw)
|
||||||
fclose($fp);
|
die('{"result":null,"id":null,"error":{"errstr":"Could not get raw post data.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
|
||||||
}
|
|
||||||
} else
|
// Passthrough request to remote server
|
||||||
$raw = "" . file_get_contents("php://input");
|
if (isset($config['general.remote_rpc_url'])) {
|
||||||
}
|
$url = parse_url($config['general.remote_rpc_url']);
|
||||||
|
|
||||||
// No input data
|
// Setup request
|
||||||
if (!$raw)
|
$req = "POST " . $url["path"] . " HTTP/1.0\r\n";
|
||||||
die('{"result":null,"id":null,"error":{"errstr":"Could not get raw post data.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
|
$req .= "Connection: close\r\n";
|
||||||
|
$req .= "Host: " . $url['host'] . "\r\n";
|
||||||
// Passthrough request to remote server
|
$req .= "Content-Length: " . strlen($raw) . "\r\n";
|
||||||
if (isset($config['general.remote_rpc_url'])) {
|
$req .= "\r\n" . $raw;
|
||||||
$url = parse_url($config['general.remote_rpc_url']);
|
|
||||||
|
if (!isset($url['port']) || !$url['port'])
|
||||||
// Setup request
|
$url['port'] = 80;
|
||||||
$req = "POST " . $url["path"] . " HTTP/1.0\r\n";
|
|
||||||
$req .= "Connection: close\r\n";
|
$errno = $errstr = "";
|
||||||
$req .= "Host: " . $url['host'] . "\r\n";
|
|
||||||
$req .= "Content-Length: " . strlen($raw) . "\r\n";
|
$socket = fsockopen($url['host'], intval($url['port']), $errno, $errstr, 30);
|
||||||
$req .= "\r\n" . $raw;
|
if ($socket) {
|
||||||
|
// Send request headers
|
||||||
if (!isset($url['port']) || !$url['port'])
|
fputs($socket, $req);
|
||||||
$url['port'] = 80;
|
|
||||||
|
// Read response headers and data
|
||||||
$errno = $errstr = "";
|
$resp = "";
|
||||||
|
while (!feof($socket))
|
||||||
$socket = fsockopen($url['host'], intval($url['port']), $errno, $errstr, 30);
|
$resp .= fgets($socket, 4096);
|
||||||
if ($socket) {
|
|
||||||
// Send request headers
|
fclose($socket);
|
||||||
fputs($socket, $req);
|
|
||||||
|
// Split response header/data
|
||||||
// Read response headers and data
|
$resp = explode("\r\n\r\n", $resp);
|
||||||
$resp = "";
|
echo $resp[1]; // Output body
|
||||||
while (!feof($socket))
|
}
|
||||||
$resp .= fgets($socket, 4096);
|
|
||||||
|
die();
|
||||||
fclose($socket);
|
}
|
||||||
|
|
||||||
// Split response header/data
|
// Get JSON data
|
||||||
$resp = explode("\r\n\r\n", $resp);
|
$json = new Moxiecode_JSON();
|
||||||
echo $resp[1]; // Output body
|
$input = $json->decode($raw);
|
||||||
}
|
|
||||||
|
// Execute RPC
|
||||||
die();
|
if (isset($config['general.engine'])) {
|
||||||
}
|
$spellchecker = new $config['general.engine']($config);
|
||||||
|
$result = call_user_func_array(array($spellchecker, $input['method']), $input['params']);
|
||||||
// Get JSON data
|
} else
|
||||||
$json = new Moxiecode_JSON();
|
die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
|
||||||
$input = $json->decode($raw);
|
|
||||||
|
// Request and response id should always be the same
|
||||||
// Execute RPC
|
$output = array(
|
||||||
if (isset($config['general.engine'])) {
|
"id" => $input->id,
|
||||||
$spellchecker = new $config['general.engine']($config);
|
"result" => $result,
|
||||||
$result = call_user_func_array(array($spellchecker, $input['method']), $input['params']);
|
"error" => null
|
||||||
} else
|
);
|
||||||
die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
|
|
||||||
|
// Return JSON encoded string
|
||||||
// Request and response id should always be the same
|
echo $json->encode($output);
|
||||||
$output = array(
|
|
||||||
"id" => $input->id,
|
?>
|
||||||
"result" => $result,
|
|
||||||
"error" => null
|
|
||||||
);
|
|
||||||
|
|
||||||
// Return JSON encoded string
|
|
||||||
echo $json->encode($output);
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -70,7 +70,16 @@
|
|||||||
+ '[/embed]';
|
+ '[/embed]';
|
||||||
el.replaceWith(shortCode);
|
el.replaceWith(shortCode);
|
||||||
});
|
});
|
||||||
o.content = jQuery('<div />').append(content).html(); // Little hack to get outerHTML string
|
|
||||||
|
// Insert outerHTML in order to retain all nodes incl. <script>
|
||||||
|
// tags which would've been filtered out with jQuery.html().
|
||||||
|
// Note that <script> tags might be sanitized separately based on editor config.
|
||||||
|
o.content = '';
|
||||||
|
content.each(function() {
|
||||||
|
if(this.outerHTML !== undefined) {
|
||||||
|
o.content += this.outerHTML;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var shortTagRegex = /(.?)\[embed(.*?)\](.+?)\[\/\s*embed\s*\](.?)/gi;
|
var shortTagRegex = /(.?)\[embed(.*?)\](.+?)\[\/\s*embed\s*\](.?)/gi;
|
||||||
|
Loading…
Reference in New Issue
Block a user