X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mathjax%2Fmathjax.php;h=695022e60a63ad327e708cd689ad7fe9acec166e;hb=f2c57fda48631adcaec8fa506441307a7217a590;hp=045f4c6add454e27c10e05c08ff65a447d640335;hpb=5c5c23acb062960dff33bf5fe86f32ff20515389;p=friendica-addons.git diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php index 045f4c6a..695022e6 100644 --- a/mathjax/mathjax.php +++ b/mathjax/mathjax.php @@ -8,6 +8,9 @@ * License: 3-clause BSD license */ +use Friendica\Core\Config; +use Friendica\Core\PConfig; + function mathjax_install() { register_hook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header'); register_hook('plugin_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings'); @@ -25,15 +28,20 @@ function mathjax_settings_post ($a, $post) { // don't check statusnet settings if statusnet submit button is not clicked if (!x($_POST,'mathjax-submit')) return; - set_pconfig(local_user(),'mathjax','use',intval($_POST['mathjax_use'])); + PConfig::set(local_user(),'mathjax','use',intval($_POST['mathjax_use'])); } function mathjax_settings (&$a, &$s) { if (! local_user()) return; - $use = get_pconfig(local_user(),'mathjax','use'); + $use = PConfig::get(local_user(),'mathjax','use'); $usetext = (($use) ? ' checked="checked" ' : ''); - $s .= '
'; + $s .= ''; + $s .= '

MathJax '.t('Settings').'

'; + $s .= '
'; + $s .= '