Dotclear

Changeset 3913:08b5eeb2d560 for inc


Ignore:
Timestamp:
11/05/18 12:03:26 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Fixes #2289 - global $core missing

Location:
inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.dc.page.php

    r3912 r3913  
    351351    { 
    352352        global $core; 
     353 
    353354        $tag = (isset($n['divtag']) && $n['divtag']) ? 'div' : 'p'; 
    354355        $ts  = ''; 
     
    539540    { 
    540541        global $core; 
     542 
    541543        $with_home_link = isset($options['home_link']) ? $options['home_link'] : true; 
    542544        $hl             = isset($options['hl']) ? $options['hl'] : true; 
     
    748750    public static function jsUtil() 
    749751    { 
    750         return self::jsLoad($core->blog->getPF('util.js')); 
     752        return self::jsLoad($GLOBALS['core']->blog->getPF('util.js')); 
    751753    } 
    752754 
  • inc/core/class.dc.utils.php

    r3912 r3913  
    137137    public static function jsJson($id, $vars) 
    138138    { 
    139         // Use dcUtils::jsLoad($core->blog->getPF('util.js')) to use the JS getData() decoder 
     139        // Use echo dcUtils::jsLoad($core->blog->getPF('util.js')); to use the JS getData() decoder 
     140        // or echo dcPage::jsUtil(); in admin mode 
    140141        $ret = '<script type="application/json" id="' . html::escapeHTML($id) . '-data">' . "\n" . 
    141142            json_encode($vars, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES) . "\n" . '</script>'; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map