Dotclear


Ignore:
Files:
3 deleted
42 edited

Legend:

Unmodified
Added
Removed
  • .hgsubstate

    r1486 r1385  
    1 716e99c54652d08c2e4395d5179e817e0f98182d inc/libs/clearbricks 
     14288bdc1f21d00f93331bbe098485727b276c1fe inc/libs/clearbricks 
  • CHANGELOG

    r1350 r1216  
    1 Dotclear 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  
    181Dotclear 2.5.1 - 2013-07-20 
    192=========================================================== 
  • Makefile

    r1451 r1046  
    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 \{\} \; 
    7271     find $(DC)/admin/js/tool-man/*.js -exec ./build-tools/min-js.php \{\} \; 
    7372     find $(DC)/plugins -name '*.js' -exec ./build-tools/min-js.php \{\} \; 
  • admin/blog.php

    r1482 r1399  
    7979     '<form action="blog.php" method="post" id="blog-form">'. 
    8080      
    81      '<div>'.$core->formNonce().'</div>'. 
     81     $core->formNonce(). 
    8282     '<p><label class="required" for="blog_id"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:').'</label> '. 
    8383     form::field('blog_id',30,32,html::escapeHTML($blog_id)).'</p>'. 
  • admin/blog_pref.php

    r1474 r1399  
    504504          (html::escapeHTML($blog_settings->system->media_img_default_size) != '' ? html::escapeHTML($blog_settings->system->media_img_default_size) : 'm')). 
    505505     '</p>'. 
    506      '<p><label for="media_img_default_alignment">'.__('Image alignment:').'</label>'. 
     506     '<p><label for="media_img_default_alignment">'.__('Image alignment').'</label>'. 
    507507     form::combo('media_img_default_alignment',$img_default_alignment_combo,html::escapeHTML($blog_settings->system->media_img_default_alignment)). 
    508508     '</p>'. 
     
    548548     } else { 
    549549          if ($blog_id == $core->blog->id) { 
    550                echo '<p class="message">'.__('The current blog cannot be deleted.').'</p>'; 
     550               echo '<p class="message">'.__('The current blog cannot be deleted').'</p>'; 
    551551          } else { 
    552                echo '<p class="message">'.__('Only superadmin can delete a blog.').'</p>'; 
     552               echo '<p class="message">'.__('Only superadmin can delete a blog').'</p>'; 
    553553          } 
    554554     } 
  • admin/categories.php

    r1468 r1399  
    3131          $mov_cat = $mov_cat ? $mov_cat : null; 
    3232          if ($mov_cat !== null) { 
    33                $c = $core->blog->getCategory((integer) $_POST['mov_cat']); 
     33               $c = $core->blog->getCategory((integer) $_POST['del_cat']); 
    3434               if ($c->isEmpty()) { 
    3535                    throw new Exception(__('This category does not exist.')); 
     
    144144echo '</div>'; 
    145145 
    146 $categories_combo = array(); 
    147 if (!$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  
    157146echo '<div class="col">'. 
    158147 
     
    160149'<h3>'.__('Add a new category').'</h3>'. 
    161150'<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 
    162 form::field('cat_title',30,255,'','maximal').'</p>'. 
     151form::field('cat_title',30,255).'</p>'. 
    163152'<p><label for="new_cat_parent">'.__('Parent:').'</label> '. 
    164 form::combo('new_cat_parent',array_merge(array(__('(No cat)') => 0),$categories_combo),'','maximal'). 
    165 '</p>'. 
     153'<select id="new_cat_parent" name="new_cat_parent">'. 
     154'<option value="0">'.__('Top level').'</option>'; 
     155while ($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} 
     160echo 
     161'</select></p>'. 
    166162'<p><input type="submit" value="'.__('Create').'" />'. 
    167163$core->formNonce().'</p>'. 
    168  
    169164'</form>'; 
    170165 
    171166if (!$rs->isEmpty()) 
    172167{ 
     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      
    173187     echo 
    174      '<form action="categories.php" method="post" id="delete-category">'. 
     188     '<form action="categories.php" method="post" id="delete-category" class="border-top">'. 
    175189     '<h3>'.__('Remove a category').'</h3>'. 
    176190     '<p><label for="del_cat">'.__('Choose a category to remove:').'</label> '. 
    177      form::combo('del_cat',$categories_combo,'','maximal').'</p> '. 
     191     form::combo('del_cat',$cats).'</p> '. 
    178192     '<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').'</label> '. 
    179      form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</p> '. 
     193     form::combo('mov_cat',$dest).'</p> '. 
    180194     '<p><input type="submit" value="'.__('Delete').'" class="delete" />'. 
    181195     $core->formNonce().'</p>'. 
    182  
    183196     '</form>'; 
    184197      
  • admin/comments.php

    r1480 r1424  
    3737$type_combo = array( 
    3838'-' => '', 
    39 __('Comment') => 'co', 
    40 __('Trackback') => 'tb' 
     39__('comment') => 'co', 
     40__('trackback') => 'tb' 
    4141); 
    4242 
     
    134134if ($core->auth->check('publish,contentadmin',$core->blog->id)) 
    135135{ 
    136      $combo_action[__('Publish')] = 'publish'; 
    137      $combo_action[__('Unpublish')] = 'unpublish'; 
    138      $combo_action[__('Mark as pending')] = 'pending'; 
    139      $combo_action[__('Mark as junk')] = 'junk'; 
     136     $combo_action[__('publish')] = 'publish'; 
     137     $combo_action[__('unpublish')] = 'unpublish'; 
     138     $combo_action[__('mark as pending')] = 'pending'; 
     139     $combo_action[__('mark as junk')] = 'junk'; 
    140140} 
    141141if ($core->auth->check('delete,contentadmin',$core->blog->id)) 
     
    261261      
    262262     '<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '. 
    263      form::combo('action',$combo_action,$default,'','','','title="'.__('Actions').'"'). 
     263     form::combo('action',$combo_action,$default,'','','','title="'.__('action: ').'"'). 
    264264     $core->formNonce(). 
    265265     '<input type="submit" value="'.__('ok').'" /></p>'. 
  • admin/comments_actions.php

    r1474 r1179  
    137137$core->callBehavior('adminCommentsActionsContent',$core,$action,$hidden_fields); 
    138138 
    139 echo '<p><a class="back" href="'.str_replace('&','&amp;',$redir).'">'.__('Back to comments list').'</a></p>'; 
     139echo '<p><a class="back" href="'.str_replace('&','&amp;',$redir).'">'.__('back').'</a></p>'; 
    140140 
    141141dcPage::close(); 
  • admin/js/_index.js

    r1418 r1140  
    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           ); 
    6763     } 
    6864 
  • admin/js/_post.js

    r1492 r1490  
    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           ); 
    121117          $('#post_lang').parent().toggleWithLegend($('#post_lang'),{ 
    122118               cookie: 'dcx_post_lang' 
  • admin/js/_posts_actions.js

    r1419 r1035  
    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      ); 
    128}); 
  • admin/js/_users_actions.js

    r1449 r935  
    11jQuery.fn.updatePermissionsForm = function() { 
    22     return this.each(function() { 
    3            
    43          var perms = {}; 
    54          var re = /^perm\[(.+?)\]\[(.+?)\]$/; 
     
    1312                    continue; 
    1413               } 
    15                var prop; 
    1614               prop = e.name.match(re); 
    1715               if (!prop) { 
     
    2220               } 
    2321               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); 
     22          } 
     23           
     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(); }; 
    2952                    } 
    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                     }); 
    4953               } 
    5054          } 
    51            
    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; 
    69           } 
    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            
    9055     }); 
    9156}; 
  • admin/plugins.php

    r1474 r1399  
    236236 
    237237if ($is_writable) { 
    238      echo '<p>'.__('To install or upgrade a plugin you generally just need to upload it '. 
     238     echo __('To install or upgrade a plugin you generally just need to upload it '. 
    239239     'in "Install or upgrade a plugin" section.'); 
    240240} else { 
    241      echo '<p>'.__('To install or upgrade a plugin you just need to extract it in your plugins directory.'); 
     241     echo __('To install or upgrade a plugin you just need to extract it in your plugins directory.'); 
    242242} 
    243243echo '</p>'; 
  • admin/posts_actions.php

    r1476 r1399  
    1717$params = array(); 
    1818 
    19 /** 
    20 * FieldsList - Compatibility class for hidden fields & entries[] fields 
    21 * 
    22 */ 
    23 class FieldsList { 
    24      /** @var array list of hidden fields */ 
    25      protected $hidden; 
    26      /** @var array list of selected entries */ 
    27      protected $entries; 
    28  
    29  
    30    /** 
    31      * Class constructor 
    32      */ 
    33      public function __construct() { 
    34           $this->hidden=array(); 
    35           $this->entries =array(); 
    36      } 
    37  
    38     /** 
    39      * addHidden - adds a hidden field 
    40      *  
    41      * @param string $name the field name. 
    42      * @param mixed $value the field value. 
    43      * 
    44      * @access public 
    45       * @return the FieldsList instance, enabling to chain requests 
    46      */    
    47       public function addHidden($name,$value) { 
    48           $this->hidden[] = form::hidden($name,$value); 
    49           return $this; 
    50      } 
    51  
    52     /** 
    53      * addEntry - adds a antry field 
    54      *  
    55      * @param string $id the entry id. 
    56      * @param mixed $title the entry title. 
    57      * 
    58      * @access public 
    59       * @return the FieldsList instance, enabling to chain requests 
    60      */    
    61       public function addEntry($id,$title) { 
    62           $this->entries[$id]=$title; 
    63           return $this; 
    64      } 
    65  
    66     /** 
    67      * getHidden - returns the list of hidden fields, html encoded 
    68      * 
    69      * @access public 
    70       * @return the list of hidden fields, html encoded 
    71      */ 
    72       public function getHidden() { 
    73           return join('',$this->hidden); 
    74      } 
    75       
    76     /** 
    77      * getEntries - returns the list of entry fields, html encoded 
    78      * 
    79       * @param boolean $hidden if set to true, returns entries as a list of hidden field 
    80       *                if set to false, returns html code displaying the list of entries 
    81       *                with a list of checkboxes to enable to select/deselect entries 
    82      * @access public 
    83       * @return the list of entry fields, html encoded 
    84      */ 
    85      public function getEntries ($hidden=false) { 
    86           $ret = ''; 
    87           if ($hidden) { 
    88                foreach ($this->entries as $id=> $e) { 
    89                     $ret .= form::hidden('entries[]',$id); 
    90                } 
    91           } else { 
    92                $ret =  
    93                     '<table class="posts-list"><tr>'. 
    94                     '<th colspan="2">'.__('Title').'</th>'. 
    95                     '</tr>'; 
    96                foreach ($this->entries as $id=>$title) { 
    97                     $ret .=  
    98                          '<tr><td>'. 
    99                          form::checkbox(array('entries[]'),$id,true,'','').'</td>'. 
    100                          '<td>'.   $title.'</td></tr>'; 
    101                } 
    102                $ret .= '</table>'; 
    103           } 
    104           return $ret; 
    105      } 
    106       
    107     /** 
    108      * getEntriesQS - returns the list of entry fields as query string 
    109      * 
    110      * @access public 
    111       * @return the list of entry fields, html encoded 
    112      */ 
    113      public function getEntriesQS() { 
    114           $ret=array(); 
    115           foreach ($this->entries as $id=>$title) { 
    116                $ret[] = 'entries[]='.$id; 
    117           } 
    118           return join('&',$ret); 
    119      } 
    120       
    121     /** 
    122      * __toString - magic method. -- DEPRECATED here 
    123       *              This method is only used to preserve compatibility with plugins  
    124       *                  relying on previous versions of adminPostsActionsContent behavior,  
    125       * 
    126      * @access public 
    127       * @return the list of hidden fields and entries (as hidden fields too), html encoded 
    128      */ 
    129      public function __toString() { 
    130           return join('',$this->hidden).$this->getEntries(true); 
    131      } 
    132 } 
    133  
    134 $fields = new FieldsList(); 
    135  
    13619/* Actions 
    13720-------------------------------------------------------- */ 
     
    17962     while ($posts->fetch())  { 
    18063          $posts_ids[] = $posts->post_id; 
    181           $fields->addEntry($posts->post_id,$posts->post_title); 
    182      } 
    183      // Redirection including selected entries 
    184      $redir_sel = $redir.'&'.$fields->getEntriesQS(); 
     64     } 
    18565      
    18666     # --BEHAVIOR-- adminPostsActions 
     
    20080               $core->blog->updPostsStatus($posts_ids,$status); 
    20181                
    202                http::redirect($redir_sel.'&upd=1'); 
     82               http::redirect($redir); 
    20383          } 
    20484          catch (Exception $e) 
     
    21393               $core->blog->updPostsSelected($posts_ids,$action == 'selected'); 
    21494                
    215                http::redirect($redir_sel."&upd=1"); 
     95               http::redirect($redir); 
    21696          } 
    21797          catch (Exception $e) 
     
    236116               $core->blog->delPosts($posts_ids); 
    237117                
    238                http::redirect($redir."&del=1"); 
     118               http::redirect($redir); 
    239119          } 
    240120          catch (Exception $e) 
     
    246126     elseif ($action == 'category' && isset($_POST['new_cat_id'])) 
    247127     { 
    248           $new_cat_id = $_POST['new_cat_id']; 
    249            
    250           try 
    251           { 
    252                if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) 
    253                { 
    254                     $cur_cat = $core->con->openCursor($core->prefix.'category'); 
    255                     $cur_cat->cat_title = $_POST['new_cat_title']; 
    256                     $cur_cat->cat_url = ''; 
    257                      
    258                     $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 
    259                      
    260                     # --BEHAVIOR-- adminBeforeCategoryCreate 
    261                     $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
    262                      
    263                     $new_cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
    264                      
    265                     # --BEHAVIOR-- adminAfterCategoryCreate 
    266                     $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $new_cat_id); 
    267                } 
    268                 
    269                $core->blog->updPostsCategory($posts_ids, $new_cat_id); 
    270                 
    271                http::redirect($redir_sel."&upd=1"); 
     128          try 
     129          { 
     130               $core->blog->updPostsCategory($posts_ids,$_POST['new_cat_id']); 
     131                
     132               http::redirect($redir); 
    272133          } 
    273134          catch (Exception $e) 
     
    291152               $cur->update('WHERE post_id '.$core->con->in($posts_ids)); 
    292153                
    293                http::redirect($redir_sel."&upd=1"); 
     154               http::redirect($redir); 
    294155          } 
    295156          catch (Exception $e) 
     
    307168               $cur->update('WHERE post_id '.$core->con->in($posts_ids)); 
    308169                
    309                http::redirect($redir_sel."&upd=1"); 
     170               http::redirect($redir); 
    310171          } 
    311172          catch (Exception $e) 
     
    314175          } 
    315176     } 
    316 } else { 
    317      if (empty($_POST['entries'])) { 
    318           $core->error->add(__('At least one entry should be selected')); 
    319      } else { 
    320           $core->error->add(__('No action specified.')); 
    321      } 
    322      dcPage::open( 
    323           __('Entries'),'',dcPage::breadcrumb( 
    324           array( 
    325                html::escapeHTML($core->blog->name) => '', 
    326                __('Entries') => 'posts.php', 
    327                '<span class="page-title">'.__('Entries actions').'</span>' => '' 
    328           )) 
    329      ); 
    330       
    331      echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 
    332  
    333      dcPage::close(); 
    334      exit; 
    335 } 
     177} 
     178 
    336179/* DISPLAY 
    337180-------------------------------------------------------- */ 
     
    368211} 
    369212 
     213$hidden_fields = ''; 
     214while ($posts->fetch()) { 
     215     $hidden_fields .= form::hidden(array('entries[]'),$posts->post_id); 
     216} 
     217 
    370218if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false) 
    371219{ 
    372      $fields->addHidden(array('redir'),html::escapeURL($_POST['redir'])); 
     220     $hidden_fields .= form::hidden(array('redir'),html::escapeURL($_POST['redir'])); 
    373221} 
    374222else 
    375223{ 
    376      $fields 
    377           ->addHidden(array('user_id'),$_POST['user_id']) 
    378           ->addHidden(array('cat_id'),$_POST['cat_id']) 
    379           ->addHidden(array('status'),$_POST['status']) 
    380           ->addHidden(array('selected'),$_POST['selected']) 
    381           ->addHidden(array('month'),$_POST['month']) 
    382           ->addHidden(array('lang'),$_POST['lang']) 
    383           ->addHidden(array('sortby'),$_POST['sortby']) 
    384           ->addHidden(array('order'),$_POST['order']) 
    385           ->addHidden(array('page'),$_POST['page']) 
    386           ->addHidden(array('nb'),$_POST['nb']) 
    387      ; 
     224     $hidden_fields .= 
     225     form::hidden(array('user_id'),$_POST['user_id']). 
     226     form::hidden(array('cat_id'),$_POST['cat_id']). 
     227     form::hidden(array('status'),$_POST['status']). 
     228     form::hidden(array('selected'),$_POST['selected']). 
     229     form::hidden(array('month'),$_POST['month']). 
     230     form::hidden(array('lang'),$_POST['lang']). 
     231     form::hidden(array('sortby'),$_POST['sortby']). 
     232     form::hidden(array('order'),$_POST['order']). 
     233     form::hidden(array('page'),$_POST['page']). 
     234     form::hidden(array('nb'),$_POST['nb']); 
    388235} 
    389236 
    390237if (isset($_POST['post_type'])) { 
    391      $fields->addHidden(array('post_type'),$_POST['post_type']); 
     238     $hidden_fields .= form::hidden(array('post_type'),$_POST['post_type']); 
    392239} 
    393240 
    394241# --BEHAVIOR-- adminPostsActionsContent 
    395 $core->callBehavior('adminPostsActionsContent',$core,$action,$fields); 
     242$core->callBehavior('adminPostsActionsContent',$core,$action,$hidden_fields); 
    396243 
    397244if ($action == 'category') 
    398245{ 
    399      echo dcPage::breadcrumb( 
    400           array( 
    401                html::escapeHTML($core->blog->name) => '', 
    402                __('Entries') => 'posts.php', 
    403                __('Change category for entries') => '' 
    404      )); 
    405       
    406      echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 
    407  
     246     echo '<h2 class="page-title">'.__('Change category for entries').'</h2>'; 
     247      
    408248     # categories list 
    409249     # Getting categories 
    410      $categories_combo = array(__('(No cat)') => ''); 
     250     $categories_combo = array('&nbsp;' => ''); 
    411251     try { 
    412252          $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    413           if (!$categories->isEmpty()) { 
    414253          while ($categories->fetch()) { 
    415                     $catparents_combo[] = $categories_combo[] = new formSelectOption( 
    416                          str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     254               $categories_combo[] = new formSelectOption( 
     255                    str_repeat('&nbsp;&nbsp;',$categories->level-1). 
     256                    ($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    417257                    $categories->cat_id 
    418258               ); 
    419259          } 
    420           } 
    421260     } catch (Exception $e) { } 
    422261      
    423262     echo 
    424263     '<form action="posts_actions.php" method="post">'. 
    425      $fields->getEntries(). 
    426264     '<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '. 
    427265     form::combo('new_cat_id',$categories_combo,''); 
    428266      
    429      if ($core->auth->check('categories', $core->blog->id)) { 
    430           echo  
    431           '<div>'. 
    432           '<p id="new_cat">'.__('Add a new category').'</p>'. 
    433           '<p><label for="new_cat_title">'.__('Title:').' '. 
    434           form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
    435           '<p><label for="new_cat_parent">'.__('Parent:').' '. 
    436           form::combo('new_cat_parent',$categories_combo,'','maximal'). 
    437           '</label></p>'. 
    438           '</div>'; 
    439      } 
    440       
    441      echo 
    442      $fields->getHidden(). 
     267     echo 
     268     $hidden_fields. 
    443269     $core->formNonce(). 
    444270     form::hidden(array('action'),'category'). 
     
    448274elseif ($action == 'lang') 
    449275{ 
    450      echo dcPage::breadcrumb( 
    451           array( 
    452                html::escapeHTML($core->blog->name) => '', 
    453                __('Entries') => 'posts.php', 
    454                '<span class="page-title">'.__('Change language for entries').'</span>' => '' 
    455      )); 
    456      echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 
    457  
     276     echo '<h2 class="page-title">'.__('Change language for entries').'</h2>'; 
     277      
    458278     # lang list 
    459279     # Languages combo 
     
    474294     echo 
    475295     '<form action="posts_actions.php" method="post">'. 
    476      $fields->getEntries(). 
    477       
    478296     '<p><label for="new_lang" class="classic">'.__('Entry lang:').'</label> '. 
    479297     form::combo('new_lang',$lang_combo,''); 
    480298      
    481299     echo 
    482      $fields->getHidden(). 
     300     $hidden_fields. 
    483301     $core->formNonce(). 
    484302     form::hidden(array('action'),'lang'). 
     
    489307elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id)) 
    490308{ 
    491      echo dcPage::breadcrumb( 
    492           array( 
    493                html::escapeHTML($core->blog->name) => '', 
    494                __('Entries') => 'posts.php', 
    495                '<span class="page-title">'.__('Change author for entries').'</span>' => '' 
    496      )); 
    497      echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 
    498  
     309     echo '<h2 class="page-title">'.__('Change author for entries').'</h2>'; 
     310      
    499311     echo 
    500312     '<form action="posts_actions.php" method="post">'. 
    501      $fields->getEntries(). 
    502313     '<p><label for="new_auth_id" class="classic">'.__('Author ID:').'</label> '. 
    503314     form::field('new_auth_id',20,255); 
    504315      
    505316     echo 
    506      $fields->getHidden(). 
     317     $hidden_fields. 
    507318     $core->formNonce(). 
    508319     form::hidden(array('action'),'author'). 
     
    511322} 
    512323 
     324echo '<p><a class="back" href="'.html::escapeURL($redir).'">'.__('back').'</a></p>'; 
     325 
    513326dcPage::close(); 
    514327?> 
  • admin/preferences.php

    r1474 r1399  
    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". 
    359346     dcPage::jsPageTabs($default_tab). 
    360347     dcPage::jsConfirmClose('user-form'). 
     
    424411'</div>'. 
    425412'</div>'. 
     413'<br class="clear" />'. //Opera sucks 
    426414'</fieldset>'; 
    427415 
     
    432420     '<legend>'.__('Change your password').'</legend>'. 
    433421      
    434      '<div class="pw-table">'. 
    435      '<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'. 
    436      form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'. 
    437      '<div id="pwindicator">'. 
    438      '    <div class="bar"></div>'. 
    439      '    <p class="label no-margin"></p>'. 
    440      '</div>'. 
    441      '</div>'. 
     422     '<p><label for="new_pwd">'.__('New password:').'</label>'. 
     423     form::password('new_pwd',20,255).'</p>'. 
    442424      
    443      '<p><label for="new_pwd_c">'.__('Confirm new password:').'</label>'. 
     425     '<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'. 
    444426     form::password('new_pwd_c',20,255).'</p>'. 
    445427     '</fieldset>'. 
     
    499481     form::checkbox('user_ui_hide_std_favicon',1,$user_ui_hide_std_favicon).' '. 
    500482     __('Do not use standard favicon').'</label></p>'. 
    501      '<p class="clear form-note info">'.__('This will be applied for all users'). 
    502      '<br class="clear" /></p>';//Opera sucks; 
     483     '<p class="clear form-note info">'.__('This will be applied for all users').'</p>'; 
    503484} 
    504485 
    505486echo  
     487'<br class="clear" />'. //Opera sucks 
    506488'</fieldset>'; 
    507489 
     
    529511'<p><label for="user_dm_quickentry" class="classic">'. 
    530512form::checkbox('user_dm_quickentry',1,$user_dm_quickentry).' '. 
    531 __('Display quick entry form').'</label><br class="clear" />'. //Opera sucks 
    532 '</p>'. 
    533  
     513__('Display quick entry form').'</label></p>'. 
     514 
     515'<br class="clear" />'. //Opera sucks 
    534516'</fieldset>'; 
    535517 
  • admin/style/default.css

    r1492 r1490  
    420420#login-screen { 
    421421     display: block; 
    422      width: 20em; 
     422     width: 18em; 
    423423     margin: 1.5em auto 0; 
    424424     font-size: 1.4rem; 
     
    431431     margin-left: 0; 
    432432} 
    433 #login-screen .fieldset { 
     433#login-screen fieldset, #login-screen .fieldset { 
    434434     border: 1px solid #A8DC26; 
    435435     padding: 1em 1em 0 1em; 
     
    437437     background: #fff; 
    438438} 
     439#login-screen legend { 
     440     border: 1px solid #A8DC26; 
     441} 
    439442#login-screen input[type=text], #login-screen input[type=password], #login-screen input[type=submit] { 
    440443     width: 100%; 
     
    445448} 
    446449#login-screen #issue strong {font-weight: normal;} 
     450 
    447451 
    448452/* ------------------------------------------------------------------ dashboard */ 
     
    477481#icons a img { 
    478482     padding: 2em; 
    479      margin-bottom: .3em; 
    480      -moz-box-shadow: 0px 1px 0px 0px #ffffff; 
    481      -webkit-box-shadow: 0px 1px 0px 0px #ffffff; 
    482      box-shadow: 0px 1px 0px 0px #ffffff; 
    483      background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) ); 
    484      background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% ); 
    485      filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9'); 
    486      background-color:#f9f9f9; 
    487      -moz-border-radius:1em; 
    488      -webkit-border-radius:1em; 
    489      border-radius:1em; 
    490      border:1px solid #dcdcdc; 
    491      display:inline-block; 
     483     background: #eee; 
     484     border-radius: 1.6rem; 
     485     box-shadow: 0 3px 3px 0 #ccc; 
     486     margin-bottom: .6rem; 
    492487} 
    493488#icons a img:hover, #icons a:focus img { 
    494      background: #BBDB58; 
     489     background-color: #BBDB58; 
    495490} 
    496491#icons a:focus span, #icons a:hover span { 
     
    506501#quick p.qinfo { 
    507502     margin: -.7em -1em 1em; 
    508      background: #f3f3ff url(info.png) no-repeat .2em .2em; 
     503     background: #eef url(info.png) no-repeat .2em .2em; 
    509504     border: 1px solid #99f; 
    510505     padding: .2em 1em .1em 24px; 
     
    546541} 
    547542 
    548 #upg-notify { 
    549 } 
    550 #upg-notify ul { 
    551      padding-left: 15px; 
    552 } 
    553 #upg-notify li { 
    554      color: #fff; 
    555 } 
    556543/* ------------------------------------------------------------------ post */ 
    557544#entry-wrapper { 
     
    12141201} 
    12151202table.settings th, table.prefs th { 
    1216      background: #f3f3ff; 
     1203     background: #eef; 
    12171204} 
    12181205table.settings th:first-child, table.prefs th:first-child { 
     
    13531340} 
    13541341p.form-note.info { 
    1355      background: #f5eaff url(info.png) no-repeat .3em .3em; 
     1342     background: #f5eaff url(info.png) no-repeat .3em .2em; 
    13561343     border: 1px solid #ddbaff; 
    13571344} 
     
    14281415a.submit { 
    14291416     display: inline-block; 
     1417     outline: none; 
    14301418     cursor: pointer; 
    14311419     text-align: center; 
    14321420     text-decoration: none; 
    14331421     padding: .1em .5em; 
     1422     text-shadow: 0 1px 1px rgba(0,0,0,.3); 
    14341423     border-radius: .2em; 
    14351424     margin-bottom: .1em; 
    1436      font-size: 1.2rem; 
    1437  } 
     1425} 
    14381426h4 a.button {font-weight: normal;} 
    14391427 
     
    14431431a.submit { 
    14441432     color: #fff; 
    1445      text-shadow: 0 -1px 1px #1A87B9; 
    1446      background:#25A6E1; 
    1447      background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%); 
    1448      background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0)); 
    1449      background:linear-gradient(top,#25A6E1 0%,#188BC0 100%); 
    1450      filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#188BC0',GradientType=0); 
    1451      border:1px solid #2C8FD1; 
    1452  
     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); 
    14531437} 
    14541438input[type=submit]:hover, 
     
    14581442input[type=button]:focus, 
    14591443a.submit:focus { 
    1460      background:#188BC0; 
    1461      background:-moz-linear-gradient(top,#188BC0 0%,#25A6E1 100%); 
    1462      background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#188BC0),color-stop(100%,#25A6E1)); 
    1463      background:linear-gradient(top,#188BC0 0%,#25A6E1 100%); 
    1464      filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#25A6E1',GradientType=0); 
     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'); 
     1448     border: 1px solid #2C8FD1; 
    14651449} 
    14661450/* suppression et reset */ 
     
    14731457     background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#dfdfdf)); 
    14741458     background: -moz-linear-gradient(top,  #f5f5f5,  #dfdfdf); 
    1475      text-shadow:1px 1px 0px #fff; 
     1459     text-shadow: none; 
    14761460     } 
    14771461a.button:hover, 
     
    14831467input[type=submit].reset:focus, 
    14841468input[type=submit].delete:focus { 
    1485      background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9) ); 
    1486      background:-moz-linear-gradient( center top, #e9e9e9 5%, #f9f9f9 100% ); 
    1487      filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9'); 
    1488      background-color:#e9e9e9; 
     1469     background: #dfdfdf; 
     1470     background: -webkit-gradient(linear, left top, left bottom, from(#dfdfdf), to(#f5f5f5)); 
     1471     background: -moz-linear-gradient(top,  #dfdfdf,  #f5f5f5); 
     1472     filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#e5e5e5', endColorstr='#f5f5f5'); 
    14891473     } 
    14901474a.delete, 
     
    15251509     font-size: 1.4rem; 
    15261510} 
    1527 .button.add:hover, .button.add:active, .button.add:focus { 
     1511.button.add:hover, .button.add:focus { 
    15281512     background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c) ); 
    15291513     background:-moz-linear-gradient( center top, #8cb82b 5%, #9dce2c 100% ); 
     
    16311615     border-color : #ccc; 
    16321616     background-color: #fff; 
    1633 } 
    1634  
    1635 /* --------------------------------------------------------------- password indcator */ 
    1636 .pw-table { 
    1637      display: table; 
    1638      margin-bottom: 1em; 
    1639 } 
    1640 .pw-cell { 
    1641      display: table-cell; 
    1642      margin-bottom: 1em; 
    1643 } 
    1644 #pwindicator { 
    1645      display: table-cell; 
    1646      vertical-align: bottom; 
    1647      padding-left: 1.5em; 
    1648      height: 3.8em; 
    1649 } 
    1650 #pwindicator .bar { 
    1651      height: 6px; 
    1652      margin-bottom: 4px; 
    1653 } 
    1654 .pw-very-weak .bar { 
    1655      background: #900; 
    1656      width: 30px; 
    1657 } 
    1658 .pw-weak .bar { 
    1659      background: #c00; 
    1660      width: 60px; 
    1661 } 
    1662 .pw-mediocre .bar { 
    1663      background: #f60; 
    1664      width: 90px; 
    1665 } 
    1666 .pw-strong .bar { 
    1667      background: #060; 
    1668      width: 120px; 
    1669 } 
    1670 .pw-very-strong .bar { 
    1671      background: #0c0; 
    1672      width: 150px; 
    16731617} 
    16741618 
  • admin/style/jsToolBar/jsToolBar.css

    r1475 r1399  
    8282     display: block; 
    8383     list-style: none; 
    84      margin: 0; 
     84     margin: 0 0 0 -5px; 
    8585     padding: 0 0 5px 0; 
    8686     background: #dfdfdf; 
    8787     border-top: 1px solid #999; 
     88     font-size: 90%; 
     89     font-weight: bold; 
    8890} 
    8991.jstSwitcher li { 
    9092     display: inline; 
    9193     margin: 0 0 0 5px; 
    92      padding: 2px 8px; 
     94     padding: 2px 4px; 
    9395} 
    9496.jstSwitcher li.jstSwitcherCurrent { 
    9597     color: #fff; 
    96      background: #575859; 
     98     background: #999; 
    9799     border-radius: 0 0 2px 2px; 
    98100} 
  • admin/update.php

    r1474 r1358  
    2727 
    2828$updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 
    29 $new_v = $updater->check(DC_VERSION, !empty($_GET['nocache'])); 
     29$new_v = $updater->check(DC_VERSION); 
    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 ?  
    171           dcPage::jsPageTabs($default_tab). 
    172           dcPage::jsLoad('js/_update.js') 
    173           : ''), 
     170     (!$step ? dcPage::jsPageTabs($default_tab) : ''), 
    174171     dcPage::breadcrumb( 
    175172          array( 
     
    179176); 
    180177 
    181 if (!$core->error->flag()) { 
    182      if (!empty($_GET['nocache'])) { 
    183           dcPage::message(__('Manual checking of update done successfully.')); 
    184      } 
    185 } 
    186  
    187178if (!$step) 
    188179{ 
     
    190181     if (empty($new_v)) 
    191182     { 
    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>'; 
     183          echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'; 
    197184     } 
    198185     else 
     
    200187          echo 
    201188               '<p class="static-msg">'.sprintf(__('Dotclear %s is available.'),$new_v). 
    202                     ($version_info ? ' <a href="'.$version_info.'">('.__('Information about this version').')</a>' : ''). 
     189                    ($version_info ? ' <a href="'.$version_info.'">('.__('information about this version').')</a>' : ''). 
    203190                    '</p>'. 
    204191           
     
    246233     '<p class="message">'. 
    247234     __("Congratulations, you're one click away from the end of the update."). 
    248      ' <strong><a href="index.php?logout=1">'.__('Finish the update').'</a>.</strong>'. 
     235     ' <strong><a href="index.php?logout=1">'.__('Finish the update.').'</a></strong>'. 
    249236     '</p>'; 
    250237} 
  • admin/user.php

    r1474 r1399  
    226226'<p><label for="user_firstname">'.__('First Name:').'</label> '. 
    227227form::field('user_firstname',20,255,html::escapeHTML($user_firstname)). 
    228 '</p>'. 
    229  
    230 '<p><label for="user_displayname">'.__('Display name:').'</label> '. 
     228'</label></p>'. 
     229 
     230'<p><label for="user_displayname">'.__('Display name:').' '. 
    231231form::field('user_displayname',20,255,html::escapeHTML($user_displayname)). 
    232232'</p>'. 
  • admin/users.php

    r1474 r1426  
    3939 
    4040 
    41 #?Get users 
     41# Get users 
    4242$page = !empty($_GET['page']) ? $_GET['page'] : 1; 
    4343$nb_per_page =  30; 
     
    134134     form::combo('order',$order_combo,$order).'</p>'. 
    135135     '<p><span class="label ib">'.__('Show').'</span> <label for="nb" class="classic">'.   
    136      form::field('nb',3,3,$nb_per_page).' '.__('users per page').'</label></p> '. 
     136     form::field('nb',3,3,$nb_per_page).' '.__('users per page').'</p> '. 
    137137     '</div>'. 
    138138     '</div>'. 
  • admin/users_actions.php

    r1477 r1399  
    255255      
    256256     echo  
     257     '<h2><a href="users.php">'.__('Users').'</a> &rsaquo; <span class="page-title">'.__('Permissions').'</span></h2>'. 
    257258     '<p>'.sprintf( 
    258259          __('You are about to change permissions on the following blogs for users %s.'), 
  • inc/admin/lib.pager.php

    r1476 r1415  
    4242               $pager->html_next = $this->html_next; 
    4343               $pager->var_page = 'page'; 
    44                $entries = array(); 
    45                if (isset($_REQUEST['entries'])) { 
    46                     foreach ($_REQUEST['entries'] as $v) { 
    47                          $entries[(integer)$v]=true; 
    48                     } 
    49                } 
     44                
    5045               $html_block = 
    5146               '<table class="clear"><tr>'. 
     
    7166               while ($this->rs->fetch()) 
    7267               { 
    73                     echo $this->postLine(isset($entries[$this->rs->post_id])); 
     68                    echo $this->postLine(); 
    7469               } 
    7570                
     
    8075     } 
    8176      
    82      private function postLine($checked) 
     77     private function postLine() 
    8378     { 
    8479          if ($this->core->auth->check('categories',$this->core->blog->id)) { 
     
    9287               html::escapeHTML($this->rs->cat_title)); 
    9388          } else { 
    94                $cat_title = __('(No cat)'); 
     89               $cat_title = __('None'); 
    9590          } 
    9691           
     
    133128          $res .= 
    134129          '<td class="nowrap">'. 
    135           form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable()).'</td>'. 
     130          form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).'</td>'. 
    136131          '<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 
    137132          html::escapeHTML($this->rs->post_title).'</a></td>'. 
  • inc/core/class.dc.blog.php

    r1492 r1491  
    634634     private function checkCategory($title,$url,$id=null) 
    635635     { 
    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'; 
     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          } 
    643644           
    644645          $rs = $this->con->select($strReq); 
    645646           
    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; 
     647          if (!$rs->isEmpty()) { 
     648               throw new Exception(__('Category URL must be unique.')); 
     649          } 
    687650     } 
    688651      
     
    706669           
    707670          # Check if title or url are unique 
    708           $cur->cat_url = $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 
     671          $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 
    709672           
    710673          if ($cur->cat_desc !== null) { 
  • inc/core/class.dc.media.php

    r1468 r1280  
    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) 
    3332      
    3433     /** 
     
    299298               $f->media_thumb = array(); 
    300299               $p = path::info($f->relname); 
    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'); 
     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'); 
    304302                
    305303               # Cleaner URLs 
     
    922920           
    923921          $p = path::info($file); 
    924           $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
    925           $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 
     922          $thumb = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
    926923           
    927924          try 
     
    942939                         $rate = ($s[0] < 100 ? 95 : ($s[0] < 600 ? 90 : 85)); 
    943940                         $img->resize($s[0],$s[0],$s[1]); 
    944                          $img->output(($alpha ? 'png' : 'jpeg'),$thumb_file,$rate); 
     941                         $img->output('jpeg',$thumb_file,$rate); 
    945942                         $img->loadImage($file); 
    946943                    } 
     
    961958          { 
    962959               $p = path::info($file->relname); 
    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'); 
     960               $thumb_old = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
    965961                
    966962               $p = path::info($newFile->relname); 
    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'); 
     963               $thumb_new = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 
    969964                
    970965               foreach ($this->thumb_sizes as $suffix => $s) { 
     
    979974     { 
    980975          $p = path::info($f); 
    981           $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 
    982           $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),'',$p['base'],'%s'); 
     976          $thumb = sprintf($this->thumb_tp,'',$p['base'],'%s'); 
    983977           
    984978          foreach ($this->thumb_sizes as $suffix => $s) { 
  • locales/en/main.po

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

    r1484 r1454  
    9595 
    9696msgid "This mode allows you to login without activating any of your plugins. This may be useful to solve compatibility problems" 
    97 msgstr "Ce mode vous permet de vous connecter sans activer de plugins. Il peut être utile pour résoudre un problème de compatibilité" 
     97msgstr "\"Ce mode vous permet de vous connecter sans activer de plugins. Il peut être utile pour résoudre un problème de compatibilité" 
    9898 
    9999msgid "Disable or delete any plugin suspected to cause trouble, then log out and log back in normally." 
     
    10381038#, fuzzy, php-format 
    10391039msgid "Path <strong>%s</strong> is not writable." 
    1040 msgstr "Le répertoire de cache <strong>%s</strong> n'est pas accessible en écriture." 
     1040msgstr "Le répertoire de cache %s n'est pas accessible en écriture." 
    10411041 
    10421042#, fuzzy 
     
    11231123#, php-format 
    11241124msgid "You can change your user language in your <a href=\"%1$s\">preferences</a> or change your blog's main language in your <a href=\"%2$s\">blog settings</a>." 
    1125 msgstr "Vous pouvez changer votre langue d'utilisateur dans vos <a href=\"%1$s\">préférences</a> ou changer la langue principale de votre blog dans vos <a href=\"%2$s\">paramètres du blog</a>." 
     1125msgstr "Vous pouvez changer votre langue d'utilisateur dans vos <a href=\"%1$s\">préférences</a> ou changer la langue principale de votre blog dans vos <a href=\"%2$s\">paramètres de blog</a>." 
    11261126 
    11271127msgid "Installed languages" 
     
    11931193msgstr "Gestionnaire de médias" 
    11941194 
    1195 msgid "Go to %s folder" 
    1196 msgstr "Aller au dossier %s" 
    1197  
    1198 msgid "Media details of %s" 
    1199 msgstr "Détails du média %s" 
    1200  
    12011195msgid "confirm removal" 
    12021196msgstr "Confirmer la suppression" 
     
    17901784 
    17911785msgid "If you want to change your email or password you must provide your current password." 
    1792 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe actuel." 
     1786msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe." 
    17931787 
    17941788msgid "No favorite selected" 
     
    18261820 
    18271821msgid "If you have changed this user email or password you must provide your current password to save these modifications." 
    1828 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe actuel pour enregistrer ces modifications." 
     1822msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe." 
    18291823 
    18301824msgid "My options" 
     
    20001994msgstr "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>." 
    20011995 
    2002 msgid "Manual checking of update done successfully." 
    2003 msgstr "Vérification manuelle de mise à jour effectuée avec succès." 
    2004  
    20051996msgid "No newer Dotclear version available." 
    20061997msgstr "Aucune nouvelle version de Dotclear n'est disponible." 
    20071998 
    2008 msgid "Force checking update Dotclear" 
    2009 msgstr "Forcer la vérification de mise à jour de Dotclear" 
    2010  
    20111999#, php-format 
    20122000msgid "Dotclear %s is available." 
     
    21452133#, fuzzy 
    21462134msgid "Go to the content" 
    2147 msgstr "Aller au contenu" 
     2135msgstr "Voir ce billet sur le site" 
    21482136 
    21492137#, fuzzy 
    21502138msgid "Go to the menu" 
    2151 msgstr "Aller au menu" 
     2139msgstr "Aller sur le site" 
    21522140 
    21532141msgid "Go to site" 
     
    22132201 
    22142202msgid "Users with posts cannot be deleted." 
    2215 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être supprimés." 
     2203msgstr "Les utilisateurs ayant écrit des billets ne peuvent être effacées." 
    22162204 
    22172205#, php-format 
     
    22552243msgstr "Êtes-vous certain de vouloir supprimer le thème \"%s\" ?" 
    22562244 
    2257 msgid "Are you sure you want to delete this backup?" 
    2258 msgstr "Êtes-vous certain de vouloir supprimer cette sauvegarde ?" 
    2259  
    22602245msgid "Zip file content" 
    22612246msgstr "Contenu du fichier zip" 
     
    22732258msgstr "Vous avez des modifications non sauvegardées. Changer de format vous fera perdre ces modifications. Continuer ?" 
    22742259 
    2275 msgid "Warning: post format change will not convert existing content. You will need to apply new format by yourself. Proceed anyway?" 
    2276 msgstr "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  
    22782260msgid "Loading enhanced uploader, please wait." 
    22792261msgstr "Chargement de l'interface avancée." 
     
    25242506#, fuzzy 
    25252507msgid "You are not allowed to reset categories order" 
    2526 msgstr "Vous n'êtes pas autorisé à réinitialiser l'ordre des catégories" 
     2508msgstr "Vous n'êtes pas autorisé à supprimer des catégories" 
    25272509 
    25282510msgid "Category URL must be unique." 
     
    30523034msgstr "Filtrer la liste des commentaires et rétroliens" 
    30533035 
    3054 msgid "comments per page" 
    3055 msgstr "commentaires par page" 
    3056  
    30573036msgid "Filter users list" 
    30583037msgstr "Filtrer la liste des utilisateurs" 
     
    30813060msgid "Add an introduction to the page." 
    30823061msgstr "Ajoute une introduction à la page." 
    3083  
    3084 msgid "(No cat)" 
    3085 msgstr "(aucune)" 
    3086  
    3087 msgid "Password strength: %s" 
    3088 msgstr "Force du mot de passe : %s" 
    3089  
    3090 msgid "very weak" 
    3091 msgstr "très faible" 
    3092  
    3093 msgid "weak" 
    3094 msgstr "faible" 
    3095  
    3096 msgid "mediocre" 
    3097 msgstr "moyen" 
    3098  
    3099 msgid "strong" 
    3100 msgstr "fort" 
    3101  
    3102 msgid "very strong" 
    3103 msgstr "très fort" 
    3104  
    3105 msgid "Confirm new password:" 
    3106 msgstr "Confirmez le nouveau mot de passe :" 
    3107  
    3108 msgid "Not selected" 
    3109 msgstr "Non sélectionné" 
    3110  
    3111 msgid "Back to comments list" 
    3112 msgstr "Retour à la liste des commentaires" 
    3113  
    3114 msgid "The current blog cannot be deleted." 
    3115 msgstr "Le blog courant ne peut être détruit." 
    3116  
    3117 msgid "Only superadmin can delete a blog." 
    3118 msgstr "Seul un superadministrateur peut supprimer un blog." 
    3119  
    3120 msgid "Invalid publication date" 
    3121 msgstr "Date de publication invalide." 
    3122  
    3123 msgid "Image alignment:" 
    3124 msgstr "Alignement de l'image :" 
    3125  
    3126 msgid "Finish the update" 
    3127 msgstr "Finir la mise à jour" 
    3128  
    3129 msgid "Information about this version" 
    3130 psgstr "Informations sur cette version" 
  • locales/fr/plugins.po

    r1483 r1396  
    4242 
    4343msgid "blog settings" 
    44 msgstr "paramètres du blog" 
     44msgstr "Réglages du blog" 
    4545 
    4646msgid "Value" 
     
    305305 
    306306msgid "No attachment." 
    307 msgstr "Pas de fichier attaché." 
     307msgstr "Pas de fichier attaché" 
    308308 
    309309msgid "Add files to this entry" 
     
    11661166msgstr "Pages" 
    11671167 
    1168 msgid "My first page" 
    1169 msgstr "Ma première page" 
    1170  
    1171 msgid "This is your first page. When you\'re ready to blog, log in to edit or delete it." 
    1172 msgstr "Ceci est votre première page. Quand vous serez prêt à bloguer, connectez-vous pour l'éditer ou la supprimer." 
    1173  
    11741168#, php-format 
    11751169msgid "%d page" 
     
    17561750 
    17571751msgid "Custom sidebar" 
    1758 msgstr "Volet supplémentaire" 
     1752msgstr "Bandeau supplémentaire" 
    17591753 
    17601754msgid "Update sidebars" 
    1761 msgstr "Mettre à jour les volets" 
     1755msgstr "Mettre à jour les bandeaux" 
    17621756 
    17631757msgid "Reset sidebars" 
    1764 msgstr "Réinitialiser les volets" 
     1758msgstr "Réinitialiser les bandeaux" 
    17651759 
    17661760msgid "Use of widgets" 
     
    19341928msgid "Edit theme files" 
    19351929msgstr "Modifier les fichiers du thème" 
    1936  
    1937 msgid "Blog settings" 
    1938 msgstr "Paramètres du blog" 
    1939  
    1940 msgid "Move widgets from this list to one of the sidebars." 
    1941 msgstr "Déplacez des widgets de cette liste vers l'un des volets." 
  • plugins/antispam/_admin.php

    r1474 r1207  
    5959          if ($ttl != null && $ttl >=0) { 
    6060               echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $ttl).' '. 
    61                sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog settings').'</a>'). 
     61               sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog preferences').'</a>'). 
    6262               '</p>'; 
    6363          } 
  • plugins/antispam/filters/class.dc.filter.iplookup.php

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

    r1366 r1179  
    6464     private function getLinks($text) 
    6565     { 
    66           // href attribute on "a" tags is second match 
    67           preg_match_all('|<a.*?href="(http.*?)"|', $text, $parts); 
    68  
    69           return $parts[1]; 
     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; 
    7080     } 
    7181} 
  • plugins/antispam/index.php

    r1474 r1423  
    170170     if ($moderationTTL != null && $moderationTTL >=0) { 
    171171          echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL).' '. 
    172           sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog settings').'</a>'). 
     172          sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog preferences').'</a>'). 
    173173               '</p>'; 
    174174     } 
     
    212212          '<td class="nowrap">'.form::checkbox(array('filters_active[]'),$fid,$f->active, '', '', false, 'title="'.__('Active').'"').'</td>'. 
    213213          '<td class="nowrap">'.form::checkbox(array('filters_auto_del[]'),$fid,$f->auto_delete, '', '', false, 'title="'.__('Auto Del.').'"').'</td>'. 
    214           '<td class="nowrap" scope="row">'.$f->name.'</td>'. 
     214          '<td class="nowrap" scope="raw">'.$f->name.'</td>'. 
    215215          '<td class="maximal">'.$f->description.'</td>'. 
    216216          '<td class="status">'.$gui_link.'</td>'. 
  • plugins/attachments/_admin.php

    r1468 r1398  
    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

    r1442 r1179  
    1616     /* Description*/    "Serve entries as simple web pages", 
    1717     /* Author */        "Olivier Meunier", 
    18      /* Version */       '1.3', 
     18     /* Version */       '1.2', 
    1919     array( 
    2020          'permissions' =>    'contentadmin,pages', 
     
    2222     ) 
    2323); 
     24?> 
  • plugins/pages/page.php

    r1480 r1454  
    455455      
    456456     echo 
    457      '<p><label for="post_status" class="ib">'.__('Page status:').'</label> '. 
     457     '<p><label for="post_status">'.__('Page status:').'</label> '. 
    458458     form::combo('post_status',$status_combo,$post_status,'','',!$can_publish). 
    459459     '</p>'. 
    460460      
    461      '<p><label for="post_dt" class="ib">'.__('Published on:').'</label>'. 
     461     '<p><label for="post_dt">'.__('Published on:').'</label>'. 
    462462     form::field('post_dt',16,16,$post_dt,($bad_dt ? 'invalid' : '')).'</p>'. 
    463463      
    464      '<p><label for="post_format" class="ib">'.__('Text formating:').'</label>'. 
     464     '<p><label for="post_format">'.__('Text formating:').'</label>'. 
    465465     form::combo('post_format',$formaters_combo,$post_format). 
    466466     ($post_id && $post_format != 'xhtml' ? '<a class="button" href="'.html::escapeURL($redir_url).'&amp;id='.$post_id.'&amp;xconv=1">'.__('Convert to XHTML').'</a>' : ''). 
     
    493493     '</p>'. 
    494494      
    495      '<p><label for="post_lang" class="ib">'.__('Page lang:').'</label>'. 
     495     '<p><label for="post_lang">'.__('Page lang:').'</label>'. 
    496496     form::combo('post_lang',$lang_combo,$post_lang).'</p>'. 
    497497      
    498      '<p><label for="post_password" class="ib">'.__('Page password:').'</label>'. 
     498     '<p><label for="post_password">'.__('Page password:').'</label>'. 
    499499     form::field('post_password',10,32,html::escapeHTML($post_password),'maximal'). 
    500500     '</p>'. 
    501501      
    502      '<div class="lockable ib">'. 
    503      '<p><label for="post_url" class="ib">'.__('Basename:').'</label>'. 
     502     '<div class="lockable">'. 
     503     '<p><label for="post_url">'.__('Basename:').'</label>'. 
    504504     form::field('post_url',10,255,html::escapeHTML($post_url),'maximal'). 
    505505     '</p>'. 
     
    512512     { 
    513513          echo 
    514           '<h4 class="clear">'.__('Attachments').'</h4>'; 
     514          '<h3 class="clear">'.__('Attachments').'</h3>'; 
    515515          foreach ($post_media as $f) 
    516516          { 
     
    541541           
    542542          if (empty($post_media)) { 
    543                echo '<p class="form-note">'.__('No attachment.').'</p>'; 
     543               echo '<p>'.__('No attachment.').'</p>'; 
    544544          } 
    545545          echo '<p><a class="button" href="media.php?post_id='.$post_id.'">'.__('Add files to this page').'</a></p>'; 
  • plugins/simpleMenu/index.php

    r1474 r1358  
    233233                     
    234234                         // All done successfully, return to menu items list 
    235                          http::redirect($p_url.'&amp;added=1'); 
     235                         http::redirect($p_url.'&added=1'); 
    236236                    } else { 
    237237                         throw new Exception(__('Label and URL of menu item are mandatory.')); 
     
    268268                     
    269269                    // All done successfully, return to menu items list 
    270                     http::redirect($p_url.'&amp;removed=1'); 
     270                    http::redirect($p_url.'&removed=1'); 
    271271               } else { 
    272272                    throw new Exception(__('No menu items selected.')); 
     
    302302 
    303303               // All done successfully, return to menu items list 
    304                http::redirect($p_url.'&amp;updated=1'); 
     304               http::redirect($p_url.'&updated=1'); 
    305305          } 
    306306          catch (Exception $e) { 
     
    339339 
    340340               // All done successfully, return to menu items list 
    341                http::redirect($p_url.'&amp;neworder=1'); 
     341               http::redirect($p_url.'&neworder=1'); 
    342342          }  
    343343          catch (Exception $e) { 
     
    402402          case 1: 
    403403               // Selection du type d'item 
    404                echo '<form id="additem" action="'.$p_url.'&amp;add=2" method="post">'; 
     404               echo '<form id="additem" action="'.$p_url.'&add=2" method="post">'; 
    405405               echo '<fieldset><legend>'.__('Select type').'</legend>'; 
    406406               echo '<p class="field"><label for="item_type" class="classic">'.__('Type of item menu:').'</label>'.form::combo('item_type',$items_combo,'').'</p>'; 
     
    412412               if ($items[$item_type][1]) { 
    413413                    // Choix à faire 
    414                     echo '<form id="additem" action="'.$p_url.'&amp;add=3" method="post">'; 
     414                    echo '<form id="additem" action="'.$p_url.'&add=3" method="post">'; 
    415415                    echo '<fieldset><legend>'.$item_type_label.'</legend>'; 
    416416                    switch ($item_type) { 
     
    449449          case 3: 
    450450               // Libellé et description 
    451                echo '<form id="additem" action="'.$p_url.'&amp;add=4" method="post">'; 
     451               echo '<form id="additem" action="'.$p_url.'&add=4" method="post">'; 
    452452               echo '<fieldset><legend>'.$item_type_label.($item_select_label != '' ? ' ('.$item_select_label.')' : '').'</legend>'; 
    453453               echo '<p class="field"><label for="item_label" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '. 
     
    467467// Liste des items 
    468468if (!$step) { 
    469      echo '<form id="menuitemsappend" action="'.$p_url.'&amp;add=1" method="post">'; 
     469     echo '<form id="menuitemsappend" action="'.$p_url.'&add=1" method="post">'; 
    470470     echo '<p class="top-add">'.$core->formNonce().'<input class="button add" type="submit" name="appendaction" value="'.__('Add an item').'" /></p>'; 
    471471     echo '</form>'; 
  • plugins/tags/_admin.php

    r1471 r1454  
    229229          if ($action == 'tags') 
    230230          { 
    231                echo dcPage::breadcrumb( 
    232                     array( 
    233                          html::escapeHTML($core->blog->name) => '', 
    234                          __('Entries') => 'posts.php', 
    235                          '<span class="page-title">'.__('Add tags to entries').'</span>' => '' 
    236                )). 
     231               echo 
     232               '<h2 class="page-title">'.__('Add tags to entries').'</h2>'. 
    237233               '<form action="'.$form_uri.'" method="post">'. 
    238                $hidden_fields->getEntries(). 
    239234               '<div><label for="new_tags" class="area">'.__('Tags to add:').'</label> '. 
    240235               form::textarea('new_tags',60,3). 
    241236               '</div>'. 
    242                $hidden_fields->getHidden(). 
     237               $hidden_fields. 
    243238               $core->formNonce(). 
    244239               form::hidden(array('action'),'tags'). 
     
    264259                    } 
    265260               } 
    266                echo dcPage::breadcrumb( 
    267                     array( 
    268                          html::escapeHTML($core->blog->name) => '', 
    269                          __('Entries') => 'posts.php', 
    270                          '<span class="page-title">'.__('Remove selected tags from entries').'</span>' => '' 
    271                )); 
     261                
     262               echo '<h2 class="page-title">'.__('Remove selected tags from entries').'</h2>'; 
    272263                
    273264               if (empty($tags)) { 
  • plugins/tags/tag_posts.php

    r1480 r1358  
    130130     { 
    131131          echo 
    132           '<div class="fieldset">'. 
    133132          '<form action="'.$this_url.'" method="post">'. 
    134           '<h3>'.__('Actions for this tag').'</h3>'. 
     133          '<div class="fieldset"><h3>'.__('Actions for this tag').'</h3>'. 
    135134          '<p><label for="new_tag_id">'.__('Edit tag name:').'</label>'. 
    136135          form::field('new_tag_id',20,255,html::escapeHTML($tag)). 
     
    162161     '<p class="col right"><label for="action" class="classic">'.__('Selected entries action:').'</label> '. 
    163162     form::combo('action',$combo_action). 
    164      '<input type="submit" value="'.__('OK').'" /></p>'. 
     163     '<input type="submit" value="'.__('ok').'" /></p>'. 
    165164     form::hidden('post_type',''). 
    166165     form::hidden('redir',$p_url.'&amp;m=tag_posts&amp;tag='. 
  • plugins/userPref/index.php

    r1474 r1358  
    8282     return 
    8383     '<tr class="line">'. 
    84      '<td scope="row"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
     84     '<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
    8585     '<td>'.$field.'</td>'. 
    8686     '<td>'.$s['type'].'</td>'. 
  • plugins/widgets/class.widgets.php

    r1474 r1454  
    246246                         '<p><label for="'.$wfid.'">'.$s['title'].'</label> '. 
    247247                         form::textarea(array($iname,$wfid),30,5,html::escapeHTML($s['value']),'maximal'). 
    248                          '</p>'; 
     248                         '</label></p>'; 
    249249                         break; 
    250250                    case 'check': 
  • plugins/widgets/index.php

    r1483 r1454  
    197197echo 
    198198'<form id="listWidgets" action="'.$p_url.'" method="post"  class="widgets">'. 
    199 '<h3>'.__('Available widgets').'</h3>'. 
    200 __('Move widgets from this list to one of the sidebars.'). 
     199'<fieldset><legend>'.__('Available widgets').'</legend>'. 
    201200'<div id="widgets">'; 
    202201 
     
    206205     '<div>'.form::hidden(array('w[void][0][id]'),html::escapeHTML($w->id())). 
    207206     '<p class="widget-name">'.form::field(array('w[void][0][order]'),2,3,0,'hideControl').' '. 
    208      $w->name().($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : '').'</p>'. 
     207     $w->name().($w->desc() != '' ? ' <span class="form-note">('.__($w->desc()).')</span>' : '').'</p>'. 
    209208     '<p class="js-remove"><label class="classic">'.__('Append to:').'</label> '. 
    210209     form::combo(array('addw['.$w->id().']'),$append_combo).'</p>'. 
     
    216215echo 
    217216'</div>'. 
     217'</fieldset>'. 
    218218'<p><input type="submit" class="js-remove" name="append" value="'.__('Add widgets to sidebars').'" />'. 
    219219$core->formNonce().'</p>'. 
     
    223223# Nav sidebar 
    224224echo 
    225 '<div id="sidebarNav" class="widgets fieldset">'. 
     225'<div id="sidebarNav" class="widgets">'. 
    226226sidebarWidgets('dndnav',__('Navigation sidebar'),$widgets_nav,'nav',$__default_widgets['nav'],$j). 
    227227'</div>'; 
     
    229229# Extra sidebar 
    230230echo 
    231 '<div id="sidebarExtra" class="widgets fieldset">'. 
     231'<div id="sidebarExtra" class="widgets">'. 
    232232sidebarWidgets('dndextra',__('Extra sidebar'),$widgets_extra,'extra',$__default_widgets['extra'],$j). 
    233233'</div>'; 
     
    235235# Custom sidebar 
    236236echo 
    237 '<div id="sidebarCustom" class="widgets fieldset">'. 
     237'<div id="sidebarCustom" class="widgets">'. 
    238238sidebarWidgets('dndcustom',__('Custom sidebar'),$widgets_custom,'custom',$__default_widgets['custom'],$j). 
    239239'</div>'; 
     
    316316function sidebarWidgets($id,$title,$widgets,$pr,$default_widgets,&$j) 
    317317{ 
    318      $res = '<h3>'.$title.'</h3><div id="'.$id.'">'; 
     318     $res = '<fieldset><legend>'.$title.'</legend><div id="'.$id.'">'; 
    319319      
    320320     if (!($widgets instanceof dcWidgets)) 
     
    335335          '<div>'.form::hidden(array($iname.'[id]'),html::escapeHTML($w->id())). 
    336336          '<p class="widget-name">'.form::field(array($iname.'[order]'),2,3,(string) $i,'js-hide','',0,'title="'.__('order').'"').' '. 
    337           $w->name().($w->desc() != '' ? ' <!-- <span class="form-note">'.__($w->desc()).'</span> -->' : '').'</p>'. 
     337          $w->name().($w->desc() != '' ? ' <span class="form-note">('.__($w->desc()).')</span>' : '').'</p>'. 
    338338          '<p class="removeWidget js-remove"><label class="classic">'. 
    339339          form::checkbox(array($iname.'[_rem]'),'1',0).' '.__('Remove widget'). 
     
    346346     } 
    347347      
    348      $res .= '</div>'; 
     348     $res .= '</div></fieldset>'; 
    349349      
    350350     return $res; 
  • plugins/widgets/style.css

    r1483 r1301  
    11#listWidgets { 
    22     float: left; 
    3      width: 45%; 
    4      background: #eee; 
    5      padding: 1.5em 1%;  
    6      border: 1px solid #ccc; 
    7      margin-left: 1.5em; 
    8 } 
    9 #widgets .widget-name { 
    10      background: #fff; 
    11      min-height: 3em; 
    12 } 
    13 #listWidgets h3 { 
    14      color: #333; 
     3     width: 33%; 
    154} 
    165 
    176#sidebarsWidgets { 
    187     float: left; 
    19      width: 45%; 
    20      margin-left: 3%; 
    21      padding: 0 1%; 
     8     width: 65%; 
     9     margin-left: 1%; 
    2210} 
     11#sidebarNav { 
     12     float: left; 
     13     width: 50%; 
     14     margin-left: 0%; 
     15} 
     16#sidebarExtra { 
     17     float: left; 
     18     width: 49%; 
     19     margin-left: 1%; 
     20} 
     21#sidebarCustom { 
     22     float: left; 
     23     width: 100%; 
     24} 
     25 
    2326#sidebarsControl { 
    2427     clear: left; 
    2528} 
    26 .widgets.fieldset { 
    27      margin-bottom: 2em; 
    28 } 
    2929 
    30 #widgets, #dndnav, #dndextra, #dndcustom { 
     30#widgets, #dndnav, #dndextra { 
    3131     padding: 1em 0; 
    3232} 
    3333 
    34 .widget-name { 
    35      background: #eef; 
     34.widgets fieldset { 
     35     border: 1px solid #999; 
     36} 
     37.widgets legend { 
     38     border: 1px solid #999; 
     39} 
     40 
     41.widgets p.widget-name { 
     42     background: #F0EFEA; 
    3643     color: #000; 
    37      padding: 4px 6px; 
     44     padding: 4px; 
    3845     margin: 0.5em 0 0 0; 
    3946     border-width: 1px 1px 1px 1px; 
    4047     border-style: solid; 
    41      border-color: #999; 
     48     border-color: #bbb; 
    4249     font-weight: bold; 
    4350} 
    44 .widget-name span { 
    45      display: block; 
    46      font-style: normal; 
    47      font-size: 1.1rem; 
    48 } 
    49 .widget-name img { 
     51.widgets p.widget-name img { 
    5052     cursor: pointer; 
    5153     margin-bottom: -1px; 
     
    5658     border-style: solid; 
    5759     border-color: #666; 
    58      padding: 4px 6px; 
    59      background: #f5f5f5; 
     60     padding: 4px; 
     61     background: #E5E3DA; 
    6062} 
    6163 
Note: See TracChangeset for help on using the changeset viewer.

Sites map