From 852648d62aa6e366baa303d61804473c7f53ede7 Mon Sep 17 00:00:00 2001 From: pafnuty Date: Tue, 16 Oct 2018 00:31:56 +0400 Subject: [PATCH] =?UTF-8?q?2.0.1=20=D0=A1=D0=BE=D0=B2=D0=BC=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D1=8C=20=D1=81=20DLE=2013.?= =?UTF-8?q?X?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ README.md | 2 +- upload/engine/ajax/ymaps/all.php | 12 +++++++----- upload/engine/ajax/ymaps/cat.php | 12 +++++++----- upload/engine/ajax/ymaps/editmarker.php | 12 +++++++----- upload/engine/ajax/ymaps/editnews.php | 12 +++++++----- upload/engine/ajax/ymaps/saveconfig.php | 10 ++++++---- upload/engine/ajax/ymaps/xfields.php | 12 +++++++----- upload/engine/data/ymaps_config.json | 4 ++-- upload/engine/plugins/.htaccess | 2 ++ upload/engine/plugins/loader/loader.php | 13 +++++++++++++ upload/ymaps_install.php | 4 ++-- 12 files changed, 64 insertions(+), 34 deletions(-) create mode 100644 upload/engine/plugins/.htaccess create mode 100644 upload/engine/plugins/loader/loader.php diff --git a/CHANGELOG.md b/CHANGELOG.md index e6f18d3..f942099 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,5 @@ +##v2.0.1 от 16.10.2018 +- Совместимость с DLE 13.X + ##v2.0.0 от 09.05.2017 - Открытие исходников оригинального модуля для бесплатного использования. diff --git a/README.md b/README.md index e294efb..0376249 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Yandex Maps - модуль Яндекс карт для DLE -![version](https://img.shields.io/badge/version-2.0.0-red.svg?style=flat-square "Version") +![version](https://img.shields.io/badge/version-2.0.1-red.svg?style=flat-square "Version") ![DLE](https://img.shields.io/badge/DLE-10.X-green.svg?style=flat-square "DLE Version") [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/dle-modules/DLE-YandexMaps/blob/master/LICENSE) diff --git a/upload/engine/ajax/ymaps/all.php b/upload/engine/ajax/ymaps/all.php index 6975d4e..3eafbdf 100644 --- a/upload/engine/ajax/ymaps/all.php +++ b/upload/engine/ajax/ymaps/all.php @@ -22,18 +22,20 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); +include_once ENGINE_DIR . '/plugins/loader/loader.php'; + if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { - include(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng'); + include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); } else { die("Language file not found"); } -include ENGINE_DIR . '/data/config.php'; +include (DLEPlugins::Check(ENGINE_DIR . '/data/config.php')); -require_once ENGINE_DIR . '/classes/mysql.php'; -require_once ENGINE_DIR . '/data/dbconfig.php'; -require_once ENGINE_DIR . '/modules/functions.php'; +require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); if ($config['version_id'] > 9.6) { dle_session(); } else { diff --git a/upload/engine/ajax/ymaps/cat.php b/upload/engine/ajax/ymaps/cat.php index 541f21b..1b5b69d 100644 --- a/upload/engine/ajax/ymaps/cat.php +++ b/upload/engine/ajax/ymaps/cat.php @@ -22,18 +22,20 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); +include_once ENGINE_DIR . '/plugins/loader/loader.php'; + if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { - include(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng'); + include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); } else { die("Language file not found"); } -include ENGINE_DIR . '/data/config.php'; +include (DLEPlugins::Check(ENGINE_DIR . '/data/config.php')); -require_once ENGINE_DIR . '/classes/mysql.php'; -require_once ENGINE_DIR . '/data/dbconfig.php'; -require_once ENGINE_DIR . '/modules/functions.php'; +require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); if ($config['version_id'] > 9.6) { dle_session(); } else { diff --git a/upload/engine/ajax/ymaps/editmarker.php b/upload/engine/ajax/ymaps/editmarker.php index b0631ba..8941c06 100644 --- a/upload/engine/ajax/ymaps/editmarker.php +++ b/upload/engine/ajax/ymaps/editmarker.php @@ -22,18 +22,20 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); +include_once ENGINE_DIR . '/plugins/loader/loader.php'; + if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { - include(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng'); + include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); } else { die("Language file not found"); } -include ENGINE_DIR . '/data/config.php'; +include (DLEPlugins::Check(ENGINE_DIR . '/data/config.php')); -require_once ENGINE_DIR . '/classes/mysql.php'; -require_once ENGINE_DIR . '/data/dbconfig.php'; -require_once ENGINE_DIR . '/modules/functions.php'; +require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); if ($config['version_id'] > 9.6) { dle_session(); } else { diff --git a/upload/engine/ajax/ymaps/editnews.php b/upload/engine/ajax/ymaps/editnews.php index 6b23328..b8246b7 100644 --- a/upload/engine/ajax/ymaps/editnews.php +++ b/upload/engine/ajax/ymaps/editnews.php @@ -22,18 +22,20 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); +include_once ENGINE_DIR . '/plugins/loader/loader.php'; + if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { - include(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng'); + include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); } else { die("Language file not found"); } -include ENGINE_DIR . '/data/config.php'; +include (DLEPlugins::Check(ENGINE_DIR . '/data/config.php')); -require_once ENGINE_DIR . '/classes/mysql.php'; -require_once ENGINE_DIR . '/data/dbconfig.php'; -require_once ENGINE_DIR . '/modules/functions.php'; +require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); if ($config['version_id'] > 9.6) { dle_session(); } else { diff --git a/upload/engine/ajax/ymaps/saveconfig.php b/upload/engine/ajax/ymaps/saveconfig.php index 2ba21c6..3d101a0 100644 --- a/upload/engine/ajax/ymaps/saveconfig.php +++ b/upload/engine/ajax/ymaps/saveconfig.php @@ -21,11 +21,13 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); -include ENGINE_DIR . '/data/config.php'; +include_once ENGINE_DIR . '/plugins/loader/loader.php'; -require_once ENGINE_DIR . '/classes/mysql.php'; -require_once ENGINE_DIR . '/data/dbconfig.php'; -require_once ENGINE_DIR . '/modules/functions.php'; +include (DLEPlugins::Check(ENGINE_DIR . '/data/config.php')); + +require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); if ($config['version_id'] > 9.6) { dle_session(); } else { diff --git a/upload/engine/ajax/ymaps/xfields.php b/upload/engine/ajax/ymaps/xfields.php index 956b425..88ef309 100644 --- a/upload/engine/ajax/ymaps/xfields.php +++ b/upload/engine/ajax/ymaps/xfields.php @@ -21,18 +21,20 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); +include_once ENGINE_DIR . '/plugins/loader/loader.php'; + if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { - include(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng'); + include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); } else { die("Language file not found"); } -include ENGINE_DIR . '/data/config.php'; +include (DLEPlugins::Check(ENGINE_DIR . '/data/config.php')); -require_once ENGINE_DIR . '/classes/mysql.php'; -require_once ENGINE_DIR . '/data/dbconfig.php'; -require_once ENGINE_DIR . '/modules/functions.php'; +require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); +require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); if ($config['version_id'] > 9.6) { dle_session(); } else { diff --git a/upload/engine/data/ymaps_config.json b/upload/engine/data/ymaps_config.json index 060240f..d451cbc 100644 --- a/upload/engine/data/ymaps_config.json +++ b/upload/engine/data/ymaps_config.json @@ -2,8 +2,8 @@ "moduleName": "ymaps", "moduleTitle": "Yandex Maps", "moduleDescr": "Модуль Яндекс.Карты для DLE", - "moduleVersion": "2.0.0", - "moduleDate": "09.05.2017", + "moduleVersion": "2.0.1", + "moduleDate": "16.10.2018", "dleVersion": "10.x", "main": { "moduleLang": "Russian", diff --git a/upload/engine/plugins/.htaccess b/upload/engine/plugins/.htaccess new file mode 100644 index 0000000..cb24fd7 --- /dev/null +++ b/upload/engine/plugins/.htaccess @@ -0,0 +1,2 @@ +Order allow,deny +Deny from all diff --git a/upload/engine/plugins/loader/loader.php b/upload/engine/plugins/loader/loader.php new file mode 100644 index 0000000..5c25a9d --- /dev/null +++ b/upload/engine/plugins/loader/loader.php @@ -0,0 +1,13 @@ + 'Модуль Яндекс.Карты для DLE', // Версия модуля, для установщика - 'moduleVersion' => '2.0.0', + 'moduleVersion' => '2.0.1', // Дата выпуска модуля, для установщика - 'moduleDate' => '09.05.2017', + 'moduleDate' => '16.10.2018', // Версии DLE, поддержваемые модулем, для установщика 'dleVersion' => '10.x',