]> git.mxchange.org Git - friendica-addons.git/blobdiff - mathjax/mathjax.php
Merge branch '3.6-rc'
[friendica-addons.git] / mathjax / mathjax.php
index d51857f3f789edca46d772c1a52ee32ca0151b1b..62c33c9c191713de4d5f5cb8547c48fea14838e2 100644 (file)
@@ -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;
     // 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;
 }
 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 .= '<span id="settings_mathjax_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_mathjax_expanded\'); openClose(\'settings_mathjax_inflated\');">';
     $s .= '<h3>MathJax '.L10n::t('Settings').'</h3>';
     $usetext = (($use) ? ' checked="checked" ' : '');
     $s .= '<span id="settings_mathjax_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_mathjax_expanded\'); openClose(\'settings_mathjax_inflated\');">';
     $s .= '<h3>MathJax '.L10n::t('Settings').'</h3>';
@@ -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.
 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 .= '<script type="text/javascript" src="'.$url.'"></script>';
     } else {
        if(! $url)
                $url = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
     if (! local_user()) {
         $b .= '<script type="text/javascript" src="'.$url.'"></script>';
     } else {
-        $use = PConfig::get(local_user(),'mathjax','use');
-        if ($use) {
+        $use = get_pconfig(local_user(),'mathjax','use');
+        if ($use) { 
             $b .= '<script type="text/javascript" src="'.$url.'"></script>';
         }
     }
             $b .= '<script type="text/javascript" src="'.$url.'"></script>';
         }
     }
@@ -75,8 +75,8 @@ function mathjax_addon_admin_post (&$a) {
 }
 function mathjax_addon_admin (&$a, &$o) {
        $t = get_markup_template( "admin.tpl", "addon/mathjax/" );
 }
 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, [
        }
 
        $o = replace_macros( $t, [