Skip to content

Commit

Permalink
Merge pull request #9 from dle-modules/2.0.1
Browse files Browse the repository at this point in the history
2.0.1 Совместимость с DLE 13.X
  • Loading branch information
pafnuty authored Oct 15, 2018
2 parents a3ae427 + 852648d commit 975127a
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 34 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
##v2.0.1 от 16.10.2018
- Совместимость с DLE 13.X

##v2.0.0 от 09.05.2017
- Открытие исходников оригинального модуля для бесплатного использования.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
12 changes: 7 additions & 5 deletions upload/engine/ajax/ymaps/all.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 7 additions & 5 deletions upload/engine/ajax/ymaps/cat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 7 additions & 5 deletions upload/engine/ajax/ymaps/editmarker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 7 additions & 5 deletions upload/engine/ajax/ymaps/editnews.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 6 additions & 4 deletions upload/engine/ajax/ymaps/saveconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 7 additions & 5 deletions upload/engine/ajax/ymaps/xfields.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions upload/engine/data/ymaps_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions upload/engine/plugins/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Order allow,deny
Deny from all
13 changes: 13 additions & 0 deletions upload/engine/plugins/loader/loader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
if (file_exists(ENGINE_DIR . '/classes/plugins.class.php')) {
include_once ENGINE_DIR . '/classes/plugins.class.php';
} else {
@ini_set('pcre.recursion_limit', 10000000);
@ini_set('pcre.backtrack_limit', 10000000);
@ini_set('pcre.jit', false);
abstract class DLEPlugins {
public static function Check($source = '') {
return $source;
}
}
}
4 changes: 2 additions & 2 deletions upload/ymaps_install.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
'moduleDescr' => 'Модуль Яндекс.Карты для DLE',

// Версия модуля, для установщика
'moduleVersion' => '2.0.0',
'moduleVersion' => '2.0.1',

// Дата выпуска модуля, для установщика
'moduleDate' => '09.05.2017',
'moduleDate' => '16.10.2018',

// Версии DLE, поддержваемые модулем, для установщика
'dleVersion' => '10.x',
Expand Down

0 comments on commit 975127a

Please sign in to comment.