Changeset 1068:bb240da6a058
- Timestamp:
- 12/14/12 18:35:15 (13 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post.php
r957 r1068 202 202 } 203 203 204 # Delete post 205 if (!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 204 217 # Create or update post 205 218 if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post && !$bad_dt) … … 268 281 $core->error->add($e->getMessage()); 269 282 } 270 }271 }272 273 if (!empty($_POST['delete']) && $can_delete)274 {275 try {276 # --BEHAVIOR-- adminBeforePostDelete277 $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());282 283 } 283 284 } -
plugins/pages/page.php
r986 r1068 193 193 } 194 194 195 # Create or update post 195 # Delete page 196 if (!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 196 209 if (!empty($_POST) && !empty($_POST['save']) && $can_edit_page && !$bad_dt) 197 210 { … … 263 276 $core->error->add($e->getMessage()); 264 277 } 265 }266 }267 268 if (!empty($_POST['delete']) && $can_delete)269 {270 try {271 # --BEHAVIOR-- adminBeforePageDelete272 $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());277 278 } 278 279 }
Note: See TracChangeset
for help on using the changeset viewer.