Changeset 2566:9bf417837888 for plugins/pages/class.actionpage.php
- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/pages/class.actionpage.php
r2256 r2566 30 30 ); 31 31 $this->endPage(); 32 } 32 } 33 33 public function beginPage($breadcrumb='',$head='') { 34 34 echo '<html><head><title>'.__('Pages').'</title>'. … … 40 40 41 41 } 42 42 43 43 public function endPage() { 44 44 echo '</body></html>'; … … 58 58 return parent::process(); 59 59 } 60 60 61 61 public static function doReorderPages($core, dcPostsActionsPage $ap, $post) { 62 62 foreach($post['order'] as $post_id => $value) { 63 63 if (!$core->auth->check('publish,contentadmin',$core->blog->id)) 64 64 throw new Exception(__('You are not allowed to change this entry status')); 65 65 66 66 $strReq = "WHERE blog_id = '".$core->con->escape($core->blog->id)."' ". 67 67 "AND post_id ".$core->con->in($post_id); 68 68 69 69 #If user can only publish, we need to check the post's owner 70 70 if (!$core->auth->check('contentadmin',$core->blog->id)) 71 71 $strReq .= "AND user_id = '".$core->con->escape($core->auth->userID())."' "; 72 72 73 73 $cur = $core->con->openCursor($core->prefix.'post'); 74 74 75 75 $cur->post_position = (integer) $value-1; 76 76 $cur->post_upddt = date('Y-m-d H:i:s'); 77 77 78 78 $cur->update($strReq); 79 79 $core->blog->triggerBlog(); 80 80 81 81 } 82 82 83 83 dcPage::addSuccessNotice(__('Selected pages have been successfully reordered.')); 84 84 $ap->redirect(false); 85 } 85 } 86 86 } 87 87 88 class DefaultPagesActions 88 class DefaultPagesActions 89 89 { 90 90 public static function adminPagesActionsPage($core, $ap) {
Note: See TracChangeset
for help on using the changeset viewer.