mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Issue #2486 - avoid broken downloads. Use experimental code only in debug mode.
This commit is contained in:
@@ -63,15 +63,15 @@ class download_shortcodes extends e_shortcode
|
||||
|
||||
if(!empty($this->grandparent))
|
||||
{
|
||||
$breadcrumb[] = array('text' => $this->grandparent['download_category_name'], 'url' => ($this->grandparent['download_category_id']) ? e107::url('download', 'category', $this->grandparent) : null); // 'download/list/category', array('id'=>$this->grandparent['download_category_id'],'name'=>$this->grandparent['download_category_sef'])) : null);
|
||||
$breadcrumb[] = array('text' => $this->grandparent['download_category_name'], 'url' => ($this->grandparent['download_category_id']) ? e107::url('download', 'category', $this->grandparent) : null);
|
||||
}
|
||||
|
||||
if(!empty($this->parent))
|
||||
{
|
||||
$breadcrumb[] = array('text' => $this->parent['download_category_name'], 'url' => ($this->parent['download_category_id']) ? e107::url('download', 'category', $this->parent) : null); // e107::url('download/list/category', array('id'=>$this->parent['download_category_id'],'name'=>$this->parent['download_category_sef'])) : null);
|
||||
$breadcrumb[] = array('text' => $this->parent['download_category_name'], 'url' => ($this->parent['download_category_id']) ? e107::url('download', 'category', $this->parent) : null);
|
||||
}
|
||||
|
||||
$breadcrumb[] = array('text' => $this->var['download_category_name'], 'url' => ($this->var['download_category_id']) ? e107::url('download', 'category', $this->var) : null); // e107::url('download/list/category', array('id'=>$this->var['download_category_id'],'name'=>$this->var['download_category_sef'])) : null);
|
||||
$breadcrumb[] = array('text' => $this->var['download_category_name'], 'url' => ($this->var['download_category_id']) ? e107::url('download', 'category', $this->var) : null);
|
||||
$breadcrumb[] = array('text' => $this->var['download_name'], 'url' => null);
|
||||
break;
|
||||
}
|
||||
@@ -1043,7 +1043,7 @@ class download_shortcodes extends e_shortcode
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-secondary" type="submit" name="s" value="1">';
|
||||
|
||||
$text .= $tp->toIcon('glyphicon-search.glyph');
|
||||
$text .= $tp->toIcon('fa-search.glyph');
|
||||
|
||||
$text .= '</button>
|
||||
</span>
|
||||
|
@@ -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