Skip to content

Commit

Permalink
dropping first parameter for _applyConfig()
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Aug 25, 2011
1 parent 4cc5295 commit c93274a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/Cake/Network/Email/CakeEmail.php
Expand Up @@ -897,7 +897,7 @@ public function config($config = null) {
$config = (string)$config;
}

$this->_applyConfig($this, $config);
$this->_applyConfig($config);
return $this;
}

Expand Down Expand Up @@ -974,7 +974,7 @@ public static function deliver($to = null, $subject = null, $message = null, $tr
if (is_array($message)) {
$instance->viewVars($message);
$message = null;
} elseif ($message === null && in_array('message', $config = $this->config())) {
} elseif ($message === null && in_array('message', $config = $instance->config())) {
$message = $config['message'];
}

Expand All @@ -992,7 +992,7 @@ public static function deliver($to = null, $subject = null, $message = null, $tr
* @param array $config
* @return void
*/
protected function _applyConfig(CakeEmail $obj, $config) {
protected function _applyConfig($config) {
if (is_string($config)) {
if (!config('email')) {
throw new SocketException(__d('cake', '%s not found.', APP . 'Config' . DS . 'email.php'));
Expand All @@ -1011,12 +1011,12 @@ protected function _applyConfig(CakeEmail $obj, $config) {
);
foreach ($simpleMethods as $method) {
if (isset($config[$method])) {
$obj->$method($config[$method]);
$this->$method($config[$method]);
unset($config[$method]);
}
}
if (isset($config['headers'])) {
$obj->setHeaders($config['headers']);
$this->setHeaders($config['headers']);
unset($config['headers']);
}
if (array_key_exists('template', $config)) {
Expand All @@ -1025,10 +1025,10 @@ protected function _applyConfig(CakeEmail $obj, $config) {
$layout = $config['layout'];
unset($config['layout']);
}
$obj->template($config['template'], $layout);
$this->template($config['template'], $layout);
unset($config['template']);
}
$obj->transportClass()->config($config);
$this->transportClass()->config($config);
}

/**
Expand Down

0 comments on commit c93274a

Please sign in to comment.