Updated OSB to work with KH 3.1
This commit is contained in:
@@ -20,7 +20,7 @@ class Controller_Product extends Controller_TemplateDefault {
|
||||
$cat = ORM::factory('product_category',$id);
|
||||
|
||||
if (! $cat->loaded())
|
||||
Request::instance()->redirect('welcome/index');
|
||||
Request::current()->redirect('welcome/index');
|
||||
|
||||
Breadcrumb::name($this->request->uri(),$cat->name);
|
||||
|
||||
@@ -30,8 +30,6 @@ class Controller_Product extends Controller_TemplateDefault {
|
||||
->set('results',$this->_get_category($cat->id))
|
||||
->set('cat',$cat->id),
|
||||
));
|
||||
|
||||
$this->template->content = Block::factory();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,7 +46,7 @@ class Controller_Product extends Controller_TemplateDefault {
|
||||
$po = ORM::factory('product',$id);
|
||||
|
||||
if (! $po->loaded())
|
||||
Request::instance()->redirect('product_category/index');
|
||||
Request::current()->redirect('product_category/index');
|
||||
|
||||
Breadcrumb::name($this->request->uri(),$po->product_translate->find()->name);
|
||||
|
||||
@@ -58,7 +56,7 @@ class Controller_Product extends Controller_TemplateDefault {
|
||||
|
||||
// If the product category doesnt exist, or doesnt match the product
|
||||
if (! $co->loaded() OR ! in_array($co->id,unserialize($po->avail_category_id)))
|
||||
Request::instance()->redirect('product_category/index');
|
||||
Request::current()->redirect('product_category/index');
|
||||
|
||||
Breadcrumb::name('product/view',$co->name);
|
||||
}
|
||||
@@ -68,8 +66,6 @@ class Controller_Product extends Controller_TemplateDefault {
|
||||
'body'=>View::factory('product/view')
|
||||
->set('record',$po),
|
||||
));
|
||||
|
||||
$this->template->content = Block::factory();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -20,14 +20,13 @@ class Controller_Product_Category extends Controller_TemplateDefault {
|
||||
'body'=>View::factory('product/category/list')
|
||||
->set('results',$this->_get_categories()),
|
||||
));
|
||||
|
||||
$this->template->content = Block::factory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain a list of our categories
|
||||
* @todo Only show categories according to the users group memeberhsip
|
||||
* @todo Obey sort order
|
||||
* @todo Move this to the model
|
||||
*/
|
||||
private function _get_categories() {
|
||||
return ORM::factory('product_category')
|
||||
|
Reference in New Issue
Block a user