Changeset 2196:234c9e083cfb for inc/admin
- Timestamp:
- 10/02/13 00:10:37 (12 years ago)
- Branch:
- dcRepo
- Parents:
- 2195:70e4c0552ecc (diff), 2191:f3ecd85d5c32 (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. - Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.page.php
r2191 r2196 571 571 self::jsVar('dotclear.img_menu_on','images/menu_on.png'). 572 572 self::jsVar('dotclear.img_menu_off','images/menu_off.png'). 573 574 self::jsVar('dotclear.img_plus_theme_src','images/plus-theme.png'). 575 self::jsVar('dotclear.img_plus_theme_alt',__('uncover')). 576 self::jsVar('dotclear.img_minus_theme_src','images/minus-theme.png'). 577 self::jsVar('dotclear.img_minus_theme_alt',__('hide')). 573 578 574 579 self::jsVar('dotclear.msg.help', … … 654 659 self::jsVar('dotclear.msg.load_enhanced_uploader', 655 660 __('Loading enhanced uploader, please wait.')). 661 662 self::jsVar('dotclear.msg.module_author', 663 __('Author:')). 664 self::jsVar('dotclear.msg.module_details', 665 __('Details')). 666 self::jsVar('dotclear.msg.module_support', 667 __('Support')). 668 self::jsVar('dotclear.msg.module_help', 669 __('Help:')). 670 self::jsVar('dotclear.msg.module_section', 671 __('Section:')). 672 self::jsVar('dotclear.msg.module_tags', 673 __('Tags:')). 656 674 "\n//]]>\n". 657 675 "</script>\n"; -
inc/admin/lib.dc.page.php
r2195 r2196 175 175 '</div>'; 176 176 } 177 178 if (isset($_SESSION['notifications'])) { 179 $types = array("success" => "success", "warning" => "warning-msg", "error" => "error"); 180 $notifications = $_SESSION['notifications']; 181 foreach ($types as $type => $class) { 182 if (isset($notifications[$type])) { 183 foreach ($notifications[$type] as $n) { 184 echo self::getNotification($n,$class); 185 } 186 } 187 } 188 unset($_SESSION['notifications']); 189 } 190 } 191 192 public static function AddNotice($type,$message) 193 { 194 $notification = isset($_SESSION['notifications']) ? $_SESSION['notifications'] : array(); 195 $notification[$type][] = array('ts' => time(), 'text' => $message); 196 $_SESSION['notifications'] = $notification; 197 } 198 199 public static function addSuccessNotice($message) 200 { 201 self::addNotice("success",$message); 202 } 203 204 public static function addWarningNotice($message) 205 { 206 self::addNotice("warning",$message); 207 } 208 209 public static function addErrorNotice($message) 210 { 211 self::addNotice("error",$message); 212 } 213 214 protected static function getNotification($msg,$class) 215 { 216 global $core; 217 218 $res = '<p class="'.$class.'">'.dt::str(__('[%H:%M:%S]'),$msg['ts'],$core->auth->getInfo('user_tz')).' '.$msg['text'].'</p>'; 219 return $res; 177 220 } 178 221 … … 336 379 if ($msg != '') { 337 380 $res = ($div ? '<div class="'.$class.'">' : '').'<p'.($div ? '' : ' class="'.$class.'"').'>'. 338 ($timestamp ? dt::str(__(' %H:%M:%S:'),null,$core->auth->getInfo('user_tz')).' ' : '').$msg.381 ($timestamp ? dt::str(__('[%H:%M:%S]'),null,$core->auth->getInfo('user_tz')).' ' : '').$msg. 339 382 '</p>'.($div ? '</div>' : ''); 340 383 if ($echo) {
Note: See TracChangeset
for help on using the changeset viewer.