]> p2p-next.cs.pub.ro Git - living-lab-site.git/commitdiff
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 64ee48ef888260120d09deb1c7fbed8762703f28..711b967a0930f36f0a01b4c9d00a0a28891d7bd1 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 f6146d41e05d000e8a5e7b8c7bd4b9e0ec1938cc..30b7aacac74f4e0e751cc03b6e790beb7dc66e84 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 e556fda937e233750913e1ab0040e37ba7343d41..fe65927c10e41060e01850cfd28363c47905ecc0 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