Dotclear


Ignore:
Timestamp:
12/14/12 18:35:15 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Cope with post deletion sooner

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/post.php

    r957 r1068  
    202202} 
    203203 
     204# Delete post 
     205if (!empty($_POST['delete']) && $can_delete) 
     206{ 
     207     try { 
     208          # --BEHAVIOR-- adminBeforePostDelete 
     209          $core->callBehavior('adminBeforePostDelete',$post_id); 
     210          $core->blog->delPost($post_id); 
     211          http::redirect('posts.php'); 
     212     } catch (Exception $e) { 
     213          $core->error->add($e->getMessage()); 
     214     } 
     215} 
     216 
    204217# Create or update post 
    205218if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post && !$bad_dt) 
     
    268281               $core->error->add($e->getMessage()); 
    269282          } 
    270      } 
    271 } 
    272  
    273 if (!empty($_POST['delete']) && $can_delete) 
    274 { 
    275      try { 
    276           # --BEHAVIOR-- adminBeforePostDelete 
    277           $core->callBehavior('adminBeforePostDelete',$post_id); 
    278           $core->blog->delPost($post_id); 
    279           http::redirect('posts.php'); 
    280      } catch (Exception $e) { 
    281           $core->error->add($e->getMessage()); 
    282283     } 
    283284} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map