malformed category URLs bug fixed
[living-lab-site.git] / application / controllers / video.php
index 5a4b9d5..3637f14 100644 (file)
@@ -38,20 +38,21 @@ class Video extends CI_Controller {
                // **
                // Retrieve video information.
                $this->load->model('videos_model');
+               $this->videos_model->inc_video_var($id, 'views');
                $data['video'] = $this->videos_model->get_video($id, $name);
+               $categories = $this->config->item('categories');
+               $data['video']['category_name'] = 
+                       $categories[ $data['video']['category_id'] ];
                $data['plugin_type'] = ($plugin === NULL ? 'auto' : $plugin);
                
                // Display page.
                $params = array(        'title' => $data['video']['title'] . ' -- '
                                                                . $this->config->item('site_name'),
                                                        'css' => array(
-                                                               'jquery-ui.css',
                                                                'jquery.ui.nsvideo.css',
                                                                'video.css'
                                                        ),
                                                        'js' => array(
-                                                               'jquery.js',
-                                                               'jquery-ui.js',
                                                                'jquery.ui.nsvideo.js'
                                                        ),
                                                        //'metas' => array('description'=>'','keywords'=>'')