mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Task #75: Automated SEF string creation type not functioning on Gallery
category URLs - applying front-end changes
This commit is contained in:
@@ -47,10 +47,10 @@ class plugin_gallery_index_controller extends eControllerFront
|
|||||||
*/
|
*/
|
||||||
protected $filter = array(
|
protected $filter = array(
|
||||||
'category' => array(
|
'category' => array(
|
||||||
'cat' => array('regex', '/[\w\pL\s\-+.,\']+/u'),
|
'cat' => array('regex', '/[\w\pL\s\-+.,]+/u'),
|
||||||
),
|
),
|
||||||
'list' => array(
|
'list' => array(
|
||||||
'cat' => array('regex', '/[\w\pL\s\-+.,\']+/u'),
|
'cat' => array('regex', '/[\w\pL\s\-+.,]+/u'),
|
||||||
'frm' => array('int'),
|
'frm' => array('int'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -107,7 +107,7 @@ class plugin_gallery_index_controller extends eControllerFront
|
|||||||
$_cid = null;
|
$_cid = null;
|
||||||
foreach ($this->catList as $id => $row)
|
foreach ($this->catList as $id => $row)
|
||||||
{
|
{
|
||||||
if($cid === $row['media_cat_title'])
|
if($cid === $row['media_cat_sef'])
|
||||||
{
|
{
|
||||||
$_cid = $id;
|
$_cid = $id;
|
||||||
break;
|
break;
|
||||||
|
@@ -20,14 +20,14 @@ class plugin_gallery_rewrite_url extends eUrlConfig
|
|||||||
'allowVars' => array('cat', 'frm'),
|
'allowVars' => array('cat', 'frm'),
|
||||||
|
|
||||||
// custom assemble/parse URL regex template
|
// custom assemble/parse URL regex template
|
||||||
'varTemplates' => array('galleryCat' => '[\w\pL\s\-+.,\']+'),
|
'varTemplates' => array('galleryCat' => '[\w\pL\s\-+.,]+'),
|
||||||
),
|
),
|
||||||
|
|
||||||
// rule set array
|
// rule set array
|
||||||
'rules' => array(
|
'rules' => array(
|
||||||
'/' => 'index/category',
|
'/' => 'index/category',
|
||||||
// allow only mapped vars - cat and frm parameters to be passed
|
// allow only mapped vars - cat and frm parameters to be passed
|
||||||
'<cat:{galleryCat}>' => array('index/list', 'mapVars' => array('media_cat_title' => 'cat', 'from' => 'frm')),
|
'<cat:{galleryCat}>' => array('index/list', 'mapVars' => array('media_cat_sef' => 'cat', 'from' => 'frm')),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,7 @@ class plugin_gallery_url extends eUrlConfig
|
|||||||
// rule set array
|
// rule set array
|
||||||
'rules' => array(
|
'rules' => array(
|
||||||
'/' => 'index/category',
|
'/' => 'index/category',
|
||||||
'list' => array('index/list', 'mapVars' => array('media_cat_category' => 'cat', 'from' => 'frm'), 'allowVars' => array('cat', 'frm'),),
|
'list' => array('index/list', 'mapVars' => array('media_cat_sef' => 'cat', 'from' => 'frm'), 'allowVars' => array('cat', 'frm'),),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user