Dotclear


Ignore:
Files:
3 added
29 edited

Legend:

Unmodified
Added
Removed
  • .hgsubstate

    r1321 r1485  
    1 106856ffd55945d2be60e5f623c587c3fb356447 inc/libs/clearbricks 
     1716e99c54652d08c2e4395d5179e817e0f98182d inc/libs/clearbricks 
  • .hgtags

    r1219 r1351  
    1313514d5121a12586b7ff320924d44028b677a01020 2.4.4 
    1414baf879af43beea9764d920c2facd7226e90c5cf3 2.5.1 
     15cfad9f2a9f6ec03206ff5db91985208e833a7528 2.5.2 
  • 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

    r1179 r1421  
    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.')); 
     
    141141echo '</div>'; 
    142142 
     143$categories_combo = array(); 
     144if (!$rs->isEmpty()) 
     145{ 
     146     while ($rs->fetch()) { 
     147          $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     148               str_repeat('&nbsp;&nbsp;',$rs->level-1).($rs->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($rs->cat_title), 
     149               $rs->cat_id 
     150          ); 
     151     } 
     152} 
     153 
    143154echo '<div class="col">'. 
    144155 
     
    146157'<fieldset><legend>'.__('Add a new category').'</legend>'. 
    147158'<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').' '. 
    148 form::field('cat_title',30,255).'</label></p>'. 
     159form::field('cat_title',30,255,'','maximal').'</label></p>'. 
    149160'<p><label for="new_cat_parent">'.__('Parent:').' '. 
    150 '<select id="new_cat_parent" name="new_cat_parent">'. 
    151 '<option value="0">'.__('Top level').'</option>'; 
    152 while ($rs->fetch()) { 
    153      echo '<option value="'.$rs->cat_id.'">'. 
    154           str_repeat('&nbsp;&nbsp;',$rs->level-1).($rs->level-1 == 0 ? '' : '&bull; '). 
    155           html::escapeHTML($rs->cat_title).'</option>'; 
    156 } 
    157 echo 
    158 '</select></label></p>'. 
     161form::combo('new_cat_parent',array_merge(array(__('(No cat)') => 0),$categories_combo),'','maximal'). 
     162'</label></p>'. 
    159163'<p><input type="submit" value="'.__('Create').'" /></p>'. 
    160164$core->formNonce(). 
     
    164168if (!$rs->isEmpty()) 
    165169{ 
    166      $cats = array(); 
    167      $dest = array('&nbsp;' => ''); 
    168      $l = $rs->level; 
    169      $full_name = array($rs->cat_title); 
    170      while ($rs->fetch()) 
    171      { 
    172           if ($rs->level < $l) { 
    173                $full_name = array(); 
    174           } elseif ($rs->level == $l) { 
    175                array_pop($full_name); 
    176           } 
    177           $full_name[] = html::escapeHTML($rs->cat_title); 
    178            
    179           $cats[implode(' / ',$full_name)] = $rs->cat_id; 
    180           $dest[implode(' / ',$full_name)] = $rs->cat_id; 
    181            
    182           $l = $rs->level; 
    183      } 
    184       
    185170     echo 
    186171     '<form action="categories.php" method="post" id="delete-category">'. 
    187172     '<fieldset><legend>'.__('Remove a category').'</legend>'. 
    188173     '<p><label for="del_cat">'.__('Choose a category to remove:').' '. 
    189      form::combo('del_cat',$cats).'</label></p> '. 
     174     form::combo('del_cat',$categories_combo,'','maximal').'</label></p> '. 
    190175     '<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').' '. 
    191      form::combo('mov_cat',$dest).'</label></p> '. 
     176     form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</label></p> '. 
    192177     '<p><input type="submit" value="'.__('Delete').'" class="delete" /></p>'. 
    193178     $core->formNonce(). 
  • admin/index.php

    r1535 r1536  
    326326     if ($core->auth->check('usage,contentadmin',$core->blog->id)) 
    327327     { 
    328           $categories_combo = array('&nbsp;' => ''); 
     328          # Getting categories 
     329          $categories_combo = array(__('(No cat)') => ''); 
    329330          try { 
    330331               $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    331                while ($categories->fetch()) { 
    332                     $categories_combo[] = new formSelectOption( 
    333                          str_repeat('&nbsp;&nbsp;',$categories->level-1). 
    334                          ($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    335                          $categories->cat_id 
    336                     ); 
     332               if (!$categories->isEmpty()) { 
     333                    while ($categories->fetch()) { 
     334                         $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     335                              str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     336                              $categories->cat_id 
     337                         ); 
     338                    } 
    337339               } 
    338340          } catch (Exception $e) { } 
    339       
     341           
    340342          echo 
    341343          '<div id="quick">'. 
     
    352354          '<p><label for="cat_id" class="classic">'.__('Category:').' '. 
    353355          form::combo('cat_id',$categories_combo).'</label></p>'. 
     356          ($core->auth->check('categories', $core->blog->id) 
     357               ? '<div>'. 
     358               '<p id="new_cat">'.__('Add a new category').'</p>'. 
     359               '<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'. 
     360               '<p><label for="new_cat_title">'.__('Title:').' '. 
     361               form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     362               '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     363               form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     364               '</label></p>'. 
     365               '</div>' 
     366               : ''). 
    354367          '<p><input type="submit" value="'.__('Save').'" name="save" /> '. 
    355368          ($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

    r1256 r1417  
    123123               hide: $('#post_notes').val() == '' 
    124124          }); 
     125          $('#new_cat').toggleWithLegend( 
     126               $('#new_cat').parent().children().not('#new_cat'), 
     127               {} // no cookie on new category as we don't use this every day 
     128          ); 
    125129          $('#post_lang').parent().toggleWithLegend($('#post_lang'),{ 
    126130               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

    r1288 r1488  
    4949     $post_status = -2; 
    5050} 
    51  
    52 # Getting categories 
    53 $categories_combo = array('&nbsp;' => ''); 
    54 try { 
    55      $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    56      while ($categories->fetch()) { 
    57           $categories_combo[] = new formSelectOption( 
    58                str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    59                $categories->cat_id 
    60           ); 
    61      } 
    62 } catch (Exception $e) { } 
    6351 
    6452# Status combo 
     
    218206if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post && !$bad_dt) 
    219207{ 
     208     # Create category 
     209     if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) { 
     210      
     211          $cur_cat = $core->con->openCursor($core->prefix.'category'); 
     212          $cur_cat->cat_title = $_POST['new_cat_title']; 
     213          $cur_cat->cat_url = ''; 
     214           
     215          $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 
     216           
     217          # --BEHAVIOR-- adminBeforeCategoryCreate 
     218          $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
     219           
     220          $cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
     221           
     222          # --BEHAVIOR-- adminAfterCategoryCreate 
     223          $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $cat_id); 
     224     } 
     225      
    220226     $cur = $core->con->openCursor($core->prefix.'post'); 
    221227      
     
    283289     } 
    284290} 
     291 
     292# Getting categories 
     293$categories_combo = array(__('(No cat)') => ''); 
     294try { 
     295     $categories = $core->blog->getCategories(array('post_type'=>'post')); 
     296     if (!$categories->isEmpty()) { 
     297          while ($categories->fetch()) { 
     298               $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     299                    str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     300                    $categories->cat_id 
     301               ); 
     302          } 
     303     } 
     304} catch (Exception $e) { } 
    285305 
    286306/* DISPLAY 
     
    443463     '</label></p>'. 
    444464      
     465     ($core->auth->check('categories', $core->blog->id) ? 
     466          '<div>'. 
     467          '<p id="new_cat">'.__('Add a new category').'</p>'. 
     468          '<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'. 
     469          '<p><label for="new_cat_title">'.__('Title:').' '. 
     470          form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     471          '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     472          form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     473          '</label></p>'. 
     474          '</div>' 
     475     : ''). 
     476      
    445477     '<p><label for="post_status">'.__('Entry status:'). 
    446478     form::combo('post_status',$status_combo,$post_status,'','',!$can_publish). 
  • admin/posts_actions.php

    r1179 r1421  
    1616 
    1717$params = array(); 
     18$action = ''; 
    1819 
    1920/* Actions 
     
    126127     elseif ($action == 'category' && isset($_POST['new_cat_id'])) 
    127128     { 
    128           try 
    129           { 
    130                $core->blog->updPostsCategory($posts_ids,$_POST['new_cat_id']); 
     129          $new_cat_id = $_POST['new_cat_id']; 
     130           
     131          try 
     132          { 
     133               if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) 
     134               { 
     135                    $cur_cat = $core->con->openCursor($core->prefix.'category'); 
     136                    $cur_cat->cat_title = $_POST['new_cat_title']; 
     137                    $cur_cat->cat_url = ''; 
     138                     
     139                    $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 
     140                     
     141                    # --BEHAVIOR-- adminBeforeCategoryCreate 
     142                    $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
     143                     
     144                    $new_cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
     145                     
     146                    # --BEHAVIOR-- adminAfterCategoryCreate 
     147                    $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $new_cat_id); 
     148               } 
     149                
     150               $core->blog->updPostsCategory($posts_ids, $new_cat_id); 
    131151                
    132152               http::redirect($redir); 
     
    246266     echo '<h2 class="page-title">'.__('Change category for entries').'</h2>'; 
    247267      
    248      # categories list 
    249268     # Getting categories 
    250      $categories_combo = array('&nbsp;' => ''); 
     269     $categories_combo = array(__('(No cat)') => ''); 
    251270     try { 
    252271          $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    253           while ($categories->fetch()) { 
    254                $categories_combo[] = new formSelectOption( 
    255                     str_repeat('&nbsp;&nbsp;',$categories->level-1). 
    256                     ($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    257                     $categories->cat_id 
    258                ); 
     272          if (!$categories->isEmpty()) { 
     273               while ($categories->fetch()) { 
     274                    $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     275                         str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     276                         $categories->cat_id 
     277                    ); 
     278               } 
    259279          } 
    260280     } catch (Exception $e) { } 
     
    265285     form::combo('new_cat_id',$categories_combo,''). 
    266286     '</label> '; 
     287      
     288     if ($core->auth->check('categories', $core->blog->id)) { 
     289          echo  
     290          '<div>'. 
     291          '<p id="new_cat">'.__('Add a new category').'</p>'. 
     292          '<p><label for="new_cat_title">'.__('Title:').' '. 
     293          form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     294          '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     295          form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     296          '</label></p>'. 
     297          '</div>'; 
     298     } 
    267299      
    268300     echo 
  • admin/preferences.php

    r1179 r1375  
    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'). 
     
    416429     '<legend>'.__('Change your password').'</legend>'. 
    417430      
    418      '<p><label for="new_pwd">'.__('New password:'). 
    419      form::password('new_pwd',20,255).'</label></p>'. 
     431     '<div class="pw-table">'. 
     432     '<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'. 
     433     form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'. 
     434    '<div id="pwindicator">'. 
     435    '    <div class="bar"></div>'. 
     436    '    <p class="label no-margin"></p>'. 
     437    '</div>'. 
     438    '</div>'. 
    420439      
    421      '<p><label for="new_pwd_c">'.__('Confirm password:'). 
    422      form::password('new_pwd_c',20,255).'</label></p>'. 
     440     '<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'. 
     441     form::password('new_pwd_c',20,255).'</p>'. 
    423442     '</fieldset>'. 
    424443      
    425444     '<p>'.__('If you have changed this user email or password you must provide your current password to save these modifications.').'</p>'. 
    426      '<p><label for="cur_pwd">'.__('Your password:'). 
    427      form::password('cur_pwd',20,255).'</label></p>'; 
     445     '<p><label for="cur_pwd">'.__('Your password:').'</label>'. 
     446     form::password('cur_pwd',20,255).'</p>'; 
    428447} 
    429448 
  • admin/style/default.css

    r1179 r1375  
    901901     margin: 0; 
    902902} 
    903  
    904903/* paragraphe pour bouton Nouveau bidule */ 
    905904p.top-add { 
     
    13841383     color: white; 
    13851384} 
     1385 
     1386/* --------------------------------------------------------------- password indcator */ 
     1387.pw-table { 
     1388     display: table; 
     1389     margin-bottom: 1em; 
     1390} 
     1391.pw-cell { 
     1392     display: table-cell; 
     1393     margin-bottom: 1em; 
     1394} 
     1395#pwindicator { 
     1396     display: table-cell; 
     1397     vertical-align: bottom; 
     1398     padding-left: 1.5em; 
     1399     height: 3.8em; 
     1400} 
     1401#pwindicator .bar { 
     1402     height: 6px; 
     1403     margin-bottom: 4px; 
     1404} 
     1405.pw-very-weak .bar { 
     1406     background: #900; 
     1407     width: 30px; 
     1408} 
     1409.pw-weak .bar { 
     1410     background: #c00; 
     1411     width: 60px; 
     1412} 
     1413.pw-mediocre .bar { 
     1414     background: #f60; 
     1415     width: 90px; 
     1416} 
     1417.pw-strong .bar { 
     1418     background: #060; 
     1419     width: 120px; 
     1420} 
     1421.pw-very-strong .bar { 
     1422     background: #0c0; 
     1423     width: 150px; 
     1424} 
  • admin/update.php

    r1287 r1479  
    106106                         throw new Exception( 
    107107                              sprintf(__('Downloaded Dotclear archive seems to be corrupted. '. 
    108                               'Try <a %s>download it</a> again.'),'href="'.$p_url.'?step=download"') 
     108                              'Try <a %s>download it</a> again.'),'href="'.$p_url.'?step=download"'). 
     109                              ' '. 
     110                              __('If this problem persists try to '. 
     111                              '<a href="http://dotclear.org/download">update manually</a>.') 
    109112                         ); 
    110113                    } 
     
    168171-------------------------------------------------------- */ 
    169172dcPage::open(__('Dotclear update'), 
    170      (!$step ? dcPage::jsPageTabs($default_tab) : '') 
     173     (!$step ?  
     174          dcPage::jsPageTabs($default_tab). 
     175          dcPage::jsLoad('js/_update.js') 
     176     : '') 
    171177); 
    172178 
  • inc/admin/lib.dc.page.php

    r1256 r1462  
    160160          if ($core->error->flag()) { 
    161161               echo 
    162                '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</p></strong>'. 
     162               '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong></p>'. 
    163163               $core->error->toHTML(). 
    164164               '</div>'; 
     
    466466          self::jsVar('dotclear.msg.confirm_delete_theme', 
    467467               __('Are you sure you want to delete "%s" theme?')). 
     468          self::jsVar('dotclear.msg.confirm_delete_backup', 
     469               __('Are you sure you want to delete this backup?')). 
    468470          self::jsVar('dotclear.msg.zip_file_content', 
    469471               __('Zip file content')). 
  • inc/admin/lib.pager.php

    r1179 r1364  
    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

    r1262 r1429  
    645645     private function checkCategory($title,$url,$id=null) 
    646646     { 
    647           $strReq = 'SELECT cat_id '. 
    648                     'FROM '.$this->prefix.'category '. 
    649                     "WHERE cat_url = '".$this->con->escape($url)."' ". 
    650                     "AND blog_id = '".$this->con->escape($this->id)."' "; 
    651            
    652           if ($id !== null) { 
    653                $strReq .= 'AND cat_id <> '.(integer) $id.' '; 
    654           } 
     647          # Let's check if URL is taken... 
     648          $strReq =  
     649               'SELECT cat_url FROM '.$this->prefix.'category '. 
     650               "WHERE cat_url = '".$this->con->escape($url)."' ". 
     651               ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 
     652               "AND blog_id = '".$this->con->escape($this->id)."' ". 
     653               'ORDER BY cat_url DESC'; 
    655654           
    656655          $rs = $this->con->select($strReq); 
    657656           
    658           if (!$rs->isEmpty()) { 
    659                throw new Exception(__('Category URL must be unique.')); 
    660           } 
     657          if (!$rs->isEmpty()) 
     658          { 
     659               if ($this->con->driver() == 'mysql') { 
     660                    $clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'"; 
     661               } elseif ($this->con->driver() == 'pgsql') { 
     662                    $clause = "~ '^".$this->con->escape($url)."[0-9]+$'"; 
     663               } else { 
     664                    $clause = "LIKE '".$this->con->escape($url)."%'"; 
     665               } 
     666               $strReq =  
     667                    'SELECT cat_url FROM '.$this->prefix.'category '. 
     668                    "WHERE cat_url ".$clause.' '. 
     669                    ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 
     670                    "AND blog_id = '".$this->con->escape($this->id)."' ". 
     671                    'ORDER BY cat_url DESC '; 
     672                
     673               $rs = $this->con->select($strReq); 
     674               $a = array(); 
     675               while ($rs->fetch()) { 
     676                    $a[] = $rs->cat_url; 
     677               } 
     678                
     679               natsort($a); 
     680               $t_url = end($a); 
     681                
     682               if (preg_match('/(.*?)([0-9]+)$/',$t_url,$m)) { 
     683                    $i = (integer) $m[2]; 
     684                    $url = $m[1]; 
     685               } else { 
     686                    $i = 1; 
     687               } 
     688                
     689               return $url.($i+1); 
     690          } 
     691           
     692          # URL is empty? 
     693          if ($url == '') { 
     694               throw new Exception(__('Empty category URL')); 
     695          } 
     696           
     697          return $url; 
    661698     } 
    662699      
     
    680717           
    681718          # Check if title or url are unique 
    682           $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 
     719          $cur->cat_url = $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 
    683720           
    684721          if ($cur->cat_desc !== null) { 
  • inc/core/class.dc.media.php

    r1270 r1381  
    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 
     
    921923           
    922924          $p = path::info($file); 
    923           $thumb = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     925          $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     926          $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    924927           
    925928          try 
     
    940943                         $rate = ($s[0] < 100 ? 95 : ($s[0] < 600 ? 90 : 85)); 
    941944                         $img->resize($s[0],$s[0],$s[1]); 
    942                          $img->output('jpeg',$thumb_file,$rate); 
     945                         $img->output(($alpha ? 'png' : 'jpeg'),$thumb_file,$rate); 
    943946                         $img->loadImage($file); 
    944947                    } 
     
    959962          { 
    960963               $p = path::info($file->relname); 
    961                $thumb_old = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     964               $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     965               $thumb_old = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    962966                
    963967               $p = path::info($newFile->relname); 
    964                $thumb_new = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
     968               $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     969               $thumb_new = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
    965970                
    966971               foreach ($this->thumb_sizes as $suffix => $s) { 
     
    975980     { 
    976981          $p = path::info($f); 
    977           $thumb = sprintf($this->thumb_tp,'',$p['base'],'%s'); 
     982          $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
     983          $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),'',$p['base'],'%s'); 
    978984           
    979985          foreach ($this->thumb_sizes as $suffix => $s) { 
  • inc/prepend.php

    r1233 r1352  
    123123# Constants 
    124124define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 
    125 define('DC_VERSION','2.5.2-dev'); 
     125define('DC_VERSION','2.5.3-dev'); 
    126126define('DC_DIGESTS',dirname(__FILE__).'/digests'); 
    127127define('DC_L10N_ROOT',dirname(__FILE__).'/../locales'); 
  • locales/en/help/user_pref.html

    r243 r1487  
    88<h3>My profile</h3> 
    99<dl> 
    10   <dt>Name, First name</dt> 
     10  <dt>Last name, First name</dt> 
    1111  <dd>If the display name is empty, the author's name will be displayed 
    1212  as his Firstname and Name as set here.</dd> 
     
    3737<dl>   
    3838  <dt>Preferred format</dt> 
    39   <dd>To choose the prefered post syntax. Wiki is a simplified syntax 
     39  <dd>To choose the preferred post syntax. Wiki is a simplified syntax 
    4040  and will be converted to valid xhtml&nbsp;; Unless you have a perfect 
    4141  understanding of html, we advise you to choose the wiki syntax.</dd> 
     
    5959   
    6060  <dt>Activate enhanced uploader in media manager</dt> 
    61   <dd>This option allows you to upload several files at the same time on your server. 
    62   Needs the presence of Flash plugin in your browser.</dd> 
     61  <dd>This option allows you to upload several files at the same time on your server.</dd> 
    6362   
    6463  <dt>Dashboard modules</dt> 
  • locales/en/main.po

    r1256 r1479  
    19171917msgstr "" 
    19181918 
     1919msgid "If this problem persists try to <a href="http://dotclear.org/download">update manually</a>." 
     1920msgstr "" 
     1921 
    19191922msgid "The following files of your Dotclear installation have been modified so we won't try to update your installation. Please try to <a href=\"http://dotclear.org/download\">update manually</a>." 
    19201923msgstr "" 
     
    21392142msgstr "" 
    21402143 
     2144msgid "Are you sure you want to delete this backup?" 
     2145msgstr "" 
     2146 
    21412147msgid "Zip file content" 
    21422148msgstr "" 
     
    27902796msgid "The following error was encountered while trying to read the database:" 
    27912797msgstr "" 
     2798 
     2799msgid "(No cat)" 
     2800msgstr "(none)" 
  • locales/fr/main.po

    r1288 r1488  
    19901990msgstr "L'archive de Dotclear téléchargée semble être corrompue. Essayer de la <a %s>télécharger</a> à nouveau." 
    19911991 
     1992msgid "If this problem persists try to <a href="http://dotclear.org/download">update manually</a>." 
     1993msgstr "Si le problème persiste essayer de <a href="http://dotclear.org/download">mettre à jour manuellement</a>." 
     1994 
    19921995msgid "The following files of your Dotclear installation have been modified so we won't try to update your installation. Please try to <a href=\"http://dotclear.org/download\">update manually</a>." 
    19931996msgstr "Comme les fichiers suivants de votre installation de Dotclear ont été modifiés, votre installation ne peut être mise à jour. Merci de <a href=\"http://fr.dotclear.org/download\">mettre à jour manuellement</a>." 
     
    22102213 
    22112214msgid "Users with posts cannot be deleted." 
    2212 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être effacées." 
     2215msgstr "Les utilisateurs ayant écrit des billets ne peuvent être supprimés." 
    22132216 
    22142217#, php-format 
     
    22512254msgid "Are you sure you want to delete \"%s\" theme?" 
    22522255msgstr "Êtes-vous certain de vouloir supprimer le thème \"%s\" ?" 
     2256 
     2257msgid "Are you sure you want to delete this backup?" 
     2258msgstr "Êtes-vous certain de vouloir supprimer cette sauvegarde ?" 
    22532259 
    22542260msgid "Zip file content" 
     
    29402946msgid "Invalid publication date" 
    29412947msgstr "Date de publication invalide" 
     2948 
     2949msgid "(No cat)" 
     2950msgstr "(aucune)" 
     2951 
     2952msgid "Password strength: %s" 
     2953msgstr "Force du mot de passe : %s" 
     2954 
     2955msgid "very weak" 
     2956msgstr "très faible" 
     2957 
     2958msgid "weak" 
     2959msgstr "faible" 
     2960 
     2961msgid "mediocre" 
     2962msgstr "moyen" 
     2963 
     2964msgid "strong" 
     2965msgstr "fort" 
     2966 
     2967msgid "very strong" 
     2968msgstr "très fort" 
     2969 
     2970msgid "This category will be created when you will save your post." 
     2971msgstr "Cette catégorie sera créée lorsque vous enregistrerez votre billet." 
  • locales/fr/plugins.po

    r1286 r1445  
    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

    r1179 r1361  
    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/antispam/inc/lib.dc.antispam.php

    r1179 r1478  
    7575          if (($count = self::countSpam($core)) > 0) { 
    7676               $str = ($count > 1) ? __('(including %d spam comments)') : __('(including %d spam comment)'); 
    77                $icons['comments'][0] .= '</a> <br /><a href="comments.php?status=-2"><span>'.sprintf($str,$count).'</span>'; 
     77               $icons['comments'][0] .= '</span></a> <br /><a href="comments.php?status=-2"><span>'.sprintf($str,$count); 
    7878          } 
    7979     } 
     
    8383          if (($count = self::countSpam($core)) > 0) { 
    8484               $str = ($count > 1) ? __('(including %d spam comments)') : __('(including %d spam comment)'); 
    85                return '</a> <br /><a href="comments.php?status=-2"><span>'.sprintf($str,$count).'</span>'; 
     85               return '</span></a> <br /><a href="comments.php?status=-2"><span>'.sprintf($str,$count); 
    8686          } else { 
    8787               return ''; 
  • plugins/attachments/_admin.php

    r1179 r1467  
    3636                    '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'. 
    3737                    '<ul>'. 
    38                     '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'"'. 
     38                    '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'" '. 
    3939                    'title="'.$f->basename.'">'.$ftitle.'</a></li>'. 
    4040                    '<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