Changeset 3080:4afa4b38a042 for inc/admin/lib.dc.page.php
- Timestamp:
- 08/18/15 21:25:27 (10 years ago)
- Branch:
- 2.8
- Children:
- 3081:2d7b794a32c3, 3085:b8c98f60c4d7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.page.php
r3060 r3080 947 947 } 948 948 949 public static function getPF($file) { 949 public static function getPF($file) 950 { 950 951 return $GLOBALS['core']->adminurl->get('load.plugin.file',array('pf' => $file)); 951 952 } 952 953 953 public static function setXFrameOptions($origin=null) { 954 public static function setXFrameOptions($origin = null) 955 { 954 956 if (self::$xframe_loaded) { 955 957 return; … … 957 959 if ($origin !== null) { 958 960 $url = parse_url($origin); 959 header(sprintf('X-Frame-Options: %s', is_array($url)?("ALLOW-FROM ".$url['scheme'].'://'.$url['host']):'SAMEORIGIN')); 961 header(sprintf('X-Frame-Options: %s',is_array($url) ? 962 ("ALLOW-FROM ".(isset($url['scheme']) ? $url['scheme'].':' : '' ).'//'.$url['host']) : 963 'SAMEORIGIN')); 960 964 } else { 961 965 header('X-Frame-Options: SAMEORIGIN'); // FF 3.6.9+ Chrome 4.1+ IE 8+ Safari 4+ Opera 10.5+ 962 966 } 963 967 self::$xframe_loaded = true; 964 965 968 } 966 969 }
Note: See TracChangeset
for help on using the changeset viewer.