Dotclear


Ignore:
Timestamp:
11/17/13 20:25:53 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.6
Children:
2567:6c11245cbf04, 2568:61c67a7d17fa
Message:

Add some people in CREDITS, remove trailing spaces and tabs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/comment.php

    r2256 r2566  
    3636     { 
    3737          $rs = $core->blog->getPosts(array('post_id' => $_POST['post_id'], 'post_type' => '')); 
    38            
     38 
    3939          if ($rs->isEmpty()) { 
    4040               throw new Exception(__('Entry does not exist.')); 
    4141          } 
    42            
     42 
    4343          $cur = $core->con->openCursor($core->prefix.'comment'); 
    44            
     44 
    4545          $cur->comment_author = $_POST['comment_author']; 
    4646          $cur->comment_email = html::clean($_POST['comment_email']); 
     
    4848          $cur->comment_content = $core->HTMLfilter($_POST['comment_content']); 
    4949          $cur->post_id = (integer) $_POST['post_id']; 
    50            
     50 
    5151          # --BEHAVIOR-- adminBeforeCommentCreate 
    5252          $core->callBehavior('adminBeforeCommentCreate',$cur); 
    53            
     53 
    5454          $comment_id = $core->blog->addComment($cur); 
    55            
     55 
    5656          # --BEHAVIOR-- adminAfterCommentCreate 
    5757          $core->callBehavior('adminAfterCommentCreate',$cur,$comment_id); 
    58            
     58 
    5959          dcPage::addSuccessNotice(__('Comment has been successfully created.')); 
    6060          http::redirect($core->getPostAdminURL($rs->post_type,$rs->post_id,false).'&co=1'); 
     
    6767{ 
    6868     $params['comment_id'] = $_REQUEST['id']; 
    69       
     69 
    7070     try { 
    7171          $rs = $core->blog->getComments($params); 
     
    9797{ 
    9898     $can_edit = $can_delete = $can_publish = $core->auth->check('contentadmin',$core->blog->id); 
    99       
     99 
    100100     if (!$core->auth->check('contentadmin',$core->blog->id) && $core->auth->userID() == $rs->user_id) { 
    101101          $can_edit = true; 
     
    107107          } 
    108108     } 
    109       
     109 
    110110     # update comment 
    111111     if (!empty($_POST['update']) && $can_edit) 
    112112     { 
    113113          $cur = $core->con->openCursor($core->prefix.'comment'); 
    114            
     114 
    115115          $cur->comment_author = $_POST['comment_author']; 
    116116          $cur->comment_email = html::clean($_POST['comment_email']); 
    117117          $cur->comment_site = html::clean($_POST['comment_site']); 
    118118          $cur->comment_content = $core->HTMLfilter($_POST['comment_content']); 
    119            
     119 
    120120          if (isset($_POST['comment_status'])) { 
    121121               $cur->comment_status = (integer) $_POST['comment_status']; 
    122122          } 
    123            
     123 
    124124          try 
    125125          { 
    126126               # --BEHAVIOR-- adminBeforeCommentUpdate 
    127127               $core->callBehavior('adminBeforeCommentUpdate',$cur,$comment_id); 
    128                 
     128 
    129129               $core->blog->updComment($comment_id,$cur); 
    130                 
     130 
    131131               # --BEHAVIOR-- adminAfterCommentUpdate 
    132132               $core->callBehavior('adminAfterCommentUpdate',$cur,$comment_id); 
    133                 
     133 
    134134               dcPage::addSuccessNotice(__('Comment has been successfully updated.')); 
    135135               http::redirect('comment.php?id='.$comment_id); 
     
    140140          } 
    141141     } 
    142       
     142 
    143143     if (!empty($_POST['delete']) && $can_delete) 
    144144     { 
     
    146146               # --BEHAVIOR-- adminBeforeCommentDelete 
    147147               $core->callBehavior('adminBeforeCommentDelete',$comment_id); 
    148                 
     148 
    149149               $core->blog->delComment($comment_id); 
    150                 
     150 
    151151               dcPage::addSuccessNotice(__('Comment has been successfully deleted.')); 
    152152               http::redirect($core->getPostAdminURL($rs->post_type,$rs->post_id).'&co=1',false); 
     
    155155          } 
    156156     } 
    157       
     157 
    158158     if (!$can_edit) { 
    159159          $core->error->add(__("You can't edit this comment.")); 
     
    193193          dcPage::success(__('Comment has been successfully updated.')); 
    194194     } 
    195       
     195 
    196196     $comment_mailto = ''; 
    197197     if ($comment_email) 
     
    210210     '<p>'.__('IP address:').' '. 
    211211     '<a href="comments.php?ip='.$comment_ip.'">'.$comment_ip.'</a></p>'. 
    212       
     212 
    213213     '<p>'.__('Date:').' '. 
    214214     dt::dt2str(__('%Y-%m-%d %H:%M'),$comment_dt).'</p>'. 
    215215     '</div>'. 
    216216 
    217      '<h3>'.__('Comment submitted').'</h3>'.  
     217     '<h3>'.__('Comment submitted').'</h3>'. 
    218218     '<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr>'.__('Author:').'</label>'. 
    219219     form::field('comment_author',30,255,html::escapeHTML($comment_author)). 
    220220     '</p>'. 
    221       
     221 
    222222     '<p><label for="comment_email">'.__('Email:').'</label>'. 
    223223     form::field('comment_email',30,255,html::escapeHTML($comment_email)). 
    224224     '<span>'.$comment_mailto.'</span>'. 
    225225     '</p>'. 
    226       
     226 
    227227     '<p><label for="comment_site">'.__('Web site:').'</label>'. 
    228228     form::field('comment_site',30,255,html::escapeHTML($comment_site)). 
    229229     '</p>'. 
    230       
     230 
    231231     '<p><label for="comment_status">'.__('Status:').'</label>'. 
    232232     form::combo('comment_status',$status_combo,$comment_status,'','',!$can_publish). 
    233233     '</p>'. 
    234       
     234 
    235235     # --BEHAVIOR-- adminAfterCommentDesc 
    236236     $core->callBehavior('adminAfterCommentDesc', $rs). 
    237       
     237 
    238238     '<p class="area"><label for="comment_content">'.__('Comment:').'</label> '. 
    239239     form::textarea('comment_content',50,10,html::escapeHTML($comment_content)). 
    240240     '</p>'. 
    241       
     241 
    242242     '<p>'.form::hidden('id',$comment_id). 
    243243     $core->formNonce(). 
    244244     '<input type="submit" accesskey="s" name="update" value="'.__('Save').'" /> '; 
    245       
     245 
    246246     if ($can_delete) { 
    247247          echo '<input type="submit" class="delete" name="delete" value="'.__('Delete').'" />'; 
     
    254254dcPage::helpBlock('core_comments'); 
    255255dcPage::close(); 
    256 ?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map