Dotclear

Changeset 3081:2d7b794a32c3


Ignore:
Timestamp:
08/18/15 21:27:07 (10 years ago)
Author:
franck <carnet.franck.paul@…>
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.
Message:

Merge bugfix from 2.8 branch

Location:
inc
Files:
3 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} 
  • inc/admin/lib.dc.page.php

    r3080 r3081  
    177177          } 
    178178 
    179           // Display breadcrumb (if given) before any error message 
     179          // Display breadcrumb (if given) before any error messages 
    180180          echo $breadcrumb; 
    181181 
    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>'. 
    185195               $core->error->toHTML(). 
    186196               '</div>'; 
    187           } 
    188  
    189           // Display notices 
    190           echo self::notices(); 
    191      } 
    192  
    193      public static function notices() 
    194      { 
     197               $error_displayed = true; 
     198          } 
     199 
    195200          // return notices if any 
    196           $res = ''; 
    197201          if (isset($_SESSION['notifications'])) { 
    198                $notifications = $_SESSION['notifications']; 
    199202               foreach ($_SESSION['notifications'] as $notification) { 
    200203                    $res .= self::getNotification($notification); 
     
    366369          echo $breadcrumb; 
    367370 
    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(); 
    374373     } 
    375374 
  • inc/prepend.php

    r3079 r3081  
    140140# Constants 
    141141define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 
    142 define('DC_VERSION','2.8.1'); 
     142define('DC_VERSION','2.9-dev'); 
    143143define('DC_DIGESTS',dirname(__FILE__).'/digests'); 
    144144define('DC_L10N_ROOT',dirname(__FILE__).'/../locales'); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map