bug fixes solved before pushing a new version to production
authorCalin-Andrei Burloiu <calin.burloiu@gmail.com>
Fri, 28 Oct 2011 12:57:43 +0000 (15:57 +0300)
committerCalin-Andrei Burloiu <calin.burloiu@gmail.com>
Fri, 28 Oct 2011 12:57:43 +0000 (15:57 +0300)
application/models/videos_model.php
application/views/catalog/search_results_view.php
js/jquery.ui.nsvideo.js

index 64ee48e..711b967 100644 (file)
@@ -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 "<p>$str_query</p>";
index f6146d4..30b7aac 100644 (file)
@@ -28,7 +28,7 @@
                        ?>
                </div>
                <div class="video-username">
-                       <?php echo $this->lang->line('ui_from') . ' TODO' //TODO ?>
+                       <?php echo $this->lang->line('ui_from') ?> <a href="<?php echo site_url("user/profile/{$video['username']}") ?>"><?php echo $video['username'] ?></a>
                </div>
        </div>
        <?php endforeach ?>
index e556fda..fe65927 100644 (file)
@@ -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';
                                $('<input type="radio" id="' + id + '" name="format" />')
                                        .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