Changeset 2191:f3ecd85d5c32
- Timestamp:
- 10/01/13 20:36:42 (10 years ago)
- Branch:
- default
- Children:
- 2196:234c9e083cfb, 2197:293080a0c97e
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/blog_theme.php
r2189 r2191 55 55 $theme = $core->themes->getModules($_POST['theme']); 56 56 dcPage::addSuccessNotice(sprintf( 57 __('Current theme has been successfully changed to "%s".'),58 57 __('Current theme has been successfully changed to "%s".'), 59 58 html::escapeHTML($theme['name'])) -
inc/admin/lib.dc.page.php
r2189 r2191 175 175 '</div>'; 176 176 } 177 177 178 178 if (isset($_SESSION['notifications'])) { 179 179 $types = array("success" => "success", "warning" => "warning-msg", "error" => "error"); … … 188 188 unset($_SESSION['notifications']); 189 189 } 190 191 } 192 public static function AddNotice($type,$message) { 193 $notification = isset($_SESSION['notifications']) ? $_SESSION['notifications']:array(); 190 } 191 192 public static function AddNotice($type,$message) 193 { 194 $notification = isset($_SESSION['notifications']) ? $_SESSION['notifications'] : array(); 194 195 $notification[$type][] = array('ts' => time(), 'text' => $message); 195 196 $_SESSION['notifications'] = $notification; 196 197 } 197 public static function addSuccessNotice($message) { 198 199 public static function addSuccessNotice($message) 200 { 198 201 self::addNotice("success",$message); 199 202 } 200 public static function addWarningNotice($message) { 203 204 public static function addWarningNotice($message) 205 { 201 206 self::addNotice("warning",$message); 202 207 } 203 public static function addErrorNotice($message) { 208 209 public static function addErrorNotice($message) 210 { 204 211 self::addNotice("error",$message); 205 } 206 protected static function getNotification($msg,$class) { 212 } 213 214 protected static function getNotification($msg,$class) 215 { 207 216 global $core; 208 $res = '<p class="'.$class.'">'. 209 dt::str(__('[%H:%M:%S]'),$msg['ts'],$core->auth->getInfo('user_tz')).' '.$msg['text'].210 '</p>';211 return $res;212 } 217 218 $res = '<p class="'.$class.'">'.dt::str(__('[%H:%M:%S]'),$msg['ts'],$core->auth->getInfo('user_tz')).' '.$msg['text'].'</p>'; 219 return $res; 220 } 221 213 222 public static function close() 214 223 { … … 370 379 if ($msg != '') { 371 380 $res = ($div ? '<div class="'.$class.'">' : '').'<p'.($div ? '' : ' class="'.$class.'"').'>'. 372 ($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. 373 382 '</p>'.($div ? '</div>' : ''); 374 383 if ($echo) {
Note: See TracChangeset
for help on using the changeset viewer.