Changeset 3922:97da59a8f577 for inc/admin/lib.dc.page.php
- Timestamp:
- 11/10/18 15:07:01 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.page.php
r3921 r3922 55 55 { 56 56 $core = self::getCore(); 57 $js = [];57 $js = []; 58 58 59 59 # List of user's blogs … … 73 73 $blogs[html::escapeHTML($rs_blogs->blog_name . ' - ' . $rs_blogs->blog_url)] = $rs_blogs->blog_id; 74 74 } 75 $blog_box = 76 '<p><label for="switchblog" class="classic">' . 77 __('Blogs:') . '</label> ' . 78 $core->formNonce() . 79 form::combo('switchblog', $blogs, $core->blog->id) . 75 $blog_box = '<p><label for="switchblog" class="classic">' . __('Blogs:') . '</label> ' . 76 $core->formNonce() . form::combo('switchblog', $blogs, $core->blog->id) . 80 77 '<input type="submit" value="' . __('ok') . '" class="hidden-if-js" /></p>'; 81 78 } … … 190 187 $js['htmlFontSize'] = $core->auth->user_prefs->interface->htmlfontsize; 191 188 } 192 $js['hideMoreInfo'] = (boolean) $core->auth->user_prefs->interface->hidemoreinfo;189 $js['hideMoreInfo'] = (boolean) $core->auth->user_prefs->interface->hidemoreinfo; 193 190 $js['showAjaxLoader'] = (boolean) $core->auth->user_prefs->interface->showajaxloader; 194 191 … … 260 257 } 261 258 259 /** 260 @deprecated Please use $core->notices->getNotices() 261 **/ 262 262 public static function notices() 263 263 { … … 266 266 } 267 267 268 /** 269 @deprecated Please use $core->notices->addNotice() 270 **/ 268 271 public static function addNotice($type, $message, $options = []) 269 272 { … … 272 275 } 273 276 277 /** 278 @deprecated Please use $core->notices->addSuccessNotice() 279 **/ 274 280 public static function addSuccessNotice($message, $options = []) 275 281 { … … 277 283 } 278 284 285 /** 286 @deprecated Please use $core->notices->addWarningNotice() 287 **/ 279 288 public static function addWarningNotice($message, $options = []) 280 289 { … … 282 291 } 283 292 293 /** 294 @deprecated Please use $core->notices->addErrorNotice() 295 **/ 284 296 public static function addErrorNotice($message, $options = []) 285 297 { … … 302 314 303 315 echo 304 "</div>\n" . // End of #content316 "</div>\n" . // End of #content 305 317 "</main>\n" . // End of #main 306 318 … … 363 375 { 364 376 $core = self::getCore(); 365 $js = [];377 $js = []; 366 378 367 379 # Display … … 381 393 ' <meta name="viewport" content="width=device-width, initial-scale=1.0" />' . "\n" . 382 394 ' <title>' . $title . ' - ' . html::escapeHTML($core->blog->name) . ' - ' . html::escapeHTML(DC_VENDOR_NAME) . ' - ' . DC_VERSION . '</title>' . "\n" . 383 ' <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />' . "\n" .384 ' <meta name="GOOGLEBOT" content="NOSNIPPET" />' . "\n";395 ' <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />' . "\n" . 396 ' <meta name="GOOGLEBOT" content="NOSNIPPET" />' . "\n"; 385 397 386 398 if ($core->auth->user_prefs->interface->darkmode) { … … 399 411 $js['htmlFontSize'] = $core->auth->user_prefs->interface->htmlfontsize; 400 412 } 401 $js['hideMoreInfo'] = (boolean) $core->auth->user_prefs->interface->hidemoreinfo;413 $js['hideMoreInfo'] = (boolean) $core->auth->user_prefs->interface->hidemoreinfo; 402 414 $js['showAjaxLoader'] = (boolean) $core->auth->user_prefs->interface->showajaxloader; 403 415 … … 438 450 { 439 451 echo 440 "</div>\n" . // End of #content452 "</div>\n" . // End of #content 441 453 "</main>\n" . // End of #main 442 "</div>\n" . // End of #wrapper454 "</div>\n" . // End of #wrapper 443 455 444 456 '<p id="gototop"><a href="#wrapper">' . __('Page top') . '</a></p>' . "\n" . … … 475 487 } 476 488 489 /** 490 @deprecated Please use $core->notices->message() 491 **/ 477 492 public static function message($msg, $timestamp = true, $div = false, $echo = true, $class = 'message') 478 493 { … … 481 496 } 482 497 498 /** 499 @deprecated Please use $core->notices->success() 500 **/ 483 501 public static function success($msg, $timestamp = true, $div = false, $echo = true) 484 502 { … … 486 504 } 487 505 506 /** 507 @deprecated Please use $core->notices->warning() 508 **/ 488 509 public static function warning($msg, $timestamp = true, $div = false, $echo = true) 489 510 { … … 647 668 648 669 return $ret; 670 } 671 672 public static function jsJson($id, $vars) 673 { 674 return dcUtils::jsJson($id, $vars); 649 675 } 650 676 … … 887 913 public static function jsDatePicker() 888 914 { 915 $js = [ 916 'months' => [ 917 __('January'), 918 __('February'), 919 __('March'), 920 __('April'), 921 __('May'), 922 __('June'), 923 __('July'), 924 __('August'), 925 __('September'), 926 __('October'), 927 __('November'), 928 __('December') 929 ], 930 'days' => [ 931 __('Monday'), 932 __('Tuesday'), 933 __('Wednesday'), 934 __('Thursday'), 935 __('Friday'), 936 __('Saturday'), 937 __('Sunday') 938 ], 939 'img_src' => 'images/date-picker.png', 940 'img_alt' => __('Choose date'), 941 'close_msg' => __('close'), 942 'now_msg' => __('now') 943 ]; 889 944 return 890 945 self::cssLoad('style/date-picker.css') . 891 self::jsLoad('js/date-picker.js') . 892 '<script type="text/javascript">' . "\n" . 893 894 "datePicker.prototype.months[0] = '" . html::escapeJS(__('January')) . "'; " . 895 "datePicker.prototype.months[1] = '" . html::escapeJS(__('February')) . "'; " . 896 "datePicker.prototype.months[2] = '" . html::escapeJS(__('March')) . "'; " . 897 "datePicker.prototype.months[3] = '" . html::escapeJS(__('April')) . "'; " . 898 "datePicker.prototype.months[4] = '" . html::escapeJS(__('May')) . "'; " . 899 "datePicker.prototype.months[5] = '" . html::escapeJS(__('June')) . "'; " . 900 "datePicker.prototype.months[6] = '" . html::escapeJS(__('July')) . "'; " . 901 "datePicker.prototype.months[7] = '" . html::escapeJS(__('August')) . "'; " . 902 "datePicker.prototype.months[8] = '" . html::escapeJS(__('September')) . "'; " . 903 "datePicker.prototype.months[9] = '" . html::escapeJS(__('October')) . "'; " . 904 "datePicker.prototype.months[10] = '" . html::escapeJS(__('November')) . "'; " . 905 "datePicker.prototype.months[11] = '" . html::escapeJS(__('December')) . "'; " . 906 907 "datePicker.prototype.days[0] = '" . html::escapeJS(__('Monday')) . "'; " . 908 "datePicker.prototype.days[1] = '" . html::escapeJS(__('Tuesday')) . "'; " . 909 "datePicker.prototype.days[2] = '" . html::escapeJS(__('Wednesday')) . "'; " . 910 "datePicker.prototype.days[3] = '" . html::escapeJS(__('Thursday')) . "'; " . 911 "datePicker.prototype.days[4] = '" . html::escapeJS(__('Friday')) . "'; " . 912 "datePicker.prototype.days[5] = '" . html::escapeJS(__('Saturday')) . "'; " . 913 "datePicker.prototype.days[6] = '" . html::escapeJS(__('Sunday')) . "'; " . 914 915 "datePicker.prototype.img_src = 'images/date-picker.png'; " . 916 "datePicker.prototype.img_alt = '" . html::escapeJS(__('Choose date')) . "'; " . 917 918 "datePicker.prototype.close_msg = '" . html::escapeJS(__('close')) . "'; " . 919 "datePicker.prototype.now_msg = '" . html::escapeJS(__('now')) . "'; " . 920 921 "</script>\n"; 946 self::jsJson('date_picker', $js) . 947 self::jsLoad('js/date-picker.js'); 922 948 } 923 949
Note: See TracChangeset
for help on using the changeset viewer.