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:
@@ -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}'
|
||||
);
|
||||
*/
|
||||
|
Reference in New Issue
Block a user