mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Changed the use of import to uses.
This commit is contained in:
parent
50c21ccdfe
commit
3c703641b0
4 changed files with 14 additions and 10 deletions
|
@ -16,8 +16,9 @@
|
||||||
* @since CakePHP(tm) v 2.0.0
|
* @since CakePHP(tm) v 2.0.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
App::import('Core', array('Validation', 'Multibyte'));
|
App::uses('Validation', 'Utility');
|
||||||
App::import('Lib', 'email/AbstractTransport');
|
App::uses('Multibyte', 'I18n');
|
||||||
|
App::uses('AbstractTransport', 'Network/Email');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cake e-mail class.
|
* Cake e-mail class.
|
||||||
|
@ -813,8 +814,10 @@ class CakeEmail {
|
||||||
$this->_message[] = '';
|
$this->_message[] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$transportClassname = Inflector::camelize($this->_transportName) . 'Transport';
|
list($plugin, $transportClassname) = pluginSplit($this->_transportName, true);
|
||||||
if (!App::import('Lib', 'email/' . $transportClassname)) {
|
$transportClassname .= 'Transport';
|
||||||
|
App::uses($transportClassname, $plugin . 'Network/Email');
|
||||||
|
if (!class_exists($transportClassname)) {
|
||||||
throw new SocketException(__('Class "%s" not found.', $transportClassname));
|
throw new SocketException(__('Class "%s" not found.', $transportClassname));
|
||||||
} elseif (!method_exists($transportClassname, 'send')) {
|
} elseif (!method_exists($transportClassname, 'send')) {
|
||||||
throw new SocketException(__('The "%s" do not have send method.', $transportClassname));
|
throw new SocketException(__('The "%s" do not have send method.', $transportClassname));
|
||||||
|
@ -1030,9 +1033,9 @@ class CakeEmail {
|
||||||
$viewClass = $this->_viewRender;
|
$viewClass = $this->_viewRender;
|
||||||
|
|
||||||
if ($viewClass !== 'View') {
|
if ($viewClass !== 'View') {
|
||||||
list($plugin, $viewClass) = pluginSplit($viewClass);
|
list($plugin, $viewClass) = pluginSplit($viewClass, true);
|
||||||
$viewClass = $viewClass . 'View';
|
$viewClass .= 'View';
|
||||||
App::import('View', $this->_viewRender);
|
App::uses($viewClass, $plugin . 'View');
|
||||||
}
|
}
|
||||||
|
|
||||||
$View = new $viewClass(null);
|
$View = new $viewClass(null);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* @since CakePHP(tm) v 2.0.0
|
* @since CakePHP(tm) v 2.0.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
App::import('Core', 'CakeSocket');
|
App::uses('CakeSocket', 'Network');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SendEmail class
|
* SendEmail class
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* @since CakePHP(tm) v 2.0.0
|
* @since CakePHP(tm) v 2.0.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
App::import('Core', 'CakeEmail');
|
App::uses('CakeEmail', 'Network');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Help to test CakeEmail
|
* Help to test CakeEmail
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
* @since CakePHP(tm) v 2.0.0
|
* @since CakePHP(tm) v 2.0.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
App::import('Lib', array('CakeEmail', 'email/AbstractTransport', 'email/SmtpTransport'));
|
App::uses('CakeEmail', 'Network');
|
||||||
|
App::uses('SmtpTransport', 'Network/Email');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Help to test SmtpTransport
|
* Help to test SmtpTransport
|
||||||
|
|
Loading…
Add table
Reference in a new issue