Guest User

Untitled

a guest
Jul 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <?php
  2. if($this->data){
  3. if(isset($this->data['Rank']['order']) && !empty($this->data['Rank']['order'])){
  4. $this->Rank->set($this->data);
  5. if($this->Rank->validates()){
  6. if($this->Rank->saveAll($this->Rank->rank_transform($this->data), array('validate'=>false,'atomic'=>false))){
  7. $this->Session->setFlash('Company rank order has been updated','default',array('class'=>'okay'));
  8. }else{
  9. $this->Session->setFlash('Could not save the new order','default',array('class'=>'message'));
  10. }
  11. }else{
  12. $this->Session->setFlash('There is a problem with your submission','default',array('class'=>'message'));
  13. }
  14. }else{
  15. $this->Session->setFlash('No changes to save','default',array('class'=>'message'));
  16. }
  17. }
  18. ?>
Add Comment
Please, Sign In to add comment