Add basket
This commit is contained in:
@@ -11,24 +11,30 @@ class MediaListing_Main extends SihnonFramework_Main {
|
||||
|
||||
protected $smarty;
|
||||
protected $request;
|
||||
protected $basket;
|
||||
|
||||
protected function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
|
||||
$request_string = isset($_GET['l']) ? $_GET['l'] : '';
|
||||
|
||||
$this->request = new MediaListing_RequestParser($request_string, $this->template_dir, $this->template_code_dir);
|
||||
|
||||
$this->basket = new MediaListing_Basket();
|
||||
|
||||
if (ML_File == 'index') {
|
||||
$this->smarty = new Smarty();
|
||||
$this->smarty->template_dir = $this->template_dir;
|
||||
$this->smarty->compile_dir = '../private/tmp/templates';
|
||||
$this->smarty->cache_dir = '../private/tmp/cache';
|
||||
$this->smarty->config_dir = '../private/tmp/config';
|
||||
|
||||
|
||||
$this->smarty->registerPlugin('modifier', 'formatDuration', array('MediaListing_Main', 'formatDuration'));
|
||||
$this->smarty->registerPlugin('modifier', 'formatFilesize', array('MediaListing_Main', 'formatFilesize'));
|
||||
|
||||
|
||||
$this->smarty->assign('title', 'Media Listing');
|
||||
$this->smarty->assign('version', '0.1');
|
||||
$this->smarty->assign('messages', array());
|
||||
@@ -62,6 +68,14 @@ class MediaListing_Main extends SihnonFramework_Main {
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return MediaListing_Basket
|
||||
*/
|
||||
public function basket() {
|
||||
return $this->basket;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user