Dotclear


Ignore:
File:
1 edited

Legend:

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

    r3076 r3081  
    946946     } 
    947947 
    948      public static function getPF($file) { 
     948     public static function getPF($file) 
     949     { 
    949950          return $GLOBALS['core']->adminurl->get('load.plugin.file',array('pf' => $file)); 
    950951     } 
    951952 
    952      public static function setXFrameOptions($origin=null) { 
     953     public static function setXFrameOptions($origin = null) 
     954     { 
    953955          if (self::$xframe_loaded) { 
    954956               return; 
     
    956958          if ($origin !== null) { 
    957959               $url = parse_url($origin); 
    958                header(sprintf('X-Frame-Options: %s', is_array($url)?("ALLOW-FROM ".$url['scheme'].'://'.$url['host']):'SAMEORIGIN')); 
     960               header(sprintf('X-Frame-Options: %s',is_array($url) ? 
     961                    ("ALLOW-FROM ".(isset($url['scheme']) ? $url['scheme'].':' : '' ).'//'.$url['host']) : 
     962                    'SAMEORIGIN')); 
    959963          } else { 
    960964               header('X-Frame-Options: SAMEORIGIN'); // FF 3.6.9+ Chrome 4.1+ IE 8+ Safari 4+ Opera 10.5+ 
    961965          } 
    962966          self::$xframe_loaded = true; 
    963  
    964967     } 
    965968} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map