From 15142cf76bcdbe55e5f3608818c743cd03c39688 Mon Sep 17 00:00:00 2001 From: SecretR Date: Fri, 18 Jan 2013 08:55:45 +0200 Subject: [PATCH] Task #75: Automated SEF string creation type not functioning on Gallery category URLs - applying front-end changes --- e107_plugins/gallery/controllers/index.php | 6 +++--- e107_plugins/gallery/url/rewrite_url.php | 4 ++-- e107_plugins/gallery/url/url.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/e107_plugins/gallery/controllers/index.php b/e107_plugins/gallery/controllers/index.php index 42c7cc326..b277bb04d 100644 --- a/e107_plugins/gallery/controllers/index.php +++ b/e107_plugins/gallery/controllers/index.php @@ -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; diff --git a/e107_plugins/gallery/url/rewrite_url.php b/e107_plugins/gallery/url/rewrite_url.php index ee6cdb132..a1d01520f 100644 --- a/e107_plugins/gallery/url/rewrite_url.php +++ b/e107_plugins/gallery/url/rewrite_url.php @@ -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 - '' => array('index/list', 'mapVars' => array('media_cat_title' => 'cat', 'from' => 'frm')), + '' => array('index/list', 'mapVars' => array('media_cat_sef' => 'cat', 'from' => 'frm')), ) ); } diff --git a/e107_plugins/gallery/url/url.php b/e107_plugins/gallery/url/url.php index 459b5de14..c45f3936f 100644 --- a/e107_plugins/gallery/url/url.php +++ b/e107_plugins/gallery/url/url.php @@ -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'),), ) ); }