1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-17 20:01:47 +02:00

Issue #2486 - avoid broken downloads. Use experimental code only in debug mode.

This commit is contained in:
Cameron
2019-04-11 13:27:09 -07:00
parent 7701734ed5
commit 93f4146f03
2 changed files with 24 additions and 8 deletions

View File

@@ -55,6 +55,8 @@ class download_url // plugin-folder + '_url'
}
return $config;
}
@@ -65,19 +67,33 @@ class download_url // plugin-folder + '_url'
{
$config = $this->profile1();
if(!deftrue('e_DEBUG'))
{
return $config;
}
unset($config['index']);
$config['subcategory'] = array(
'regex' => '^{alias}/([^\/]*)/([^\/]*)/?$',
'redirect' => '{e_PLUGIN}vstore/vstore.php?catsef=$2',
'redirect' => '{e_PLUGIN}download/download.php?catsef=$2', // TODO catsef support in download_class.php
'sef' => '{alias}/{cat_sef}/{subcat_sef}'
);
$config['category'] = array(
'regex' => '^{alias}/([^\/]*)/(.*)$',
'redirect' => '{e_PLUGIN}download/download.php?action=list&id=$1',
'regex' => '^{alias}/([^\/]*)/?(.*)$',
'redirect' => '{e_PLUGIN}download/download.php?action=list&catsef=$1', // TODO catsef support in download_class.php
'sef' => '{alias}/{download_category_sef}',
);
$config['index'] = array(
'regex' => '^{alias}/?$',
'sef' => '{alias}/',
'redirect' => '{e_PLUGIN}download/download.php$1',
);
return $config;
}
@@ -91,7 +107,7 @@ class download_url // plugin-folder + '_url'
$config['subcategory'] = array(
'regex' => '^{alias}/([^\/]*)/([^\/]*)/?$',
'redirect' => '{e_PLUGIN}vstore/vstore.php?catsef=$2',
'redirect' => '{e_PLUGIN}download/download.php?catsef=$2',
'sef' => '{alias}/{cat_sef}/{subcat_sef}'
);
*/