Disable richtext editor for frio - followup for #2938
This commit is contained in:
parent
efb2df41ba
commit
d49325d177
1
boot.php
1
boot.php
|
@ -530,6 +530,7 @@ class App {
|
||||||
public $videoheight = 350;
|
public $videoheight = 350;
|
||||||
public $force_max_items = 0;
|
public $force_max_items = 0;
|
||||||
public $theme_thread_allow = true;
|
public $theme_thread_allow = true;
|
||||||
|
public $theme_richtext_editor = true;
|
||||||
public $theme_events_in_profile = true;
|
public $theme_events_in_profile = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -10,17 +10,24 @@
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function feature_enabled($uid,$feature) {
|
function feature_enabled($uid, $feature) {
|
||||||
|
|
||||||
$x = get_config('feature_lock',$feature);
|
if (($feature == 'richtext') AND !get_app()->theme_richtext_editor) {
|
||||||
if($x === false) {
|
return false;
|
||||||
$x = get_pconfig($uid,'feature',$feature);
|
}
|
||||||
if($x === false) {
|
|
||||||
$x = get_config('feature',$feature);
|
$x = get_config('feature_lock', $feature);
|
||||||
if($x === false)
|
|
||||||
|
if ($x === false) {
|
||||||
|
$x = get_pconfig($uid, 'feature', $feature);
|
||||||
|
if ($x === false) {
|
||||||
|
$x = get_config('feature', $feature);
|
||||||
|
if ($x === false) {
|
||||||
$x = get_feature_default($feature);
|
$x = get_feature_default($feature);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
|
$arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
|
||||||
call_hooks('feature_enabled',$arr);
|
call_hooks('feature_enabled',$arr);
|
||||||
return($arr['enabled']);
|
return($arr['enabled']);
|
||||||
|
@ -135,6 +142,11 @@ function get_features($filtered = true) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove the richtext editor setting if the theme doesn't support it
|
||||||
|
if (!get_app()->theme_richtext_editor) {
|
||||||
|
unset($arr['composition'][1]);
|
||||||
|
}
|
||||||
|
|
||||||
call_hooks('get_features',$arr);
|
call_hooks('get_features',$arr);
|
||||||
return $arr;
|
return $arr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,9 @@ function frio_init(&$a) {
|
||||||
// disable the events module link in the profile tab
|
// disable the events module link in the profile tab
|
||||||
$a->theme_events_in_profile = false;
|
$a->theme_events_in_profile = false;
|
||||||
|
|
||||||
|
// Disallow the richtext editor
|
||||||
|
$a->theme_richtext_editor = false;
|
||||||
|
|
||||||
set_template_engine($a, 'smarty3');
|
set_template_engine($a, 'smarty3');
|
||||||
|
|
||||||
$baseurl = $a->get_baseurl();
|
$baseurl = $a->get_baseurl();
|
||||||
|
|
Loading…
Reference in a new issue