Dotclear


Ignore:
Files:
2 added
17 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r2999 r3260  
    2525            ./$(DC)/features ./$(DC)/travis ./$(DC)/behat.yml.dist ./$(DC)/composer.* 
    2626 
    27      ## Create cache, db, plugins and public folders 
    28      mkdir ./$(DC)/cache ./$(DC)/db ./$(DC)/plugins ./$(DC)/public ./$(DC)/themes 
     27     ## Create cache, var, db, plugins, themes and public folders 
     28     mkdir ./$(DC)/cache ./$(DC)/var ./$(DC)/db ./$(DC)/plugins ./$(DC)/themes ./$(DC)/public 
    2929     cp -p inc/.htaccess ./$(DC)/cache/ 
     30     cp -p inc/.htaccess ./$(DC)/var/ 
    3031     cp -p inc/.htaccess ./$(DC)/db/ 
    3132     cp -p inc/.htaccess ./$(DC)/plugins/ 
     
    7374     ## Create digest 
    7475     cd $(DC) && ( \ 
    75           md5sum `find . -type f -not -path "./inc/digest" -not -path "./cache/*" -not -path "./db/*" -not -path ./CHANGELOG` \ 
     76          md5sum `find . -type f -not -path "./inc/digest" -not -path "./cache/*" -not -path "./var/*" -not -path "./db/*" -not -path ./CHANGELOG` \ 
    7677          > inc/digests \ 
    7778     ) 
  • admin/comments.php

    r3182 r3263  
    5454/* Get comments 
    5555-------------------------------------------------------- */ 
    56 $author = isset($_GET['author']) ? $_GET['author'] : ''; 
    57 $status = isset($_GET['status']) ?      $_GET['status'] : ''; 
    58 $type = !empty($_GET['type']) ?         $_GET['type'] : ''; 
    59 $sortby = !empty($_GET['sortby']) ?     $_GET['sortby'] : 'comment_dt'; 
    60 $order = !empty($_GET['order']) ?       $_GET['order'] : 'desc'; 
    61 $ip = !empty($_GET['ip']) ?             $_GET['ip'] : ''; 
     56$author = isset($_GET['author']) ? $_GET['author'] : ''; 
     57$status = isset($_GET['status']) ? $_GET['status'] : ''; 
     58$type   = !empty($_GET['type']) ? $_GET['type'] : ''; 
     59$sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'comment_dt'; 
     60$order  = !empty($_GET['order']) ? $_GET['order'] : 'desc'; 
     61$ip     = !empty($_GET['ip']) ? $_GET['ip'] : ''; 
     62$email  = !empty($_GET['email']) ? $_GET['email'] : ''; 
     63$site   = !empty($_GET['site']) ? $_GET['site'] : ''; 
    6264 
    6365$with_spam = $author || $status || $type || $sortby != 'comment_dt' || $order != 'desc' || $ip; 
     
    108110if ($ip) { 
    109111     $params['comment_ip'] = $ip; 
     112     $show_filters = true; 
     113} 
     114 
     115# - email filter 
     116if ($email) { 
     117     $params['comment_email'] = $email; 
     118     $show_filters = true; 
     119} 
     120 
     121# - site filter 
     122if ($site) { 
     123     $params['comment_site'] = $site; 
    110124     $show_filters = true; 
    111125} 
     
    237251     '<p><label for="ip" class="ib">'.__('IP address:').'</label> '. 
    238252     form::field('ip',20,39,html::escapeHTML($ip)).'</p>'. 
     253     '<p><label for="email" class="ib">'.__('Email:').'</label> '. 
     254     form::field('email',20,255,html::escapeHTML($email)).'</p>'. 
     255     '<p><label for="site" class="ib">'.__('Web site:').'</label> '. 
     256     form::field('site',20,255,html::escapeHTML($site)).'</p>'. 
    239257     '</div>'. 
    240258 
     
    276294     form::hidden(array('page'),$page). 
    277295     form::hidden(array('nb'),$nb_per_page). 
     296     form::hidden(array('email'),html::escapeHTML(preg_replace('/%/','%%',$email))). 
     297     form::hidden(array('site'),html::escapeHTML(preg_replace('/%/','%%',$site))). 
    278298     '</div>'. 
    279299 
  • admin/index.php

    r3238 r3260  
    1313if (!empty($_GET['pf'])) { 
    1414     require dirname(__FILE__).'/../inc/load_plugin_file.php'; 
     15     exit; 
     16} 
     17 
     18if (!empty($_GET['vf'])) { 
     19     require dirname(__FILE__).'/../inc/load_var_file.php'; 
    1520     exit; 
    1621} 
  • admin/style/default.css

    r3245 r3264  
    3737    box-sizing: border-box; 
    3838     } 
     39#dotclear-admin { 
     40    display: flex; 
     41    min-height: 100vh; 
     42     flex-direction: column; 
     43} 
    3944#header { 
    4045     background: #676e78; 
    4146     color: #FFF; 
    4247     border-bottom: 4px solid #A2CBE9; 
    43      width: 100%; 
     48     width: 99.99%; /* Bugfix Chrome >= 49.0.2623.108 */ 
    4449     display: table; 
    4550     position: relative; 
     
    5257     z-index: 10; 
    5358     background: #F7F7F7 url(bg_wrapper.png) repeat-y 15em; 
     59     flex: 1; 
    5460     } 
    5561.with-js #wrapper { 
  • inc/admin/lib.dc.page.php

    r3256 r3262  
    10071007     } 
    10081008 
     1009     public static function getVF($file) 
     1010     { 
     1011          return $GLOBALS['core']->adminurl->get('load.var.file',array('vf' => $file)); 
     1012     } 
     1013 
    10091014     public static function setXFrameOptions($origin = null) 
    10101015     { 
  • inc/admin/prepend.php

    r3109 r3262  
    208208 
    209209$core->adminurl->registercopy('load.plugin.file','admin.home',array('pf' => 'dummy.css')); 
     210$core->adminurl->registercopy('load.var.file','admin.home',array('vf' => 'dummy.json')); 
    210211 
    211212if ($core->auth->userID() && $core->blog !== null) 
  • inc/config.php.in

    r3137 r3260  
    5252define('DC_TPL_CACHE',path::real(dirname(__FILE__).'/..').'/cache'); 
    5353 
     54// Var directory 
     55define('DC_VAR',path::real(dirname(__FILE__).'/..').'/var'); 
     56 
    5457 
    5558// If you have PATH_INFO issue, uncomment following lines 
  • inc/core/class.dc.blog.php

    r3134 r3263  
    138138     { 
    139139          $ret = $this->getQmarkURL().'pf='.$pf; 
     140          if ($strip_host) { 
     141               $ret = html::stripHostURL($ret); 
     142          } 
     143          return $ret; 
     144     } 
     145 
     146     /** 
     147     Returns public URL of specified var file. 
     148      */ 
     149     public function getVF($vf, $strip_host=true) 
     150     { 
     151          $ret = $this->getQmarkURL().'vf='.$vf; 
    140152          if ($strip_host) { 
    141153               $ret = html::stripHostURL($ret); 
     
    20272039          } 
    20282040 
     2041          if (isset($params['comment_email'])) { 
     2042               $comment_email = $this->con->escape(str_replace('*','%',$params['comment_email'])); 
     2043               $strReq .= "AND comment_email LIKE '".$comment_email."' "; 
     2044          } 
     2045 
    20292046          if (isset($params['comment_site'])) { 
    20302047               $comment_site = $this->con->escape(str_replace('*','%',$params['comment_site'])); 
  • inc/dbschema/upgrade.php

    r3237 r3261  
    544544               @unlink(DC_ROOT.'/'.'admin/js/jsUpload/vendor/jquery.ui.widget.js'); 
    545545               @rmdir(DC_ROOT.'/'.'admin/js/jsUpload/vendor'); 
     546 
     547               # Create new var directory and its .htaccess file 
     548               @files::makeDir(DC_VAR); 
     549               $f = DC_VAR.'/.htaccess'; 
     550               if (!file_exists($f)) 
     551               { 
     552                    @file_put_contents($f,'Require all denied'."\n".'Deny from all'."\n"); 
     553               } 
    546554          } 
    547555 
  • inc/prepend.php

    r3255 r3260  
    197197     if (strlen(crypt::hmac(DC_MASTER_KEY,DC_VENDOR_NAME,DC_CRYPT_ALGO)) < 40) { 
    198198          if (!defined('DC_CONTEXT_ADMIN')) { 
    199                exit('Site temporarily unavailable'); 
     199               __error('Server error','Site temporarily unavailable'); 
    200200          } else { 
    201                exit(DC_CRYPT_ALGO.' cryptographic algorithm configured is not strong enough, please change it.'); 
    202           } 
     201               __error('Dotclear error',DC_CRYPT_ALGO.' cryptographic algorithm configured is not strong enough, please change it.'); 
     202          } 
     203          exit; 
     204     } 
     205} 
     206 
     207if (!defined('DC_VAR')) { 
     208     define('DC_VAR',path::real(dirname(__FILE__).'/..').'/var'); 
     209} 
     210// Check existence of var directory 
     211if (!is_dir(DC_VAR)) { 
     212     // Try to create it 
     213     @files::makeDir(DC_VAR); 
     214     if (!is_dir(DC_VAR)) { 
     215          // Admin must create it 
     216          if (!defined('DC_CONTEXT_ADMIN')) { 
     217               __error('Server error','Site temporarily unavailable'); 
     218          } else { 
     219               __error('Dotclear error',DC_VAR.' directory does not exist. Please create it.'); 
     220          } 
     221          exit; 
    203222     } 
    204223} 
  • inc/public/class.dc.template.php

    r3172 r3259  
    10951095     category  CDATA     #IMPLIED  -- get entries for specific categories only (multiple comma-separated categories can be specified. Use "!" as prefix to exclude a category) 
    10961096     no_category    CDATA     #IMPLIED  -- get entries without category 
     1097     with_category  CDATA     #IMPLIED  -- get entries with category 
    10971098     no_context (1|0)    #IMPLIED  -- Override context information 
    10981099     sortby    (title|selected|author|date|id)    #IMPLIED  -- specify entries sort criteria (default : date) (multiple comma-separated sortby can be specified. Use "?asc" or "?desc" as suffix to provide an order for each sorby) 
     
    11531154          } 
    11541155 
     1156          if (isset($attr['with_category']) && $attr['with_category']) { 
     1157               $p .= "@\$params['sql'] .= ' AND P.cat_id IS NOT NULL ';\n"; 
     1158          } 
     1159 
    11551160          if (isset($attr['no_category']) && $attr['no_category']) { 
    11561161               $p .= "@\$params['sql'] .= ' AND P.cat_id IS NULL ';\n"; 
  • inc/public/prepend.php

    r3059 r3260  
    1313if (!empty($_GET['pf'])) { 
    1414     require dirname(__FILE__).'/../load_plugin_file.php'; 
     15     exit; 
     16} 
     17 
     18if (!empty($_GET['vf'])) { 
     19     require dirname(__FILE__).'/../load_var_file.php'; 
    1520     exit; 
    1621} 
  • plugins/dcLegacyEditor/_define.php

    r3016 r3258  
    1616     /* Description*/         "dotclear legacy editor", 
    1717     /* Author */             "dotclear Team", 
    18      /* Version */            '0.1.3', 
     18     /* Version */            '0.1.4', 
    1919     array( 
    2020          'permissions' =>    'usage,contentadmin', 
  • plugins/dcLegacyEditor/css/jsToolBar/jsToolBar.css

    r2614 r3258  
    116116     background-image: url(?pf=dcLegacyEditor/css/jsToolBar/bt_code.png); 
    117117} 
     118button.jstb_mark { 
     119     background-image: url(?pf=dcLegacyEditor/css/jsToolBar/bt_mark.png); 
     120} 
    118121button.jstb_paragraph { 
    119122     background-image: url(?pf=dcLegacyEditor/css/jsToolBar/bt_paragraph.png); 
  • plugins/dcLegacyEditor/inc/dc.legacy.editor.behaviors.php

    r3024 r3258  
    112112          "jsToolBar.prototype.elements.quote.title = '".html::escapeJS(__('Inline quote'))."'; ". 
    113113          "jsToolBar.prototype.elements.code.title = '".html::escapeJS(__('Code'))."'; ". 
     114          "jsToolBar.prototype.elements.mark.title = '".html::escapeJS(__('Mark'))."'; ". 
    114115          "jsToolBar.prototype.elements.br.title = '".html::escapeJS(__('Line break'))."'; ". 
    115116          "jsToolBar.prototype.elements.blockquote.title = '".html::escapeJS(__('Blockquote'))."'; ". 
  • plugins/dcLegacyEditor/js/jsToolBar/jsToolBar.js

    r3003 r3258  
    429429}; 
    430430 
     431// code 
     432jsToolBar.prototype.elements.mark = { 
     433     type: 'button', 
     434     title: 'Mark', 
     435     fn: { 
     436          wiki: function() { this.singleTag('""') }, 
     437          xhtml: function() { this.singleTag('<mark>','</mark>')} 
     438     } 
     439}; 
     440 
    431441// spacer 
    432442jsToolBar.prototype.elements.space1 = { 
  • plugins/dcLegacyEditor/js/jsToolBar/jsToolBar.wysiwyg.js

    r2614 r3258  
    655655}; 
    656656 
     657jsToolBar.prototype.elements.mark.fn.wysiwyg = function() { 
     658     var n = this.getSelectedNode(); 
     659     var mark = this.iwin.document.createElement('mark'); 
     660     mark.appendChild(n); 
     661     this.insertNode(mark); 
     662}; 
     663 
    657664jsToolBar.prototype.elements.br.fn.wysiwyg = function() { 
    658665     var n = this.iwin.document.createElement('br'); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map