Dotclear


Ignore:
Timestamp:
09/22/13 11:38:22 (12 years ago)
Author:
Dsls
Branch:
default
Parents:
1998:dae906985ebb (diff), 1905:d72d24250853 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Fusion avec actionsreloaded

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/comments.php

    r1905 r1999  
    6666$show_filters = false; 
    6767 
    68 $page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1; 
     68$page = !empty($_GET['page']) ? max(1,(integer) $_GET['page']) : 1; 
    6969$nb_per_page =  30; 
    7070 
  • admin/comments.php

    r1912 r1999  
    131131$combo_action = array(); 
    132132$default = ''; 
    133 if ($core->auth->check('publish,contentadmin',$core->blog->id)) 
     133if ($core->auth->check('delete,contentadmin',$core->blog->id) && $status == -2) 
    134134{ 
    135      $combo_action[__('Publish')] = 'publish'; 
    136      $combo_action[__('Unpublish')] = 'unpublish'; 
    137      $combo_action[__('Mark as pending')] = 'pending'; 
    138      $combo_action[__('Mark as junk')] = 'junk'; 
    139 } 
    140 if ($core->auth->check('delete,contentadmin',$core->blog->id)) 
    141 { 
    142      $combo_action[__('Delete')] = 'delete'; 
    143      if ($status == -2) { 
    144           $default = 'delete'; 
    145      } 
    146 } 
    147  
    148 # --BEHAVIOR-- adminCommentsActionsCombo 
    149 $core->callBehavior('adminCommentsActionsCombo',array(&$combo_action)); 
     135     $default = 'delete'; 
     136} 
     137 
     138$comments_actions_page = new dcCommentsActionsPage($core,'comments.php'); 
     139 
     140$comments_actions_page->process(); 
    150141 
    151142/* Get comments 
     
    165156     $starting_script .= dcPage::jsLoad('js/filter-controls.js'); 
    166157} 
    167 # --BEHAVIOR-- adminCommentsHeaders 
    168 $starting_script .= $core->callBehavior('adminCommentsHeaders'); 
    169158 
    170159dcPage::open(__('Comments and trackbacks'),$starting_script, 
     
    175164          )) 
    176165); 
     166if (!empty($_GET['upd'])) { 
     167     dcPage::success(__('Selected comments have been successfully updated.')); 
     168} elseif (!empty($_GET['del'])) { 
     169     dcPage::success(__('Selected comments have been successfully deleted.')); 
     170} 
    177171 
    178172if (!$core->error->flag()) 
     
    254248     # Show comments 
    255249     $comment_list->display($page,$nb_per_page, 
    256      '<form action="comments_actions.php" method="post" id="form-comments">'. 
     250     '<form action="comments.php" method="post" id="form-comments">'. 
    257251      
    258252     '%s'. 
     
    262256      
    263257     '<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '. 
    264      form::combo('action',$combo_action,$default,'','','','title="'.__('Actions').'"'). 
     258     form::combo('action',$comments_actions_page->getCombo(),$default,'','','','title="'.__('Actions').'"'). 
    265259     $core->formNonce(). 
    266260     '<input type="submit" value="'.__('ok').'" /></p>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map