Dotclear

Changeset 3457:4a67f510806d


Ignore:
Timestamp:
12/17/16 17:43:39 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add two new behaviors to open Dotclear messages 3rd party management

File:
1 edited

Legend:

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

    r3454 r3457  
    262262          global $core; 
    263263          static $error_displayed = false; 
     264 
    264265          $res = ''; 
    265266 
    266267          // return error messages if any 
    267268          if ($core->error->flag() && !$error_displayed) { 
    268                $res .= '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong></p>'. 
    269                $core->error->toHTML(). 
    270                '</div>'; 
     269 
     270               # --BEHAVIOR-- adminPageNotificationError 
     271               $notice_error = $core->callBehavior('adminPageNotificationError',$core->error); 
     272 
     273               if (!empty($notice_error)) { 
     274                    $res .= $notice_error; 
     275               } else { 
     276                    $res .= '<div class="error"><p>'. 
     277                         '<strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong>'. 
     278                         '</p>'.$core->error->toHTML().'</div>'; 
     279               } 
    271280               $error_displayed = true; 
    272281          } 
     
    275284          if (isset($_SESSION['notifications'])) { 
    276285               foreach ($_SESSION['notifications'] as $notification) { 
    277                     $res .= self::getNotification($notification); 
     286 
     287                    # --BEHAVIOR-- adminPageNotification 
     288                    $notice = $core->callBehavior('adminPageNotification',$notification); 
     289 
     290                    $res = (!empty($notice) ? $notice : self::getNotification($notification)); 
    278291               } 
    279292               unset($_SESSION['notifications']); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map