Changes in [3078:2980b7408547:3081:2d7b794a32c3]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.page.php
r3076 r3081 946 946 } 947 947 948 public static function getPF($file) { 948 public static function getPF($file) 949 { 949 950 return $GLOBALS['core']->adminurl->get('load.plugin.file',array('pf' => $file)); 950 951 } 951 952 952 public static function setXFrameOptions($origin=null) { 953 public static function setXFrameOptions($origin = null) 954 { 953 955 if (self::$xframe_loaded) { 954 956 return; … … 956 958 if ($origin !== null) { 957 959 $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')); 959 963 } else { 960 964 header('X-Frame-Options: SAMEORIGIN'); // FF 3.6.9+ Chrome 4.1+ IE 8+ Safari 4+ Opera 10.5+ 961 965 } 962 966 self::$xframe_loaded = true; 963 964 967 } 965 968 }
Note: See TracChangeset
for help on using the changeset viewer.