Guest User

updateAll replacement

a guest
Apr 17th, 2012
247
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function updateAll($fields, $conditions = true) {
  2.         $args = func_get_args();
  3.         $output = call_user_func_array(array('parent', 'updateAll'), $args);
  4.         if ($output) {
  5.             $created = false;
  6.             $options = array();
  7.             $this->Behaviors->trigger($this, 'afterSave', array(
  8.                 $created,
  9.                 $options,
  10.             ));
  11.             $this->afterSave($created);
  12.             $this->_clearCache();
  13.             return true;
  14.         }
  15.         return false;
  16.     }
RAW Paste Data