Page MenuHomeIn-Portal Phabricator

D204.id497.diff
No OneTemporary

File Metadata

Created
Wed, Feb 26, 9:04 AM

D204.id497.diff

Index: core/units/helpers/fck_helper.php
===================================================================
--- core/units/helpers/fck_helper.php
+++ core/units/helpers/fck_helper.php
@@ -514,6 +514,13 @@
$editor->config[$param_key] = $param_value;
}
+
+ if ( isset($editor->config['styleSetName']) ) {
+ $style_set_parts = explode(':', $editor->config['stylesSet']);
+ $style_set_parts[0] = $editor->config['styleSetName'];
+ $editor->config['stylesSet'] = implode(':', $style_set_parts);
+ unset($editor->config['styleSetName']);
+ }
}
/**
@@ -604,17 +611,18 @@
}
/**
- * Returns transit parameters, that should be passed to every used CKEditor instance
+ * Returns transit parameters, that should be passed to every used CKEditor instance.
*
- * @param Array $tag_params
- * @return Array
+ * @param array $tag_params Tag params.
+ *
+ * @return array
*/
- public function getTransitParams($tag_params = Array ())
+ public function getTransitParams(array $tag_params = array())
{
- $ret = Array ();
- $transit_params = Array ('bgcolor' => '', 'body_class' => '', 'body_id' => '');
+ $ret = array();
+ $transit_params = array('bgcolor' => '', 'body_class' => '', 'body_id' => '', 'style_set_name' => 'portal');
- foreach ($transit_params as $param_name => $default_value) {
+ foreach ( $transit_params as $param_name => $default_value ) {
$param_value = isset($tag_params[$param_name]) ? $tag_params[$param_name] : $this->Application->GetVar($param_name);
if ( $param_value || $default_value ) {

Event Timeline