diff --git a/engine/modules/mail/Mail.class.php b/engine/modules/mail/Mail.class.php index 3b9e2580..9aeb08cf 100644 --- a/engine/modules/mail/Mail.class.php +++ b/engine/modules/mail/Mail.class.php @@ -15,7 +15,7 @@ --------------------------------------------------------- */ -require_once(DIR_SERVER_ENGINE.'/lib/external/phpMailer/class.phpmailer.php'); +require_once(Config::Get('path.root.engine').'/lib/external/phpMailer/class.phpmailer.php'); /** * Модуль для отправки почты(e-mail) через phpMailer @@ -27,23 +27,23 @@ class LsMail extends Module { * Настройки SMTP сервера для отправки писем * */ - protected $sHost=SYS_MAIL_SMTP_HOST; - protected $iPort=SYS_MAIL_SMTP_PORT; - protected $sUsername=SYS_MAIL_SMTP_USER; - protected $sPassword=SYS_MAIL_SMTP_PASSWORD; - protected $bSmtpAuth=SYS_MAIL_SMTP_AUTH; + protected $sHost; + protected $iPort; + protected $sUsername; + protected $sPassword; + protected $bSmtpAuth; /** * Метод отправки почты * * @var string */ - protected $sMailerType=SYS_MAIL_TYPE; + protected $sMailerType; /** * Кодировка писем * * @var string */ - protected $sCharSet=SYS_MAIL_CHARSET; + protected $sCharSet; /** * Делать или нет перенос строк в письме * @@ -56,13 +56,13 @@ class LsMail extends Module { * * @var string */ - protected $sFrom=SYS_MAIL_FROM_EMAIL; + protected $sFrom; /** * Имя от кого отправляется вся почта * * @var string */ - protected $sFromName=SYS_MAIL_FROM_NAME; + protected $sFromName; protected $sSubject=''; protected $sBody=''; @@ -71,6 +71,31 @@ class LsMail extends Module { * */ public function Init() { + /** + * Настройки SMTP сервера для отправки писем + */ + $this->sHost = Config::Get('sys.mail.smtp.host'); + $this->iPort = Config::Get('sys.mail.smtp.port'); + $this->sUsername = Config::Get('sys.mail.smtp.user'); + $this->sPassword = Config::Get('sys.mail.smtp.password'); + $this->bSmtpAuth = Config::Get('sys.mail.smtp.auth'); + /** + * Метод отправки почты + */ + $this->sMailerType=Config::Get('sys.mail.type'); + /** + * Кодировка писем + */ + $this->sCharSet=Config::Get('sys.mail.charset'); + /** + * Мыло от кого отправляется вся почта + */ + $this->sFrom=Config::Get('sys.mail.from_email'); + /** + * Имя от кого отправляется вся почта + */ + $this->sFromName=Config::Get('sys.mail.from_name'); + /** * Создаём объект phpMailer и устанвливаем ему необходимые настройки */ diff --git a/engine/modules/session/Session.class.php b/engine/modules/session/Session.class.php index cb32f69e..31c32f83 100644 --- a/engine/modules/session/Session.class.php +++ b/engine/modules/session/Session.class.php @@ -35,7 +35,7 @@ class LsSession extends Module { * Инициализация модуля * */ - public function Init() { + public function Init() { /** * Стартуем сессию */ diff --git a/engine/modules/text/Text.class.php b/engine/modules/text/Text.class.php index 7e4629af..5c65184f 100644 --- a/engine/modules/text/Text.class.php +++ b/engine/modules/text/Text.class.php @@ -15,7 +15,7 @@ --------------------------------------------------------- */ -require_once(DIR_SERVER_ENGINE.'/lib/external/Jevix/jevix.class.php'); +require_once(Config::Get('path.root.engine').'/lib/external/Jevix/jevix.class.php'); /** * Модуль обработки текста на основе типографа Jevix @@ -38,7 +38,7 @@ class LsText extends Module { * Создаем объект типографа и запускаем его конфигурацию */ $this->oJevix = new Jevix(); - $this->JevixConfig(); + $this->JevixConfig(); } /** @@ -128,7 +128,7 @@ class LsText extends Module { $sResult=$this->JevixParser($sResult); $sResult=$this->VideoParser($sResult); $sResult=$this->CodeSourceParser($sResult); - if (BLOG_URL_NO_INDEX) { + if (Config::Get('view.noindex')) { // требует доработки, т.к. обрабатывает ВСЕ ссылки, включая в $sResult=$this->MakeUrlNoIndex($sResult); } diff --git a/engine/modules/viewer/Viewer.class.php b/engine/modules/viewer/Viewer.class.php index 47250e50..c110ab41 100644 --- a/engine/modules/viewer/Viewer.class.php +++ b/engine/modules/viewer/Viewer.class.php @@ -15,7 +15,7 @@ --------------------------------------------------------- */ -require_once(DIR_SERVER_ENGINE.'/lib/external/Smarty-2.6.19/libs/Smarty.class.php'); +require_once(Config::Get('path.root.engine').'/lib/external/Smarty-2.6.19/libs/Smarty.class.php'); /** * Модуль обработки шаблонов используя шаблонизатор Smarty @@ -39,19 +39,19 @@ class LsViewer extends Module { * * @var unknown_type */ - protected $sHtmlTitle=SITE_NAME; + protected $sHtmlTitle; /** * SEO ключевые слова страницы * * @var unknown_type */ - protected $sHtmlKeywords=SITE_KEYWORDS; + protected $sHtmlKeywords; /** * SEO описание страницы * * @var unknown_type */ - protected $sHtmlDescription=SITE_DESCRIPTION; + protected $sHtmlDescription; /** * Разделитель заголовка HTML страницы @@ -83,15 +83,28 @@ class LsViewer extends Module { * Инициализация модуля * */ - public function Init() { + public function Init() { + /** + * Заголовок HTML страницы + */ + $this->sHtmlTitle=Config::Get('view.name'); + /** + * SEO ключевые слова страницы + */ + $this->sHtmlKeywords=Config::Get('view.keywords'); + /** + * SEO описание страницы + */ + $this->sHtmlDescription=Config::Get('view.description'); + /** * Создаём объект Smarty и устанавливаем необходиму параметры */ $this->oSmarty = new Smarty(); - $this->oSmarty->template_dir=DIR_SMARTY_TEMPLATE; - $this->oSmarty->compile_dir=DIR_SMARTY_COMPILED; - $this->oSmarty->cache_dir=DIR_SMARTY_CACHE; - $this->oSmarty->plugins_dir=array(DIR_SMARTY_PLUG,'plugins'); + $this->oSmarty->template_dir=Config::Get('path.smarty.template'); + $this->oSmarty->compile_dir=Config::Get('path.smarty.compiled'); + $this->oSmarty->cache_dir=Config::Get('path.smarty.cache'); + $this->oSmarty->plugins_dir=array(Config::Get('path.smarty.plug'),'plugins'); /** * Подключаем к Smarty небольшой плагинчик форматирования даты */ @@ -238,7 +251,7 @@ class LsViewer extends Module { */ if ($sResponseAjax) { if ($sResponseAjax=='jsHttpRequest') { - require_once(DIR_SERVER_ENGINE."/lib/external/JsHttpRequest/JsHttpRequest.php"); + require_once(Config::Get('path.root.engine')."/lib/external/JsHttpRequest/JsHttpRequest.php"); $JsHttpRequest = new JsHttpRequest("UTF-8"); } $this->Security_ValidateSendForm(); diff --git a/engine/modules/viewer/plugs/insert.block.php b/engine/modules/viewer/plugs/insert.block.php index a2b1f7c7..cf1dabae 100644 --- a/engine/modules/viewer/plugs/insert.block.php +++ b/engine/modules/viewer/plugs/insert.block.php @@ -47,7 +47,7 @@ function smarty_insert_block($aParams,&$oSmarty) { /** * Подключаем необходимый обработчик */ - $result=require_once(DIR_SERVER_ROOT.'/classes/blocks/Block'.$sBlock.'.class.php'); + $result=require_once(Config::Get('path.root.server').'/classes/blocks/Block'.$sBlock.'.class.php'); $sCmd='$oBlock=new Block'.$sBlock.'($aParamsBlock);'; eval($sCmd); /**