Dotclear


Ignore:
Files:
3 added
24 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r1216 r1350  
     1Dotclear 2.5.2 - 2013-08-14 
     2=========================================================== 
     3* Security fix: Fixed potential XSS 
     4* Bugfix: l10n Clearbricks library 
     5* <tpl:LoopPosition> now works <tpl:Attachments> 
     6* Dotclear update check may now be forced (ignoring cache) 
     7* Enforce integration of daInstaller plugin 
     8* Tags link button is now available on page editor 
     9* Default cache age is now 1 week instead of 2 hours 
     10* Quick entry dashboard module is not activated by default on new installation 
     11* New template {{tpl:BlogParentThemeURL}} (return URL of parent theme of blog's theme if any, URL of blog's theme otherwise) 
     12* Fix post comments number on comments deletion 
     13* Fix order of backup files 
     14* Minor enhancements 
     15* Various bug fixes 
     16* Various cosmetic adjustments 
     17 
    118Dotclear 2.5.1 - 2013-07-20 
    219=========================================================== 
  • Makefile

    r1046 r1451  
    6969     find $(DC)/admin/js/jquery/*.js -exec ./build-tools/min-js.php \{\} \; 
    7070     find $(DC)/admin/js/jsToolBar/*.js -exec ./build-tools/min-js.php \{\} \; 
     71     find $(DC)/admin/js/jsUpload/*.js -exec ./build-tools/min-js.php \{\} \; 
    7172     find $(DC)/admin/js/tool-man/*.js -exec ./build-tools/min-js.php \{\} \; 
    7273     find $(DC)/plugins -name '*.js' -exec ./build-tools/min-js.php \{\} \; 
  • admin/categories.php

    r1399 r1468  
    3131          $mov_cat = $mov_cat ? $mov_cat : null; 
    3232          if ($mov_cat !== null) { 
    33                $c = $core->blog->getCategory((integer) $_POST['del_cat']); 
     33               $c = $core->blog->getCategory((integer) $_POST['mov_cat']); 
    3434               if ($c->isEmpty()) { 
    3535                    throw new Exception(__('This category does not exist.')); 
     
    144144echo '</div>'; 
    145145 
     146$categories_combo = array(); 
     147if (!$rs->isEmpty()) 
     148{ 
     149     while ($rs->fetch()) { 
     150          $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     151               str_repeat('&nbsp;&nbsp;',$rs->level-1).($rs->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($rs->cat_title), 
     152               $rs->cat_id 
     153          ); 
     154     } 
     155} 
     156 
    146157echo '<div class="col">'. 
    147158 
     
    149160'<h3>'.__('Add a new category').'</h3>'. 
    150161'<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 
    151 form::field('cat_title',30,255).'</p>'. 
     162form::field('cat_title',30,255,'','maximal').'</p>'. 
    152163'<p><label for="new_cat_parent">'.__('Parent:').'</label> '. 
    153 '<select id="new_cat_parent" name="new_cat_parent">'. 
    154 '<option value="0">'.__('Top level').'</option>'; 
    155 while ($rs->fetch()) { 
    156      echo '<option value="'.$rs->cat_id.'">'. 
    157           str_repeat('&nbsp;&nbsp;',$rs->level-1).($rs->level-1 == 0 ? '' : '&bull; '). 
    158           html::escapeHTML($rs->cat_title).'</option>'; 
    159 } 
    160 echo 
    161 '</select></p>'. 
     164form::combo('new_cat_parent',array_merge(array(__('(No cat)') => 0),$categories_combo),'','maximal'). 
     165'</p>'. 
    162166'<p><input type="submit" value="'.__('Create').'" />'. 
    163167$core->formNonce().'</p>'. 
     168 
    164169'</form>'; 
    165170 
    166171if (!$rs->isEmpty()) 
    167172{ 
    168      $cats = array(); 
    169      $dest = array('&nbsp;' => ''); 
    170      $l = $rs->level; 
    171      $full_name = array($rs->cat_title); 
    172      while ($rs->fetch()) 
    173      { 
    174           if ($rs->level < $l) { 
    175                $full_name = array(); 
    176           } elseif ($rs->level == $l) { 
    177                array_pop($full_name); 
    178           } 
    179           $full_name[] = html::escapeHTML($rs->cat_title); 
    180            
    181           $cats[implode(' / ',$full_name)] = $rs->cat_id; 
    182           $dest[implode(' / ',$full_name)] = $rs->cat_id; 
    183            
    184           $l = $rs->level; 
    185      } 
    186       
    187173     echo 
    188      '<form action="categories.php" method="post" id="delete-category" class="border-top">'. 
     174     '<form action="categories.php" method="post" id="delete-category">'. 
    189175     '<h3>'.__('Remove a category').'</h3>'. 
    190176     '<p><label for="del_cat">'.__('Choose a category to remove:').'</label> '. 
    191      form::combo('del_cat',$cats).'</p> '. 
     177     form::combo('del_cat',$categories_combo,'','maximal').'</p> '. 
    192178     '<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').'</label> '. 
    193      form::combo('mov_cat',$dest).'</p> '. 
     179     form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</p> '. 
    194180     '<p><input type="submit" value="'.__('Delete').'" class="delete" />'. 
    195181     $core->formNonce().'</p>'. 
     182 
    196183     '</form>'; 
    197184      
  • admin/index.php

    r1422 r1468  
    5959if (!$core->auth->user_prefs->dashboard->prefExists('quickentry')) { 
    6060     if (!$core->auth->user_prefs->dashboard->prefExists('quickentry',true)) { 
    61           $core->auth->user_prefs->dashboard->put('quickentry',true,'boolean','',null,true); 
    62      } 
    63      $core->auth->user_prefs->dashboard->put('quickentry',true,'boolean'); 
     61          $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean','',null,true); 
     62     } 
     63     $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean'); 
    6464} 
    6565 
     
    309309     if ($core->auth->check('usage,contentadmin',$core->blog->id)) 
    310310     { 
    311           $categories_combo = array('&nbsp;' => ''); 
     311          # Getting categories 
     312          $categories_combo = array(__('(No cat)') => ''); 
    312313          try { 
    313314               $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    314                while ($categories->fetch()) { 
    315                     $categories_combo[] = new formSelectOption( 
    316                          str_repeat('&nbsp;&nbsp;',$categories->level-1). 
    317                          ($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    318                          $categories->cat_id 
    319                     ); 
     315               if (!$categories->isEmpty()) { 
     316                    while ($categories->fetch()) { 
     317                         $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     318                              str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     319                              $categories->cat_id 
     320                         ); 
     321                    } 
    320322               } 
    321323          } catch (Exception $e) { } 
     
    333335          form::textarea('post_content',50,7). 
    334336          '</p>'. 
    335           '<p><label for="cat_id" class="classic">'.__('Category:').'</label> '. 
    336           form::combo('cat_id',$categories_combo).'</p>'. 
     337          '<p><label for="cat_id" class="classic">'.__('Category:').' '. 
     338          form::combo('cat_id',$categories_combo).'</label></p>'. 
     339          ($core->auth->check('categories', $core->blog->id) 
     340               ? '<div>'. 
     341               '<p id="new_cat">'.__('Add a new category').'</p>'. 
     342               '<p><label for="new_cat_title">'.__('Title:').' '. 
     343               form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     344               '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     345               form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     346               '</label></p>'. 
     347               '</div>' 
     348               : ''). 
    337349          '<p><input type="submit" value="'.__('Save').'" name="save" /> '. 
    338350          ($core->auth->check('publish',$core->blog->id) 
  • admin/js/_index.js

    r1140 r1418  
    6161               }); 
    6262          } 
     63          $('#new_cat').toggleWithLegend( 
     64               $('#new_cat').parent().children().not('#new_cat'), 
     65               {} // no cookie on new category as we don't use this every day 
     66          ); 
    6367     } 
    6468 
  • admin/js/_post.js

    r1392 r1468  
    115115               hide: $('#post_notes').val() == '' 
    116116          }); 
     117          $('#new_cat').toggleWithLegend( 
     118               $('#new_cat').parent().children().not('#new_cat'), 
     119               {} // no cookie on new category as we don't use this every day 
     120          ); 
    117121          $('#post_lang').parent().toggleWithLegend($('#post_lang'),{ 
    118122               cookie: 'dcx_post_lang' 
  • admin/js/_posts_actions.js

    r1035 r1419  
    66          matchContains: true 
    77     }); 
     8     $('#new_cat').toggleWithLegend( 
     9          $('#new_cat').parent().children().not('#new_cat'), 
     10          {} // no cookie on new category as we don't use this every day 
     11     ); 
    812}); 
  • admin/js/_users_actions.js

    r935 r1449  
    11jQuery.fn.updatePermissionsForm = function() { 
    22     return this.each(function() { 
     3           
    34          var perms = {}; 
    45          var re = /^perm\[(.+?)\]\[(.+?)\]$/; 
     
    1213                    continue; 
    1314               } 
     15               var prop; 
    1416               prop = e.name.match(re); 
    1517               if (!prop) { 
     
    2022               } 
    2123               perms[prop[1]][prop[2]] = e; 
     24                
     25               // select related permissions for admin 
     26               if (prop[2] == 'admin') { 
     27                    if (e.checked) { 
     28                         admin(e,perms,re); 
     29                    } 
     30                    $(e).click(function(){ 
     31                         admin(this,perms,re); 
     32                    }); 
     33               // select related permissions for content admin 
     34               } else if (prop[2] == 'contentadmin') { 
     35                    if (e.checked) { 
     36                         contentadmin(e,perms,re); 
     37                    } 
     38                    $(e).click(function(){ 
     39                         contentadmin(this,perms,re); 
     40                    }); 
     41               // select related permissions for media admin 
     42               } else if (prop[2] == 'media_admin') { 
     43                    if (e.checked) { 
     44                         mediaadmin(e,perms,re); 
     45                    } 
     46                    $(e).click(function(){ 
     47                         mediaadmin(this,perms,re); 
     48                    }); 
     49               } 
    2250          } 
    2351           
    24           // Update elements status 
    25           var E; 
    26           for (blog in perms) { 
    27                for (perm in perms[blog]) { 
    28                     E = perms[blog][perm]; 
    29                     E.onclick = function() {}; 
    30                      
    31                     if (perm == 'admin' && !E.disabled) { 
    32                          perms[blog]['usage'].disabled = E.checked; 
    33                          perms[blog]['publish'].disabled = E.checked; 
    34                          perms[blog]['delete'].disabled = E.checked; 
    35                          perms[blog]['contentadmin'].disabled = E.checked; 
    36                          perms[blog]['categories'].disabled = E.checked; 
    37                          perms[blog]['media'].disabled = E.checked; 
    38                          perms[blog]['media_admin'].disabled = E.checked; 
    39                          E.onclick = function() { $(this.form).updatePermissionsForm(); }; 
    40                     } else if (perm == 'contentadmin' && !E.disabled) { 
    41                          perms[blog]['usage'].checked = E.checked; 
    42                          perms[blog]['publish'].checked = E.checked; 
    43                          perms[blog]['delete'].checked = E.checked; 
    44                          perms[blog]['usage'].disabled = E.checked; 
    45                          perms[blog]['publish'].disabled = E.checked; 
    46                          perms[blog]['delete'].disabled = E.checked; 
    47                          E.onclick = function() { $(this.form).updatePermissionsForm(); }; 
    48                     } else if (perm == 'media_admin' && !E.disabled) { 
    49                          perms[blog]['media'].checked = E.checked; 
    50                          perms[blog]['media'].disabled = E.checked; 
    51                          E.onclick = function() { $(this.form).updatePermissionsForm(); }; 
    52                     } 
    53                } 
     52          function admin(E,perms,re) { 
     53                         P = E.name.match(re); 
     54                          
     55                         perms[P[1]]['usage'].checked = E.checked; 
     56                         perms[P[1]]['publish'].checked = E.checked; 
     57                         perms[P[1]]['delete'].checked = E.checked; 
     58                         perms[P[1]]['contentadmin'].checked = E.checked; 
     59                         perms[P[1]]['categories'].checked = E.checked; 
     60                         perms[P[1]]['media'].checked = E.checked; 
     61                         perms[P[1]]['media_admin'].checked = E.checked; 
     62                         perms[P[1]]['usage'].disabled = E.checked; 
     63                         perms[P[1]]['publish'].disabled = E.checked; 
     64                         perms[P[1]]['delete'].disabled = E.checked; 
     65                         perms[P[1]]['contentadmin'].disabled = E.checked; 
     66                         perms[P[1]]['categories'].disabled = E.checked; 
     67                         perms[P[1]]['media'].disabled = E.checked; 
     68                         perms[P[1]]['media_admin'].disabled = E.checked; 
    5469          } 
     70           
     71          function contentadmin(E,perms,re) { 
     72                         P = E.name.match(re); 
     73                          
     74                         perms[P[1]]['usage'].checked = E.checked; 
     75                         perms[P[1]]['publish'].checked = E.checked; 
     76                         perms[P[1]]['delete'].checked = E.checked; 
     77                         perms[P[1]]['usage'].disabled = E.checked; 
     78                         perms[P[1]]['publish'].disabled = E.checked; 
     79                         perms[P[1]]['delete'].disabled = E.checked; 
     80          } 
     81           
     82          function mediaadmin(E,perms,re) { 
     83                         P = E.name.match(re); 
     84                          
     85                         perms[P[1]]['media'].checked = E.checked; 
     86                         perms[P[1]]['media'].disabled = E.checked; 
     87          } 
     88           
     89           
    5590     }); 
    5691}; 
  • admin/post.php

    r1460 r1468  
    218218if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post && !$bad_dt) 
    219219{ 
     220     # Create category 
     221     if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) { 
     222      
     223          $cur_cat = $core->con->openCursor($core->prefix.'category'); 
     224          $cur_cat->cat_title = $_POST['new_cat_title']; 
     225          $cur_cat->cat_url = ''; 
     226           
     227          $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 
     228           
     229          # --BEHAVIOR-- adminBeforeCategoryCreate 
     230          $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
     231           
     232          $cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
     233           
     234          # --BEHAVIOR-- adminAfterCategoryCreate 
     235          $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $cat_id); 
     236     } 
     237      
    220238     $cur = $core->con->openCursor($core->prefix.'post'); 
    221239      
     
    283301     } 
    284302} 
     303 
     304# Getting categories 
     305$categories_combo = array(__('(No cat)') => ''); 
     306try { 
     307     $categories = $core->blog->getCategories(array('post_type'=>'post')); 
     308     if (!$categories->isEmpty()) { 
     309          while ($categories->fetch()) { 
     310               $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     311                    str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     312                    $categories->cat_id 
     313               ); 
     314          } 
     315     } 
     316} catch (Exception $e) { } 
    285317 
    286318/* DISPLAY 
     
    423455                         '<p><label for="cat_id" class="ib">'.__('Category').'</label>'. 
    424456                         form::combo('cat_id',$categories_combo,$cat_id,'maximal'). 
    425                          '</p>')), 
     457                         '</p>'. 
     458                         ($core->auth->check('categories', $core->blog->id) ? 
     459                              '<div>'. 
     460                              '<p id="new_cat">'.__('Add a new category').'</p>'. 
     461                              '<p><label for="new_cat_title">'.__('Title:').' '. 
     462                              form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     463                              '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     464                              form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     465                              '</label></p>'. 
     466                              '</div>' 
     467                         : ''))), 
    426468          'options-box' => array( 
    427469               'title' => __('Options'), 
  • admin/posts_actions.php

    r1472 r1473  
    243243     elseif ($action == 'category' && isset($_POST['new_cat_id'])) 
    244244     { 
     245          $new_cat_id = $_POST['new_cat_id']; 
     246           
    245247          try 
    246248          { 
    247                $core->blog->updPostsCategory($posts_ids,$_POST['new_cat_id']); 
     249               if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) 
     250               { 
     251                    $cur_cat = $core->con->openCursor($core->prefix.'category'); 
     252                    $cur_cat->cat_title = $_POST['new_cat_title']; 
     253                    $cur_cat->cat_url = ''; 
     254                     
     255                    $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 
     256                     
     257                    # --BEHAVIOR-- adminBeforeCategoryCreate 
     258                    $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
     259                     
     260                    $new_cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
     261                     
     262                    # --BEHAVIOR-- adminAfterCategoryCreate 
     263                    $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $new_cat_id); 
     264               } 
     265                
     266               $core->blog->updPostsCategory($posts_ids, $new_cat_id); 
    248267                
    249268               http::redirect($redir); 
     
    387406     # categories list 
    388407     # Getting categories 
    389      $categories_combo = array('&nbsp;' => ''); 
     408     $categories_combo = array(__('(No cat)') => ''); 
    390409     try { 
    391410          $categories = $core->blog->getCategories(array('post_type'=>'post')); 
     411          if (!$categories->isEmpty()) { 
    392412          while ($categories->fetch()) { 
    393                $categories_combo[] = new formSelectOption( 
    394                     str_repeat('&nbsp;&nbsp;',$categories->level-1). 
    395                     ($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     413                    $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     414                         str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    396415                    $categories->cat_id 
    397416               ); 
     417          } 
    398418          } 
    399419     } catch (Exception $e) { } 
     
    402422     '<form action="posts_actions.php" method="post">'. 
    403423     $fields->getEntries(). 
    404      '<p><label for="new_cat_id" class="classic">'.__('Category:').' '. 
    405      form::combo('new_cat_id',$categories_combo,''). 
    406      '</label> '; 
     424     '<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '. 
     425     form::combo('new_cat_id',$categories_combo,''); 
     426      
     427     if ($core->auth->check('categories', $core->blog->id)) { 
     428          echo  
     429          '<div>'. 
     430          '<p id="new_cat">'.__('Add a new category').'</p>'. 
     431          '<p><label for="new_cat_title">'.__('Title:').' '. 
     432          form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     433          '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     434          form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     435          '</label></p>'. 
     436          '</div>'; 
     437     } 
    407438      
    408439     echo 
     
    440471     echo 
    441472     '<form action="posts_actions.php" method="post">'. 
    442      $fields->getEntries().    
    443      '<p><label for="new_lang" class="classic">'.__('Entry lang:').' '. 
    444      form::combo('new_lang',$lang_combo,''). 
    445      '</label> '; 
     473     $fields->getEntries(). 
     474      
     475     '<p><label for="new_lang" class="classic">'.__('Entry lang:').'</label> '. 
     476     form::combo('new_lang',$lang_combo,''); 
    446477      
    447478     echo 
     
    465496     '<form action="posts_actions.php" method="post">'. 
    466497     $fields->getEntries(). 
    467      '<p><label for="new_auth_id" class="classic">'.__('Author ID:').' '. 
    468      form::field('new_auth_id',20,255). 
    469      '</label> '; 
     498     '<p><label for="new_auth_id" class="classic">'.__('Author ID:').'</label> '. 
     499     form::field('new_auth_id',20,255); 
    470500      
    471501     echo 
  • admin/preferences.php

    r1399 r1468  
    344344     ($user_acc_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')). 
    345345     dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     346     dcPage::jsLoad('js/jquery/jquery.pwstrength.js'). 
     347          '<script type="text/javascript">'."\n". 
     348          "//<![CDATA[\n". 
     349          "\$(function() {\n". 
     350          "    \$('#new_pwd').pwstrength({texts: ['". 
     351                    sprintf(__('Password strength: %s'),__('very weak'))."', '". 
     352                    sprintf(__('Password strength: %s'),__('weak'))."', '". 
     353                    sprintf(__('Password strength: %s'),__('mediocre'))."', '". 
     354                    sprintf(__('Password strength: %s'),__('strong'))."', '". 
     355                    sprintf(__('Password strength: %s'),__('very strong'))."']});\n". 
     356          "});\n". 
     357          "\n//]]>\n". 
     358          "</script>\n". 
    346359     dcPage::jsPageTabs($default_tab). 
    347360     dcPage::jsConfirmClose('user-form'). 
     
    420433     '<legend>'.__('Change your password').'</legend>'. 
    421434      
    422      '<p><label for="new_pwd">'.__('New password:').'</label>'. 
    423      form::password('new_pwd',20,255).'</p>'. 
     435     '<div class="pw-table">'. 
     436     '<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'. 
     437     form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'. 
     438     '<div id="pwindicator">'. 
     439     '    <div class="bar"></div>'. 
     440     '    <p class="label no-margin"></p>'. 
     441     '</div>'. 
     442     '</div>'. 
    424443      
    425444     '<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'. 
  • admin/style/default.css

    r1465 r1470  
    481481#icons a img { 
    482482     padding: 2em; 
    483      background: #eee; 
    484      border-radius: 1.6rem; 
    485      box-shadow: 0 3px 3px 0 #ccc; 
    486      margin-bottom: .6rem; 
     483     margin-bottom: .3em; 
     484     -moz-box-shadow: 0px 1px 0px 0px #ffffff; 
     485     -webkit-box-shadow: 0px 1px 0px 0px #ffffff; 
     486     box-shadow: 0px 1px 0px 0px #ffffff; 
     487     background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) ); 
     488     background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% ); 
     489     filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9'); 
     490     background-color:#f9f9f9; 
     491     -moz-border-radius:1em; 
     492     -webkit-border-radius:1em; 
     493     border-radius:1em; 
     494     border:1px solid #dcdcdc; 
     495     display:inline-block; 
    487496} 
    488497#icons a img:hover, #icons a:focus img { 
    489      background-color: #BBDB58; 
     498     background: #BBDB58; 
    490499} 
    491500#icons a:focus span, #icons a:hover span { 
     
    501510#quick p.qinfo { 
    502511     margin: -.7em -1em 1em; 
    503      background: #eef url(info.png) no-repeat .2em .2em; 
     512     background: #f3f3ff url(info.png) no-repeat .2em .2em; 
    504513     border: 1px solid #99f; 
    505514     padding: .2em 1em .1em 24px; 
     
    541550} 
    542551 
     552#upg-notify { 
     553} 
     554#upg-notify ul { 
     555     padding-left: 15px; 
     556} 
     557#upg-notify li { 
     558     color: #fff; 
     559} 
    543560/* ------------------------------------------------------------------ post */ 
    544561#entry-wrapper { 
     
    12011218} 
    12021219table.settings th, table.prefs th { 
    1203      background: #eef; 
     1220     background: #f3f3ff; 
    12041221} 
    12051222table.settings th:first-child, table.prefs th:first-child { 
     
    14201437     text-decoration: none; 
    14211438     padding: .1em .5em; 
    1422      text-shadow: 0 1px 1px rgba(0,0,0,.3); 
    14231439     border-radius: .2em; 
    14241440     margin-bottom: .1em; 
    1425 } 
     1441     font-size: 1.2rem; 
     1442 } 
    14261443h4 a.button {font-weight: normal;} 
    14271444 
     
    14311448a.submit { 
    14321449     color: #fff; 
    1433      border: 1px solid #2373A8; 
    1434      background: #2373A8; 
    1435      background: -webkit-gradient(linear, left top, left bottom, from(#2C8FD1), to(#2373A8)); 
    1436      background: -moz-linear-gradient(top,  #2C8FD1,  #2373A8); 
     1450     border: 1px solid #A2CBE9; 
     1451     text-shadow: 0 -1px 1px #3275bc; 
     1452     background:#25A6E1; 
     1453     background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%); 
     1454     background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0)); 
     1455     background:linear-gradient(top,#25A6E1 0%,#188BC0 100%); 
     1456     filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#188BC0',GradientType=0); 
     1457     border:1px solid #1A87B9 
     1458 
    14371459} 
    14381460input[type=submit]:hover, 
     
    14421464input[type=button]:focus, 
    14431465a.submit:focus { 
    1444      background: #2373A8; 
    1445      background: -webkit-gradient(linear, left top, left bottom, from(#2373A8), to(#2C8FD1)); 
    1446      background: -moz-linear-gradient(top,  #2373A8,  #2C8FD1); 
    1447      filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#2373A8', endColorstr='#2C8FD1'); 
     1466     background:#188BC0; 
     1467     background:-moz-linear-gradient(top,#188BC0 0%,#25A6E1 100%); 
     1468     background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#188BC0),color-stop(100%,#25A6E1)); 
     1469     background:linear-gradient(top,#188BC0 0%,#25A6E1 100%); 
     1470     filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#25A6E1',GradientType=0); 
    14481471     border: 1px solid #2C8FD1; 
    14491472} 
     
    14571480     background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#dfdfdf)); 
    14581481     background: -moz-linear-gradient(top,  #f5f5f5,  #dfdfdf); 
    1459      text-shadow: none; 
     1482     text-shadow:1px 1px 0px #fff; 
    14601483     } 
    14611484a.button:hover, 
     
    16151638     border-color : #ccc; 
    16161639     background-color: #fff; 
     1640} 
     1641 
     1642/* --------------------------------------------------------------- password indcator */ 
     1643.pw-table { 
     1644     display: table; 
     1645     margin-bottom: 1em; 
     1646} 
     1647.pw-cell { 
     1648     display: table-cell; 
     1649     margin-bottom: 1em; 
     1650} 
     1651#pwindicator { 
     1652     display: table-cell; 
     1653     vertical-align: bottom; 
     1654     padding-left: 1.5em; 
     1655     height: 3.8em; 
     1656} 
     1657#pwindicator .bar { 
     1658     height: 6px; 
     1659     margin-bottom: 4px; 
     1660} 
     1661.pw-very-weak .bar { 
     1662     background: #900; 
     1663     width: 30px; 
     1664} 
     1665.pw-weak .bar { 
     1666     background: #c00; 
     1667     width: 60px; 
     1668} 
     1669.pw-mediocre .bar { 
     1670     background: #f60; 
     1671     width: 90px; 
     1672} 
     1673.pw-strong .bar { 
     1674     background: #060; 
     1675     width: 120px; 
     1676} 
     1677.pw-very-strong .bar { 
     1678     background: #0c0; 
     1679     width: 150px; 
    16171680} 
    16181681 
  • admin/update.php

    r1358 r1469  
    2727 
    2828$updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 
    29 $new_v = $updater->check(DC_VERSION); 
     29$new_v = $updater->check(DC_VERSION, !empty($_GET['nocache'])); 
    3030$zip_file = $new_v ? DC_BACKUP_PATH.'/'.basename($updater->getFileURL()) : ''; 
    3131$version_info = $new_v ? $updater->getInfoURL() : ''; 
     
    168168-------------------------------------------------------- */ 
    169169dcPage::open(__('Dotclear update'), 
    170      (!$step ? dcPage::jsPageTabs($default_tab) : ''), 
     170     (!$step ?  
     171          dcPage::jsPageTabs($default_tab). 
     172          dcPage::jsLoad('js/_update.js') 
     173          : ''), 
    171174     dcPage::breadcrumb( 
    172175          array( 
     
    176179); 
    177180 
     181if (!$core->error->flag()) { 
     182     if (!empty($_GET['nocache'])) { 
     183          dcPage::message(__('Manual checking of update done successfully.')); 
     184     } 
     185} 
     186 
    178187if (!$step) 
    179188{ 
     
    181190     if (empty($new_v)) 
    182191     { 
    183           echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'; 
     192          echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'. 
     193          '<form action="'.$p_url.'" method="get">'. 
     194          '<p><input type="hidden" name="nocache" value="1" />'. 
     195          '<input type="submit" value="'.__('Force checking update Dotclear').'" /></p>'. 
     196          '</form>'; 
    184197     } 
    185198     else 
  • inc/admin/lib.dc.page.php

    r1461 r1468  
    164164          if ($core->error->flag()) { 
    165165               echo 
    166                '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</p></strong>'. 
     166               '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong></p>'. 
    167167               $core->error->toHTML(). 
    168168               '</div>'; 
     
    508508          self::jsVar('dotclear.msg.confirm_delete_theme', 
    509509               __('Are you sure you want to delete "%s" theme?')). 
     510          self::jsVar('dotclear.msg.confirm_delete_backup', 
     511               __('Are you sure you want to delete this backup?')). 
    510512          self::jsVar('dotclear.msg.zip_file_content', 
    511513               __('Zip file content')). 
  • inc/admin/lib.pager.php

    r1415 r1468  
    8787               html::escapeHTML($this->rs->cat_title)); 
    8888          } else { 
    89                $cat_title = __('None'); 
     89               $cat_title = __('(No cat)'); 
    9090          } 
    9191           
  • inc/core/class.dc.blog.php

    r1353 r1468  
    634634     private function checkCategory($title,$url,$id=null) 
    635635     { 
    636           $strReq = 'SELECT cat_id '. 
    637                     'FROM '.$this->prefix.'category '. 
    638                     "WHERE cat_url = '".$this->con->escape($url)."' ". 
    639                     "AND blog_id = '".$this->con->escape($this->id)."' "; 
    640            
    641           if ($id !== null) { 
    642                $strReq .= 'AND cat_id <> '.(integer) $id.' '; 
    643           } 
     636          # Let's check if URL is taken... 
     637          $strReq =  
     638               'SELECT cat_url FROM '.$this->prefix.'category '. 
     639               "WHERE cat_url = '".$this->con->escape($url)."' ". 
     640               ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 
     641               "AND blog_id = '".$this->con->escape($this->id)."' ". 
     642               'ORDER BY cat_url DESC'; 
    644643           
    645644          $rs = $this->con->select($strReq); 
    646645           
    647           if (!$rs->isEmpty()) { 
    648                throw new Exception(__('Category URL must be unique.')); 
    649           } 
     646          if (!$rs->isEmpty()) 
     647          { 
     648               if ($this->con->driver() == 'mysql') { 
     649                    $clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'"; 
     650               } elseif ($this->con->driver() == 'pgsql') { 
     651                    $clause = "~ '^".$this->con->escape($url)."[0-9]+$'"; 
     652               } else { 
     653                    $clause = "LIKE '".$this->con->escape($url)."%'"; 
     654               } 
     655               $strReq =  
     656                    'SELECT cat_url FROM '.$this->prefix.'category '. 
     657                    "WHERE cat_url ".$clause.' '. 
     658                    ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 
     659                    "AND blog_id = '".$this->con->escape($this->id)."' ". 
     660                    'ORDER BY cat_url DESC '; 
     661                
     662               $rs = $this->con->select($strReq); 
     663               $a = array(); 
     664               while ($rs->fetch()) { 
     665                    $a[] = $rs->cat_url; 
     666               } 
     667                
     668               natsort($a); 
     669               $t_url = end($a); 
     670                
     671               if (preg_match('/(.*?)([0-9]+)$/',$t_url,$m)) { 
     672                    $i = (integer) $m[2]; 
     673                    $url = $m[1]; 
     674               } else { 
     675                    $i = 1; 
     676               } 
     677                
     678               return $url.($i+1); 
     679          } 
     680           
     681          # URL is empty? 
     682          if ($url == '') { 
     683               throw new Exception(__('Empty category URL')); 
     684          } 
     685           
     686          return $url; 
    650687     } 
    651688      
     
    669706           
    670707          # Check if title or url are unique 
    671           $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 
     708          $cur->cat_url = $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 
    672709           
    673710          if ($cur->cat_desc !== null) { 
  • inc/core/class.dc.media.php

    r1280 r1468  
    3030      
    3131     public $thumb_tp = '%s/.%s_%s.jpg';     ///< <b>string</b> Thumbnail file pattern 
     32     public $thumb_tp_alpha = '%s/.%s_%s.png'; ///< <b>string</b> Thumbnail file pattern (with alpha layer) 
    3233      
    3334     /** 
     
    298299               $f->media_thumb = array(); 
    299300               $p = path::info($f->relname); 
    300                $thumb = sprintf($this->thumb_tp,$this->root.'/'.$p['dirname'],$p['base'],'%s'); 
    301                $thumb_url = sprintf($this->thumb_tp,$this->root_url.$p['dirname'],$p['base'],'%s'); 
     301               $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     302               $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$this->root.'/'.$p['dirname'],$p['base'],'%s'); 
     303               $thumb_url = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$this->root_url.$p['dirname'],$p['base'],'%s'); 
    302304                
    303305               # Cleaner URLs 
     
    920922           
    921923          $p = path::info($file); 
    922           $thumb = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     924          $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     925          $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    923926           
    924927          try 
     
    939942                         $rate = ($s[0] < 100 ? 95 : ($s[0] < 600 ? 90 : 85)); 
    940943                         $img->resize($s[0],$s[0],$s[1]); 
    941                          $img->output('jpeg',$thumb_file,$rate); 
     944                         $img->output(($alpha ? 'png' : 'jpeg'),$thumb_file,$rate); 
    942945                         $img->loadImage($file); 
    943946                    } 
     
    958961          { 
    959962               $p = path::info($file->relname); 
    960                $thumb_old = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     963               $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     964               $thumb_old = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    961965                
    962966               $p = path::info($newFile->relname); 
    963                $thumb_new = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     967               $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     968               $thumb_new = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    964969                
    965970               foreach ($this->thumb_sizes as $suffix => $s) { 
     
    974979     { 
    975980          $p = path::info($f); 
    976           $thumb = sprintf($this->thumb_tp,'',$p['base'],'%s'); 
     981          $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     982          $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),'',$p['base'],'%s'); 
    977983           
    978984          foreach ($this->thumb_sizes as $suffix => $s) { 
  • locales/en/main.po

    r1425 r1468  
    21392139msgstr "" 
    21402140 
     2141msgid "Are you sure you want to delete this backup?" 
     2142msgstr "" 
     2143 
    21412144msgid "Zip file content" 
    21422145msgstr "" 
     
    27872790msgid "The following error was encountered while trying to read the database:" 
    27882791msgstr "" 
     2792 
     2793msgid "(No cat)" 
     2794msgstr "(none)" 
  • locales/fr/main.po

    r1454 r1470  
    10381038#, fuzzy, php-format 
    10391039msgid "Path <strong>%s</strong> is not writable." 
    1040 msgstr "Le répertoire de cache %s n'est pas accessible en écriture." 
     1040msgstr "Le répertoire de cache <strong>%s</strong> n'est pas accessible en écriture." 
    10411041 
    10421042#, fuzzy 
     
    11931193msgstr "Gestionnaire de médias" 
    11941194 
     1195msgid "Go to %s folder" 
     1196msgstr "Aller au dossier %s" 
     1197 
     1198msgid "Media details of %s" 
     1199msgstr "Détails du média %s" 
     1200 
    11951201msgid "confirm removal" 
    11961202msgstr "Confirmer la suppression" 
     
    19942000msgstr "Les fichiers suivants de votre installation de Dotclear ne peuvent pas être écrits. Veuillez corriger la situation ou <a href=\"http://fr.dotclear.org/download\">mettre à jour manuellement</a>." 
    19952001 
     2002msgid "Manual checking of update done successfully." 
     2003msgstr "Vérification manuelle de mise à jour effectuée avec succès." 
     2004 
    19962005msgid "No newer Dotclear version available." 
    19972006msgstr "Aucune nouvelle version de Dotclear n'est disponible." 
    19982007 
     2008msgid "Force checking update Dotclear" 
     2009msgstr "Forcer la vérification de mise à jour de Dotclear" 
     2010 
    19992011#, php-format 
    20002012msgid "Dotclear %s is available." 
     
    21332145#, fuzzy 
    21342146msgid "Go to the content" 
    2135 msgstr "Voir ce billet sur le site" 
     2147msgstr "Aller au contenu" 
    21362148 
    21372149#, fuzzy 
    21382150msgid "Go to the menu" 
    2139 msgstr "Aller sur le site" 
     2151msgstr "Aller au menu" 
    21402152 
    21412153msgid "Go to site" 
     
    22012213 
    22022214msgid "Users with posts cannot be deleted." 
    2203 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être effacées." 
     2215msgstr "Les utilisateurs ayant écrit des billets ne peuvent être supprimés." 
    22042216 
    22052217#, php-format 
     
    22432255msgstr "Êtes-vous certain de vouloir supprimer le thème \"%s\" ?" 
    22442256 
     2257msgid "Are you sure you want to delete this backup?" 
     2258msgstr "Êtes-vous certain de vouloir supprimer cette sauvegarde ?" 
     2259 
    22452260msgid "Zip file content" 
    22462261msgstr "Contenu du fichier zip" 
     
    22582273msgstr "Vous avez des modifications non sauvegardées. Changer de format vous fera perdre ces modifications. Continuer ?" 
    22592274 
     2275msgid "Warning: post format change will not convert existing content. You will need to apply new format by yourself. Proceed anyway?" 
     2276msgstr "Attention : le changement de syntaxe ne transformera pas les balises des contenus déjà saisis. Pensez à les réadapter après cette opération. Confirmez-vous ce changement de syntaxe ?" 
     2277 
    22602278msgid "Loading enhanced uploader, please wait." 
    22612279msgstr "Chargement de l'interface avancée." 
     
    25062524#, fuzzy 
    25072525msgid "You are not allowed to reset categories order" 
    2508 msgstr "Vous n'êtes pas autorisé à supprimer des catégories" 
     2526msgstr "Vous n'êtes pas autorisé à réinitialiser l'ordre des catégories" 
    25092527 
    25102528msgid "Category URL must be unique." 
     
    30343052msgstr "Filtrer la liste des commentaires et rétroliens" 
    30353053 
     3054msgid "comments per page" 
     3055msgstr "commentaires par page" 
     3056 
    30363057msgid "Filter users list" 
    30373058msgstr "Filtrer la liste des utilisateurs" 
     
    30603081msgid "Add an introduction to the page." 
    30613082msgstr "Ajoute une introduction à la page." 
     3083 
     3084msgid "(No cat)" 
     3085msgstr "(aucune)" 
     3086 
     3087msgid "Password strength: %s" 
     3088msgstr "Force du mot de passe : %s" 
     3089 
     3090msgid "very weak" 
     3091msgstr "très faible" 
     3092 
     3093msgid "weak" 
     3094msgstr "faible" 
     3095 
     3096msgid "mediocre" 
     3097msgstr "moyen" 
     3098 
     3099msgid "strong" 
     3100msgstr "fort" 
     3101 
     3102msgid "very strong" 
     3103msgstr "très fort" 
  • locales/fr/plugins.po

    r1396 r1468  
    11661166msgstr "Pages" 
    11671167 
     1168msgid "My first page" 
     1169msgstr "Ma première page" 
     1170 
     1171msgid "This is your first page. When you\'re ready to blog, log in to edit or delete it." 
     1172msgstr "Ceci est votre première page. Quand vous serez prêt à bloguer, connectez-vous pour l'éditer ou la supprimer." 
     1173 
    11681174#, php-format 
    11691175msgid "%d page" 
  • plugins/antispam/filters/class.dc.filter.iplookup.php

    r1454 r1468  
    4444          } 
    4545 
    46           $match = array(); 
    47  
    4846          $bls = $this->getServers(); 
    4947          $bls = preg_split('/\s*,\s*/',$bls); 
    5048 
    51           foreach ($bls as $bl) 
    52           { 
     49          foreach ($bls as $bl) { 
    5350               if ($this->dnsblLookup($ip,$bl)) { 
    54                     $match[] = $bl; 
     51                    // Pass by reference $status to contain matching DNSBL 
     52                    $status = $bl; 
     53                    return true; 
    5554               } 
    56           } 
    57  
    58           if (!empty($match)) { 
    59                $status = substr(implode(', ',$match),0,128); 
    60                return true; 
    6155          } 
    6256     } 
  • plugins/antispam/filters/class.dc.filter.linkslookup.php

    r1179 r1366  
    6464     private function getLinks($text) 
    6565     { 
    66           $res = array(); 
    67            
    68           # href attribute on "a" tags 
    69           if (preg_match_all('/<a ([^>]+)>/ms', $text, $match, PREG_SET_ORDER)) 
    70           { 
    71                for ($i = 0; $i<count($match); $i++) 
    72                { 
    73                     if (preg_match('/href="(http:\/\/[^"]+)"/ms', $match[$i][1], $matches)) { 
    74                          $res[] = $matches[1]; 
    75                     } 
    76                } 
    77           } 
    78            
    79           return $res; 
     66          // href attribute on "a" tags is second match 
     67          preg_match_all('|<a.*?href="(http.*?)"|', $text, $parts); 
     68 
     69          return $parts[1]; 
    8070     } 
    8171} 
  • plugins/attachments/_admin.php

    r1398 r1468  
    4141                    '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'. 
    4242                    '<ul>'. 
    43                     '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'"'. 
     43                    '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'" '. 
    4444                    'title="'.$f->basename.'">'.$ftitle.'</a></li>'. 
    4545                    '<li>'.$f->media_dtstr.'</li>'. 
  • plugins/pages/_define.php

    r1179 r1442  
    1616     /* Description*/    "Serve entries as simple web pages", 
    1717     /* Author */        "Olivier Meunier", 
    18      /* Version */       '1.2', 
     18     /* Version */       '1.3', 
    1919     array( 
    2020          'permissions' =>    'contentadmin,pages', 
     
    2222     ) 
    2323); 
    24 ?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map