diff --git a/application/models/Shows.php b/application/models/Shows.php index ac682bc7f..2b5c57efe 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -1010,7 +1010,7 @@ class Show_DAL { { global $CC_CONFIG, $CC_DBC; - $sql = "SELECT si.starts as start_timestamp, si.ends as end_timestamp, s.name, s.id, si.id as instance_id, si.record" + $sql = "SELECT si.starts as start_timestamp, si.ends as end_timestamp, s.name, s.id, si.id as instance_id, si.record, s.url" ." FROM $CC_CONFIG[showInstances] si, $CC_CONFIG[showTable] s" ." WHERE si.show_id = s.id" ." AND si.starts <= TIMESTAMP '$timeNow'" @@ -1088,7 +1088,8 @@ class Show_DAL { ." LEFT JOIN $CC_CONFIG[showTable] s" ." ON si.show_id = s.id" ." WHERE EXTRACT(DOW FROM si.starts) = $day" - ." AND EXTRACT(WEEK FROM si.starts) = EXTRACT(WEEK FROM localtimestamp)"; + ." AND EXTRACT(WEEK FROM si.starts) = EXTRACT(WEEK FROM localtimestamp)" + ." ORDER BY si.starts"; //echo $sql; diff --git a/plugins/jquery.showinfo.js b/plugins/jquery.showinfo.js index ece622458..d38cff6c4 100644 --- a/plugins/jquery.showinfo.js +++ b/plugins/jquery.showinfo.js @@ -41,9 +41,15 @@ for (var i=0; i"+shows[i].getRange()+"" + - ""+shows[i].getName()+"" + - ""; + ""+shows[i].getRange()+""; + + var url = shows[i].getURL(); + + if (url.length > 0) + tableString += ""+shows[i].getName()+""; + else + tableString += ""+shows[i].getName()+""; + } tableString += ""; @@ -308,6 +314,9 @@ function Show(showData){ this.showData = showData; } +Show.prototype.getURL = function(){ + return this.showData.url; +} Show.prototype.getName = function(){ return this.showData.name; }