Changeset 3081:2d7b794a32c3
- Timestamp:
- 08/18/15 21:27:07 (10 years ago)
- Branch:
- default
- Parents:
- 3078:2980b7408547 (diff), 3080:4afa4b38a042 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- inc
- Files:
-
- 3 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 } -
inc/admin/lib.dc.page.php
r3080 r3081 177 177 } 178 178 179 // Display breadcrumb (if given) before any error message 179 // Display breadcrumb (if given) before any error messages 180 180 echo $breadcrumb; 181 181 182 if ($core->error->flag()) { 183 echo 184 '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong></p>'. 182 // Display notices and errors 183 echo self::notices(); 184 } 185 186 public static function notices() 187 { 188 global $core; 189 static $error_displayed = false; 190 $res = ''; 191 192 // return error messages if any 193 if ($core->error->flag() && !$error_displayed) { 194 $res .= '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong></p>'. 185 195 $core->error->toHTML(). 186 196 '</div>'; 187 } 188 189 // Display notices 190 echo self::notices(); 191 } 192 193 public static function notices() 194 { 197 $error_displayed = true; 198 } 199 195 200 // return notices if any 196 $res = '';197 201 if (isset($_SESSION['notifications'])) { 198 $notifications = $_SESSION['notifications'];199 202 foreach ($_SESSION['notifications'] as $notification) { 200 203 $res .= self::getNotification($notification); … … 366 369 echo $breadcrumb; 367 370 368 if ($core->error->flag()) { 369 echo 370 '<div class="error" role="alert"><strong>'.__('Errors:').'</strong>'. 371 $core->error->toHTML(). 372 '</div>'; 373 } 371 // Display notices and errors 372 echo self::notices(); 374 373 } 375 374 -
inc/prepend.php
r3079 r3081 140 140 # Constants 141 141 define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 142 define('DC_VERSION','2. 8.1');142 define('DC_VERSION','2.9-dev'); 143 143 define('DC_DIGESTS',dirname(__FILE__).'/digests'); 144 144 define('DC_L10N_ROOT',dirname(__FILE__).'/../locales');
Note: See TracChangeset
for help on using the changeset viewer.