X-Git-Url: https://git.mxchange.org/?p=friendica-addons.git;a=blobdiff_plain;f=mathjax%2Fmathjax.php;h=62c33c9c191713de4d5f5cb8547c48fea14838e2;hp=d51857f3f789edca46d772c1a52ee32ca0151b1b;hb=39dd3dffe07efd69fa1ac6d0bd243c7fc0e3a66f;hpb=67c1273e08511bba6d5108e66305783deaca752f diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php index d51857f3..62c33c9c 100644 --- a/mathjax/mathjax.php +++ b/mathjax/mathjax.php @@ -28,12 +28,12 @@ function mathjax_settings_post ($a, $post) { // don't check statusnet settings if statusnet submit button is not clicked if (!x($_POST,'mathjax-submit')) return; - PConfig::set(local_user(),'mathjax','use',intval($_POST['mathjax_use'])); + set_pconfig(local_user(),'mathjax','use',intval($_POST['mathjax_use'])); } function mathjax_settings (&$a, &$s) { if (! local_user()) return; - $use = PConfig::get(local_user(),'mathjax','use'); + $use = get_pconfig(local_user(),'mathjax','use'); $usetext = (($use) ? ' checked="checked" ' : ''); $s .= ''; $s .= '

MathJax '.L10n::t('Settings').'

'; @@ -56,14 +56,14 @@ function mathjax_settings (&$a, &$s) { function mathjax_page_header($a, &$b) { // if the visitor of the page is not a local_user, use MathJax // otherwise check the users settings. - $url = Config::get ('mathjax','baseurl'); + $url = get_config ('mathjax','baseurl'); if(! $url) $url = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'; if (! local_user()) { $b .= ''; } else { - $use = PConfig::get(local_user(),'mathjax','use'); - if ($use) { + $use = get_pconfig(local_user(),'mathjax','use'); + if ($use) { $b .= ''; } } @@ -75,8 +75,8 @@ function mathjax_addon_admin_post (&$a) { } function mathjax_addon_admin (&$a, &$o) { $t = get_markup_template( "admin.tpl", "addon/mathjax/" ); - if (Config::get('mathjax','baseurl','') == '') { - Config::set('mathjax','baseurl','http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'); + if (get_config('mathjax','baseurl','') == '') { + set_config('mathjax','baseurl','http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'); } $o = replace_macros( $t, [