Dotclear


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

Cope with post deletion sooner

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/pages/page.php

    r986 r1068  
    193193} 
    194194 
    195 # Create or update post 
     195# Delete page 
     196if (!empty($_POST['delete']) && $can_delete) 
     197{ 
     198     try { 
     199          # --BEHAVIOR-- adminBeforePageDelete 
     200          $core->callBehavior('adminBeforePageDelete',$post_id); 
     201          $core->blog->delPost($post_id); 
     202          http::redirect($p_url); 
     203     } catch (Exception $e) { 
     204          $core->error->add($e->getMessage()); 
     205     } 
     206} 
     207 
     208# Create or update page 
    196209if (!empty($_POST) && !empty($_POST['save']) && $can_edit_page && !$bad_dt) 
    197210{ 
     
    263276               $core->error->add($e->getMessage()); 
    264277          } 
    265      } 
    266 } 
    267  
    268 if (!empty($_POST['delete']) && $can_delete) 
    269 { 
    270      try { 
    271           # --BEHAVIOR-- adminBeforePageDelete 
    272           $core->callBehavior('adminBeforePageDelete',$post_id); 
    273           $core->blog->delPost($post_id); 
    274           http::redirect($p_url); 
    275      } catch (Exception $e) { 
    276           $core->error->add($e->getMessage()); 
    277278     } 
    278279} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map