Changeset 3076:18ac5d848685
- Timestamp:
- 08/16/15 12:40:43 (9 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.page.php
r3074 r3076 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 202 foreach ($_SESSION['notifications'] as $notification) { … … 365 369 echo $breadcrumb; 366 370 367 if ($core->error->flag()) { 368 echo 369 '<div class="error" role="alert"><strong>'.__('Errors:').'</strong>'. 370 $core->error->toHTML(). 371 '</div>'; 372 } 371 // Display notices and errors 372 echo self::notices(); 373 373 } 374 374
Note: See TracChangeset
for help on using the changeset viewer.