Changeset 2613:014098e27ea0
- Timestamp:
- 12/10/13 12:49:22 (12 years ago)
- Branch:
- twig
- Parents:
- 2611:8620c3dfc618 (diff), 2593:6741802596a0 (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:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.page.php
r2593 r2613 18 18 private static $loaded_js = array(); 19 19 private static $N_TYPES = array( 20 "success" => "success", 21 "warning" => "warning-msg", 22 "error" => "error", 23 "message" => "message", 20 "success" => "success", 21 "warning" => "warning-msg", 22 "error" => "error", 23 "message" => "message", 24 24 "static" => "static-msg"); 25 25 … … 104 104 105 105 self::jsLoadIE7(). 106 ' <link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n";106 ' <link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n"; 107 107 if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { 108 108 echo 109 ' <link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n";109 ' <link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n"; 110 110 } 111 111 … … 113 113 $user_ui_hide_std_favicon = $core->auth->user_prefs->interface->hide_std_favicon; 114 114 if (!$user_ui_hide_std_favicon) { 115 echo 115 echo 116 116 '<link rel="icon" type="image/png" href="images/favicon96-login.png" />'. 117 117 '<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />'; 118 118 } 119 119 120 echo 120 121 self::jsCommon(). … … 212 213 $notifications = array(); 213 214 } 214 215 215 216 $n = array_merge($options,array('class' => $class,'ts' => time(), 'text' => $message)); 216 217 if ($type != "static") { … … 326 327 327 328 self::jsLoadIE7(). 328 ' <link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n";329 ' <link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n"; 329 330 if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { 330 331 echo 331 ' <link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n";332 ' <link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n"; 332 333 } 333 334 … … 565 566 "</script>\n"; 566 567 } 567 568 568 569 public static function jsCommon() 569 570 { … … 590 591 "//<![CDATA[\n". 591 592 self::jsVar('dotclear.nonce',$GLOBALS['core']->getNonce()). 593 592 594 self::jsVar('dotclear.img_plus_src','images/expand.png'). 593 595 self::jsVar('dotclear.img_plus_alt',__('uncover')). … … 709 711 self::jsVar('dotclear.msg.module_tags', 710 712 __('Tags:')). 711 713 "\n//]]>\n". 712 714 "</script>\n"; 713 715 } … … 771 773 public static function jsModal() 772 774 { 773 774 775 776 777 778 779 780 781 775 return 776 '<link rel="stylesheet" type="text/css" href="style/modal/modal.css" />'."\n". 777 self::jsLoad('js/jquery/jquery.modal.js'). 778 '<script type="text/javascript">'."\n". 779 "//<![CDATA[\n". 780 self::jsVar('$.modal.prototype.params.loader_img','style/modal/loader.gif'). 781 self::jsVar('$.modal.prototype.params.close_img','style/modal/close.png'). 782 "\n//]]>\n". 783 "</script>\n"; 782 784 } 783 785 784 786 public static function jsColorPicker() 785 787 { 786 787 788 789 788 return 789 '<link rel="stylesheet" type="text/css" href="style/farbtastic/farbtastic.css" />'."\n". 790 self::jsLoad('js/jquery/jquery.farbtastic.js'). 791 self::jsLoad('js/color-picker.js'); 790 792 } 791 793 792 794 public static function jsDatePicker() 793 795 { 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 796 return 797 '<link rel="stylesheet" type="text/css" href="style/date-picker.css" />'."\n". 798 self::jsLoad('js/date-picker.js'). 799 '<script type="text/javascript">'."\n". 800 "//<![CDATA[\n". 801 802 "datePicker.prototype.months[0] = '".html::escapeJS(__('January'))."'; ". 803 "datePicker.prototype.months[1] = '".html::escapeJS(__('February'))."'; ". 804 "datePicker.prototype.months[2] = '".html::escapeJS(__('March'))."'; ". 805 "datePicker.prototype.months[3] = '".html::escapeJS(__('April'))."'; ". 806 "datePicker.prototype.months[4] = '".html::escapeJS(__('May'))."'; ". 807 "datePicker.prototype.months[5] = '".html::escapeJS(__('June'))."'; ". 808 "datePicker.prototype.months[6] = '".html::escapeJS(__('July'))."'; ". 809 "datePicker.prototype.months[7] = '".html::escapeJS(__('August'))."'; ". 810 "datePicker.prototype.months[8] = '".html::escapeJS(__('September'))."'; ". 811 "datePicker.prototype.months[9] = '".html::escapeJS(__('October'))."'; ". 812 "datePicker.prototype.months[10] = '".html::escapeJS(__('November'))."'; ". 813 "datePicker.prototype.months[11] = '".html::escapeJS(__('December'))."'; ". 814 815 "datePicker.prototype.days[0] = '".html::escapeJS(__('Monday'))."'; ". 816 "datePicker.prototype.days[1] = '".html::escapeJS(__('Tuesday'))."'; ". 817 "datePicker.prototype.days[2] = '".html::escapeJS(__('Wednesday'))."'; ". 818 "datePicker.prototype.days[3] = '".html::escapeJS(__('Thursday'))."'; ". 819 "datePicker.prototype.days[4] = '".html::escapeJS(__('Friday'))."'; ". 820 "datePicker.prototype.days[5] = '".html::escapeJS(__('Saturday'))."'; ". 821 "datePicker.prototype.days[6] = '".html::escapeJS(__('Sunday'))."'; ". 822 823 "datePicker.prototype.img_src = 'images/date-picker.png'; ". 824 825 "datePicker.prototype.close_msg = '".html::escapeJS(__('close'))."'; ". 826 "datePicker.prototype.now_msg = '".html::escapeJS(__('now'))."'; ". 827 828 "\n//]]>\n". 829 "</script>\n"; 828 830 } 829 831 830 832 public static function jsToolBar() 831 833 { 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 834 $res = 835 '<link rel="stylesheet" type="text/css" href="style/jsToolBar/jsToolBar.css" />'. 836 '<script type="text/javascript" src="js/jsToolBar/jsToolBar.js"></script>'; 837 838 if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) { 839 $res .= '<script type="text/javascript" src="js/jsToolBar/jsToolBar.wysiwyg.js"></script>'; 840 } 841 842 $res .= 843 '<script type="text/javascript" src="js/jsToolBar/jsToolBar.dotclear.js"></script>'. 844 '<script type="text/javascript">'."\n". 845 "//<![CDATA[\n". 846 "jsToolBar.prototype.dialog_url = 'popup.php'; ". 847 "jsToolBar.prototype.iframe_css = '". 848 'body{'. 849 'font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;'. 850 'color : #000;'. 851 'background: #f9f9f9;'. 852 'margin: 0;'. 853 'padding : 2px;'. 854 'border: none;'. 855 (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl' ? 'direction:rtl;' : ''). 856 '}'. 857 'pre, code, kbd, samp {'. 858 'font-family:"Courier New",Courier,monospace;'. 859 'font-size : 1.1em;'. 860 '}'. 861 'code {'. 862 'color : #666;'. 863 'font-weight : bold;'. 864 '}'. 865 'body > p:first-child {'. 866 'margin-top: 0;'. 867 '}'. 868 "'; ". 869 "jsToolBar.prototype.base_url = '".html::escapeJS($GLOBALS['core']->blog->host)."'; ". 870 "jsToolBar.prototype.switcher_visual_title = '".html::escapeJS(__('visual'))."'; ". 871 "jsToolBar.prototype.switcher_source_title = '".html::escapeJS(__('source'))."'; ". 872 "jsToolBar.prototype.legend_msg = '". 873 html::escapeJS(__('You can use the following shortcuts to format your text.'))."'; ". 874 "jsToolBar.prototype.elements.blocks.options.none = '".html::escapeJS(__('-- none --'))."'; ". 875 "jsToolBar.prototype.elements.blocks.options.nonebis = '".html::escapeJS(__('-- block format --'))."'; ". 876 "jsToolBar.prototype.elements.blocks.options.p = '".html::escapeJS(__('Paragraph'))."'; ". 877 "jsToolBar.prototype.elements.blocks.options.h1 = '".html::escapeJS(__('Level 1 header'))."'; ". 878 "jsToolBar.prototype.elements.blocks.options.h2 = '".html::escapeJS(__('Level 2 header'))."'; ". 879 "jsToolBar.prototype.elements.blocks.options.h3 = '".html::escapeJS(__('Level 3 header'))."'; ". 880 "jsToolBar.prototype.elements.blocks.options.h4 = '".html::escapeJS(__('Level 4 header'))."'; ". 881 "jsToolBar.prototype.elements.blocks.options.h5 = '".html::escapeJS(__('Level 5 header'))."'; ". 882 "jsToolBar.prototype.elements.blocks.options.h6 = '".html::escapeJS(__('Level 6 header'))."'; ". 883 "jsToolBar.prototype.elements.strong.title = '".html::escapeJS(__('Strong emphasis'))."'; ". 884 "jsToolBar.prototype.elements.em.title = '".html::escapeJS(__('Emphasis'))."'; ". 885 "jsToolBar.prototype.elements.ins.title = '".html::escapeJS(__('Inserted'))."'; ". 886 "jsToolBar.prototype.elements.del.title = '".html::escapeJS(__('Deleted'))."'; ". 887 "jsToolBar.prototype.elements.quote.title = '".html::escapeJS(__('Inline quote'))."'; ". 888 "jsToolBar.prototype.elements.code.title = '".html::escapeJS(__('Code'))."'; ". 889 "jsToolBar.prototype.elements.br.title = '".html::escapeJS(__('Line break'))."'; ". 890 "jsToolBar.prototype.elements.blockquote.title = '".html::escapeJS(__('Blockquote'))."'; ". 891 "jsToolBar.prototype.elements.pre.title = '".html::escapeJS(__('Preformated text'))."'; ". 892 "jsToolBar.prototype.elements.ul.title = '".html::escapeJS(__('Unordered list'))."'; ". 893 "jsToolBar.prototype.elements.ol.title = '".html::escapeJS(__('Ordered list'))."'; ". 894 895 "jsToolBar.prototype.elements.link.title = '".html::escapeJS(__('Link'))."'; ". 896 "jsToolBar.prototype.elements.link.href_prompt = '".html::escapeJS(__('URL?'))."'; ". 897 "jsToolBar.prototype.elements.link.hreflang_prompt = '".html::escapeJS(__('Language?'))."'; ". 898 899 "jsToolBar.prototype.elements.img.title = '".html::escapeJS(__('External image'))."'; ". 900 "jsToolBar.prototype.elements.img.src_prompt = '".html::escapeJS(__('URL?'))."'; ". 901 902 "jsToolBar.prototype.elements.img_select.title = '".html::escapeJS(__('Media chooser'))."'; ". 901 903 "jsToolBar.prototype.elements.post_link.title = '".html::escapeJS(__('Link to an entry'))."'; ". 902 904 903 905 "jsToolBar.prototype.elements.removeFormat.title = '".html::escapeJS(__('Remove text formating'))."'; "; 904 906 905 906 907 908 909 910 911 912 913 907 if (!$GLOBALS['core']->auth->check('media,media_admin',$GLOBALS['core']->blog->id)) { 908 $res .= "jsToolBar.prototype.elements.img_select.disabled = true;\n"; 909 } 910 911 $res .= 912 "\n//]]>\n". 913 "</script>\n"; 914 915 return $res; 914 916 } 915 917 916 918 public static function jsUpload($params=array(),$base_url=null) 917 919 { 918 919 920 921 922 923 924 925 920 if (!$base_url) { 921 $base_url = path::clean(dirname(preg_replace('/(\?.*$)?/','',$_SERVER['REQUEST_URI']))).'/'; 922 } 923 924 $params = array_merge($params,array( 925 'sess_id='.session_id(), 926 'sess_uid='.$_SESSION['sess_browser_uid'], 927 'xd_check='.$GLOBALS['core']->getNonce() 926 928 )); 927 929 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 930 return 931 '<script type="text/javascript">'."\n". 932 "//<![CDATA[\n". 933 "dotclear.jsUpload = {};\n". 934 "dotclear.jsUpload.msg = {};\n". 935 self::jsVar('dotclear.msg.enhanced_uploader_activate',__('Temporarily activate enhanced uploader')). 936 self::jsVar('dotclear.msg.enhanced_uploader_disable',__('Temporarily disable enhanced uploader')). 937 self::jsVar('dotclear.jsUpload.msg.limit_exceeded',__('Limit exceeded.')). 938 self::jsVar('dotclear.jsUpload.msg.size_limit_exceeded',__('File size exceeds allowed limit.')). 939 self::jsVar('dotclear.jsUpload.msg.canceled',__('Canceled.')). 940 self::jsVar('dotclear.jsUpload.msg.http_error',__('HTTP Error:')). 941 self::jsVar('dotclear.jsUpload.msg.error',__('Error:')). 942 self::jsVar('dotclear.jsUpload.msg.choose_file',__('Choose file')). 943 self::jsVar('dotclear.jsUpload.msg.choose_files',__('Choose files')). 944 self::jsVar('dotclear.jsUpload.msg.cancel',__('Cancel')). 945 self::jsVar('dotclear.jsUpload.msg.clean',__('Clean')). 946 self::jsVar('dotclear.jsUpload.msg.upload',__('Upload')). 945 947 self::jsVar('dotclear.jsUpload.msg.send',__('Send')). 946 948 self::jsVar('dotclear.jsUpload.msg.file_successfully_uploaded',__('File successfully uploaded.')). 947 948 949 950 951 952 949 self::jsVar('dotclear.jsUpload.msg.no_file_in_queue',__('No file in queue.')). 950 self::jsVar('dotclear.jsUpload.msg.file_in_queue',__('1 file in queue.')). 951 self::jsVar('dotclear.jsUpload.msg.files_in_queue',__('%d files in queue.')). 952 self::jsVar('dotclear.jsUpload.msg.queue_error',__('Queue error:')). 953 self::jsVar('dotclear.jsUpload.base_url',$base_url). 954 "\n//]]>\n". 953 955 "</script>\n". 954 956 … … 967 969 public static function jsToolMan() 968 970 { 969 970 971 972 973 974 975 976 971 return 972 '<script type="text/javascript" src="js/tool-man/core.js"></script>'. 973 '<script type="text/javascript" src="js/tool-man/events.js"></script>'. 974 '<script type="text/javascript" src="js/tool-man/css.js"></script>'. 975 '<script type="text/javascript" src="js/tool-man/coordinates.js"></script>'. 976 '<script type="text/javascript" src="js/tool-man/drag.js"></script>'. 977 '<script type="text/javascript" src="js/tool-man/dragsort.js"></script>'. 978 '<script type="text/javascript" src="js/dragsort-tablerows.js"></script>'; 977 979 } 978 980 979 981 public static function jsMetaEditor() 980 982 { 981 982 983 return 984 '<script type="text/javascript" src="js/meta-editor.js"></script>'; 983 985 } 984 986 } -
inc/admin/prepend.php
r2609 r2613 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 3Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or -
inc/core/class.dc.blog.php
r2609 r2613 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 3Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 2385 2385 //@} 2386 2386 } 2387 ?> -
inc/core/class.dc.core.php
r2593 r2613 40 40 public $log; ///< <b>dcLog</b> dcLog object 41 41 public $tpl; ///< <b>Twig_Environment</b> Twig_Environment object 42 public $stime; ///< <b>float</b> starting time 42 43 43 44 private $versions = null; … … 60 61 public function __construct($driver, $host, $db, $user, $password, $prefix, $persist) 61 62 { 63 if (defined('DC_START_TIME')) { 64 $this->stime=DC_START_TIME; 65 } else { 66 $this->stime = microtime(true); 67 } 68 62 69 $this->con = dbLayer::init($driver,$host,$db,$user,$password,$persist); 63 70 … … 1019 1026 private function getBlogCursor($cur) 1020 1027 { 1021 if ($cur->blog_id !== null 1022 && !preg_match('/^[A-Za-z0-9._-]{2,}$/',$cur->blog_id)) { 1028 if (($cur->blog_id !== null 1029 && !preg_match('/^[A-Za-z0-9._-]{2,}$/',$cur->blog_id)) || 1030 (!$cur->blog_id)) { 1023 1031 throw new Exception(__('Blog ID must contain at least 2 characters using letters, numbers or symbols.')); 1024 1032 } 1025 1033 1026 if ($cur->blog_name !== null && $cur->blog_name == '') { 1034 if (($cur->blog_name !== null && $cur->blog_name == '') || 1035 (!$cur->blog_name)) { 1027 1036 throw new Exception(__('No blog name')); 1028 1037 } 1029 1038 1030 if ($cur->blog_url !== null && $cur->blog_url == '') { 1039 if (($cur->blog_url !== null && $cur->blog_url == '') || 1040 (!$cur->blog_url)) { 1031 1041 throw new Exception(__('No blog URL')); 1032 1042 } … … 1508 1518 } 1509 1519 } 1520 1521 /** 1522 Return elapsed time since script has been started 1523 @param $mtime <b>float</b> timestamp (microtime format) to evaluate delta from 1524 current time is taken if null 1525 @return <b>float</b> elapsed time 1526 */ 1527 public function getElapsedTime ($mtime=null) { 1528 if ($mtime !== null) { 1529 return $mtime-$this->stime; 1530 } else { 1531 return microtime(true)-$this->stime; 1532 } 1533 } 1510 1534 //@} 1535 1536 1537 1511 1538 } 1512 ?> -
inc/prepend.php
r2593 r2613 10 10 # 11 11 # -- END LICENSE BLOCK ----------------------------------------- 12 13 /* Start tick */ 14 define('DC_START_TIME',microtime(true)); 12 15 13 16 /* ------------------------------------------------------------------------------------------- */ … … 167 170 define('DC_DISTRIB_PLUGINS','aboutConfig,akismet,antispam,attachments,blogroll,blowupConfig,dclegacy,fairTrackbacks,importExport,maintenance,pages,pings,simpleMenu,tags,themeEditor,userPref,widgets'); 168 171 define('DC_DISTRIB_THEMES','blueSilence,blowupConfig,customCSS,default,ductile'); 172 define('DC_DEFAULT_TPLSET','mustek'); 169 173 170 174 if (!defined('DC_VENDOR_NAME')) { -
plugins/aboutConfig/_admin.php
r2609 r2613 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 3Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 $_menu[' System']->addItem('about:config','plugin.php?p=aboutConfig','index.php?pf=aboutConfig/icon.png',14 $_menu['Plugins']->addItem('about:config','plugin.php?p=aboutConfig','index.php?pf=aboutConfig/icon.png', 15 15 preg_match('/plugin.php\?p=aboutConfig(&.*)?$/',$_SERVER['REQUEST_URI']), 16 16 $core->auth->isSuperAdmin());
Note: See TracChangeset
for help on using the changeset viewer.