Remove PHP4 code from dynamic call, and change call__ to __call.

This commit is contained in:
predominant 2010-04-05 16:43:20 +10:00
parent b65395c155
commit e0534a7a70

View file

@ -491,7 +491,7 @@ class Model extends Overloadable {
* @param array $params Parameters for the method. * @param array $params Parameters for the method.
* @return mixed Whatever is returned by called method * @return mixed Whatever is returned by called method
*/ */
protected function call__($method, $params) { public function __call($method, $params) {
$result = $this->Behaviors->dispatchMethod($this, $method, $params); $result = $this->Behaviors->dispatchMethod($this, $method, $params);
if ($result !== array('unhandled')) { if ($result !== array('unhandled')) {
@ -500,9 +500,6 @@ class Model extends Overloadable {
$db =& ConnectionManager::getDataSource($this->useDbConfig); $db =& ConnectionManager::getDataSource($this->useDbConfig);
$return = $db->query($method, $params, $this); $return = $db->query($method, $params, $this);
if (!PHP5) {
$this->resetAssociations();
}
return $return; return $return;
} }