From a4de6b263b2faef2a215da76c93b756299201544 Mon Sep 17 00:00:00 2001 From: Calin-Andrei Burloiu Date: Fri, 28 Oct 2011 15:57:43 +0300 Subject: [PATCH] bug fixes solved before pushing a new version to production --- application/models/videos_model.php | 8 ++++---- application/views/catalog/search_results_view.php | 2 +- js/jquery.ui.nsvideo.js | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/application/models/videos_model.php b/application/models/videos_model.php index 64ee48e..711b967 100644 --- a/application/models/videos_model.php +++ b/application/models/videos_model.php @@ -520,8 +520,8 @@ class Videos_model extends CI_Model { else { // TODO select data, description if details are needed - $selected_columns = "id, name, title, duration, user_id, views, - thumbs_count, default_thumb, + $selected_columns = "v.id, name, title, duration, user_id, views, + thumbs_count, default_thumb, u.username, (views + likes - dislikes) AS score, $relevance"; $order = "ORDER BY relevance DESC, score DESC"; @@ -534,8 +534,8 @@ class Videos_model extends CI_Model { $category_cond = ""; $str_query = "SELECT $selected_columns - FROM `videos` - WHERE $category_cond ( $search_cond ) + FROM `videos` v, `users` u + WHERE v.user_id = u.id AND $category_cond ( $search_cond ) $order $limit"; // echo "

$str_query

"; diff --git a/application/views/catalog/search_results_view.php b/application/views/catalog/search_results_view.php index f6146d4..30b7aac 100644 --- a/application/views/catalog/search_results_view.php +++ b/application/views/catalog/search_results_view.php @@ -28,7 +28,7 @@ ?>
- lang->line('ui_from') . ' TODO' //TODO ?> + lang->line('ui_from') ?> ">
diff --git a/js/jquery.ui.nsvideo.js b/js/jquery.ui.nsvideo.js index e556fda..fe65927 100644 --- a/js/jquery.ui.nsvideo.js +++ b/js/jquery.ui.nsvideo.js @@ -97,8 +97,8 @@ $.widget( "ui.nsvideo", { .appendTo(widget.$controls); $formats = $('.ui-nsvideo-formats', $formats[0]); $.each(widget.options.src, function(index, value) { - id = widget.element.attr('id') + '-format-' + index; - definition = value.res.substring(value.res.indexOf('x')+1)+'p'; + var id = widget.element.attr('id') + '-format-' + index; + var definition = value.res.substring(value.res.indexOf('x')+1)+'p'; $('') .appendTo($formats) .attr('checked', (index == widget.options.srcIndex)) @@ -187,7 +187,7 @@ $.widget( "ui.nsvideo", { }, video: function() { - widget = this; + var widget = this; // Select video source. // If src option is string, that's the source. @@ -288,7 +288,7 @@ $.widget( "ui.nsvideo", { }, seeking: function() { widget.html5.refreshState(); - }, + } }); } // VLC -- 2.20.1