From fa599bdf182cb8370fc8827cd54c55913c880092 Mon Sep 17 00:00:00 2001 From: Sebastien Heraud Date: Tue, 10 Oct 2017 11:33:45 +0200 Subject: [PATCH] Make "->bind" consistent with "set", "setProperty" --- libraries/cms/cck/content.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/libraries/cms/cck/content.php b/libraries/cms/cck/content.php index dd7b02106..6b4b29af7 100644 --- a/libraries/cms/cck/content.php +++ b/libraries/cms/cck/content.php @@ -459,6 +459,22 @@ public function batchResults() return $this; } + // bind + public function bind( $instance_name, $data ) + { + if ( !$this->isSuccessful() ) { + return $this; + } + + $result = $this->{'_instance_'.$instance_name}->bind( $data ); + + if ( !$result ) { + $this->_error = true; + } + + return $this; + } + // call public function call() { @@ -964,15 +980,7 @@ protected function isNew() // -------- -------- -------- -------- -------- -------- -------- -------- // Save - // bind - public function bind( $instance_name, $data ) - { - if ( !$this->isSuccessful() ) { - return false; - } - return $this->{'_instance_'.$instance_name}->bind( $data ); - } // check public function check( $instance_name )