Changeset 1596

Show
Ignore:
Timestamp:
06/07/08 00:56:18 (6 months ago)
Author:
dramirez
Message:

Fixed some warnings related to the templates_js_context functions

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/lib/setup.php

    r1571 r1596  
    77global $SESSION; 
    88global $PAGE; 
     9global $js_files; 
    910 
    1011/// First try to detect some attacks on older buggy PHP versions 
     
    426427if (!isset($PAGE->menu_top   )) { $PAGE->menu_top    = array();} 
    427428if (!isset($PAGE->menu_bottom)) { $PAGE->menu_bottom = array();} 
     429if (!isset($PAGE->js_setup   )) { $PAGE->js_setup = array();} 
     430 
     431// Setting up global.js for make available ELGG_WWWROOT for JavaScript 
     432if(!isset($js_files)){ 
     433  $js_files = array(); 
     434  $js_files['global'][]=array("path"=>"lib/global.js","external"=>false); 
     435} 
    428436 
    429437// 
  • devel/lib/templates.php

    r1595 r1596  
    12991299  global $CFG,$js_files; 
    13001300 
    1301   if(!isset($js_files)){ 
    1302     $js_files = array(); 
    1303     $js_files['global'][]=array("path"=>"lib/global.js","external"=>false); 
    1304   } 
    1305  
    13061301  if(!empty($context)){ 
    13071302    if(!array_key_exists($context,$js_files)||$overwrite){ 
     
    13211316function templates_js_setup($context="global"){ 
    13221317  global $CFG,$PAGE,$js_files,$metatags; 
    1323  
     1318  $resp = ""; 
     1319   
    13241320  if(!$PAGE->js_setup[$context]){ 
    13251321    $inlinefiles = null;