1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Task #75: Automated SEF string creation type not functioning on Gallery

category URLs - applying front-end changes
This commit is contained in:
SecretR 2013-01-18 08:55:45 +02:00
parent 476a7c9592
commit 15142cf76b
3 changed files with 6 additions and 6 deletions

View File

@ -47,10 +47,10 @@ class plugin_gallery_index_controller extends eControllerFront
*/
protected $filter = array(
'category' => array(
'cat' => array('regex', '/[\w\pL\s\-+.,\']+/u'),
'cat' => array('regex', '/[\w\pL\s\-+.,]+/u'),
),
'list' => array(
'cat' => array('regex', '/[\w\pL\s\-+.,\']+/u'),
'cat' => array('regex', '/[\w\pL\s\-+.,]+/u'),
'frm' => array('int'),
),
);
@ -107,7 +107,7 @@ class plugin_gallery_index_controller extends eControllerFront
$_cid = null;
foreach ($this->catList as $id => $row)
{
if($cid === $row['media_cat_title'])
if($cid === $row['media_cat_sef'])
{
$_cid = $id;
break;

View File

@ -20,14 +20,14 @@ class plugin_gallery_rewrite_url extends eUrlConfig
'allowVars' => array('cat', 'frm'),
// custom assemble/parse URL regex template
'varTemplates' => array('galleryCat' => '[\w\pL\s\-+.,\']+'),
'varTemplates' => array('galleryCat' => '[\w\pL\s\-+.,]+'),
),
// rule set array
'rules' => array(
'/' => 'index/category',
// 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')),
)
);
}

View File

@ -23,7 +23,7 @@ class plugin_gallery_url extends eUrlConfig
// rule set array
'rules' => array(
'/' => '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'),),
)
);
}