commit 30d1c853568f1b5af2ff2891eaf0387835774f3f
Author: Richard Shaw <hobbes1069(a)gmail.com>
Date: Mon Apr 17 07:40:21 2017 -0500
Remove obsolete scripts. Since data was moved to /var/lib data migration is
no longer necessary.
Fixes RFBZ#4357.
.gitignore | 1 +
ChangeLog | 133 +------------------
mythweb-0.28-fixes.patch | 334 +++--------------------------------------------
mythweb.spec | 8 +-
sources | 2 +-
5 files changed, 30 insertions(+), 448 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7a7a007..aadd1d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
mythweb-0.27.5.tar.gz
/mythweb-0.28.tar.gz
+/mythweb-0.28.1.tar.gz
diff --git a/ChangeLog b/ChangeLog
index fa269bb..63b47fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,132 +1,7 @@
-commit 3fa642f00da9529674ea93110396d036da1d43ff
+commit d94cf0bb5e1ffb7feaab27aae68d8214371ae266
Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
-Date: Mon Oct 10 14:40:18 2016 -0400
+Date: Tue Mar 28 09:27:12 2017 +0100
- Add mythweb dir to @INC.
+ Fixes #12981 [php7.1] Use of this is no longer allowed
- Fixes #12895
-
- Signed-off-by: Peter Bennett <pbennett(a)mythtv.org>
- (cherry picked from commit e902c9788b1d405b0facfabd5b80ca49aaa83add)
-
-commit 1b75720192fc4c76a03d2b81e40f4d44cb339cd0
-Author: Michael T. Dean <mdean(a)mythtv.org>
-Date: Mon Oct 10 14:16:15 2016 -0400
-
- Set the SQL mode when connecting to the database.
-
- Fixes #12811
-
- Signed-off-by: Peter Bennett <pbennett(a)mythtv.org>
- (cherry picked from commit f02e5e264f61c1fcac3ead2e4cb86d9592e7d1ef)
-
-commit 32147cf4ce6ea55946c11135ebc81552d71c919c
-Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
-Date: Thu Sep 15 15:55:08 2016 +0100
-
- Fixes #12878. Use mythtv time, not unixtime to 'activate' a recording
-
- (cherry picked from commit 07441af9ee7bd5371323309b32456f510b7106ec)
-
-commit 291d3308f074a8e0918fbac529fb9e1014f9ad8c
-Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
-Date: Thu Sep 15 14:18:56 2016 +0100
-
- Fixes #12868. inetref cannot be NULL
-
- (cherry picked from commit 7b469b2fa6408f178e19726f67a5797e58b244c8)
-
-commit f80f8db0c03eb83d1313f3ff2ac2a6e19af65d2d
-Author: Ian Campbell <ijc(a)hellion.org.uk>
-Date: Wed Jul 20 10:35:39 2016 +0100
-
- Refs #12752 - [mythweb] Avoid double quoting sql
-
- $db->escape already wraps the result in 's so there is no need to do it in
the
- caller.
-
- This is a little complicated in searchMusic since the %'s need to be inside the
- quoting but we do not want them to be escaped themselves. Concat them with the
- search term using a SQL CONCAT().
-
- Signed-off-by: Stuart Auchterlonie <stuarta(a)mythtv.org>
- (cherry picked from commit d2469d2e3978a1288f79157990cf015d421d95d4)
-
-commit a1f2cdf03978427eaa9e35fa18162a0ba6be829d
-Author: Karl Dietz <dekarl(a)mythtv.org>
-Date: Thu Apr 28 07:52:51 2016 +0200
-
- avoid returning one copy of each program per person in the cast/crew
-
- (cherry picked from commit e3e1138f0fc652cc82adc74cf3c1c2b150660a06)
-
-commit 554d7e5212cac5d1f857db061fac16b7ef4368e7
-Author: Karl Dietz <dekarl(a)mythtv.org>
-Date: Thu Apr 28 07:51:05 2016 +0200
-
- don't mix JOIN ON and JOIN USING in one query
-
- (cherry picked from commit 51a7da64952eee5924b02bafda5867f425fcd6c7)
-
-commit 977563289052c975372db13a2a4078212f85fed0
-Author: Karl Dietz <dekarl(a)mythtv.org>
-Date: Mon Apr 25 00:02:49 2016 +0200
-
- rewrite getAspect to use new recordedfile table
-
- (cherry picked from commit 305b8a1a859fe78c382d185339bdb2b81576b2df)
-
-commit f1cb29b0b20586c959c5c2d33ed2b3853dab3f12
-Author: Karl Dietz <dekarl(a)mythtv.org>
-Date: Sun Apr 24 23:18:21 2016 +0200
-
- remove grouping from SQL when loading programs
-
- to work with the new defaults of MySQL 5.7.
- Should reenable with e.g. ANY_VALUE or rewrite to use the Service API.
-
- Refs #12713
-
- (cherry picked from commit 24e5d7616bb28007b0b99f3055385af4921aba81)
-
-commit 0c07a6f3aae60ecc694966c32d0ca4757045edc5
-Author: Karl Dietz <dekarl(a)mythtv.org>
-Date: Sun Apr 24 21:13:40 2016 +0200
-
- use NULL instead of ZERO datetime when saving to recording rules
-
- for MySQL 5.7
- Refs #12713
-
- (cherry picked from commit 55ade6f31ae227f8a8344192614eb52e9893b8aa)
-
-commit cbca6cf230d2c4e2a68a3f63c0b482ec4a2e41cb
-Author: Charles Bovy <charles.bovy(a)gmail.com>
-Date: Sat Apr 23 17:38:46 2016 +0100
-
- Fixes #12670. Ensure fine tune is set and not empty
-
- Signed-off-by: Stuart Auchterlonie <stuarta(a)mythtv.org>
- (cherry picked from commit 791b17285de13d94169ffd9c09103a71c684b216)
-
-commit 82c458123fd243cef9ce874e955e1a72fcc6e4a4
-Author: Karl Dietz <dekarl(a)mythtv.org>
-Date: Tue Apr 19 08:13:37 2016 +0200
-
- unbreak "don't record" and getAspect()
-
- Refs #12713
-
- (cherry picked from commit 0ce44f7892249c953e15b45bfbe68387806ad8b3)
-
-commit 74e21c9a3bdb8d695373918f67b681e899ca8427
-Author: Karl Dietz <dekarl(a)mythtv.org>
-Date: Tue Apr 12 23:34:13 2016 +0200
-
- use full group by for listing view
-
- MySQL 5.7 enables ONLY_FULL_GROUP_BY by default
-
- Refs #12713
-
- (cherry picked from commit 659c0f39051ca901a526418d702a23afd175e8aa)
+ (cherry picked from commit 52ff70ecfdad06b0b66f8a5ec67cefc1b55a1861)
diff --git a/mythweb-0.28-fixes.patch b/mythweb-0.28-fixes.patch
index 3247b72..c933887 100644
--- a/mythweb-0.28-fixes.patch
+++ b/mythweb-0.28-fixes.patch
@@ -1,318 +1,24 @@
- classes/Database.php | 2 ++
- modules/music/mp3act_functions.php | 16 ++++++------
- modules/tv/classes/Channel.php | 8 +++---
- modules/tv/classes/Program.php | 52 ++++++++++++++------------------------
- modules/tv/classes/Schedule.php | 6 ++---
- modules/tv/includes/programs.php | 17 +++++++------
- modules/tv/set_channels.php | 2 +-
- mythweb.pl | 3 +++
- 8 files changed, 49 insertions(+), 57 deletions(-)
+ includes/utils.php | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/classes/Database.php b/classes/Database.php
-index 92aa7b0..82da9d8 100644
---- a/classes/Database.php
-+++ b/classes/Database.php
-@@ -120,6 +120,8 @@ class Database {
- $class = "Database_$engine";
- $dbh = new $class($db_name, $login, $password, $server, $port, $options);
- }
-+ // Set SQL mode
-+ $dbh->query('SET SESSION sql_mode = "";');
- // Set database connection to utf8
- $dbh->query('SET NAMES utf8;');
- // Make sure UNIX_TIMESTAMP AND FROM_UNIXTIME do the right things
-diff --git a/modules/music/mp3act_functions.php b/modules/music/mp3act_functions.php
-index b6fc7e0..9d2780c 100644
---- a/modules/music/mp3act_functions.php
-+++ b/modules/music/mp3act_functions.php
-@@ -33,7 +33,7 @@ function GarbageCollector()
- if (0 == mt_rand(0, 30))
- {
- $query = 'DELETE FROM music_playlists '.
-- "WHERE playlist_name='".$db->escape('MythWeb Temporary
Playlist')."'".
-+ "WHERE playlist_name=".$db->escape('MythWeb Temporary
Playlist').
- ' AND (NOW() - last_accessed) >
('.MYTH_PLAYLIST_SAVE_TIME.');';
- $sh = $db->query($query);
- $sh->finish();
-@@ -217,7 +217,7 @@ function buildBreadcrumb($page, $parent, $parentitem, $child,
$childitem)
- function musicLookup($type, $itemid)
- {
- global $db;
-- $sql_itemid = "'".$db->escape($itemid)."'";
-+ $sql_itemid = $db->escape($itemid);
- switch($type)
- {
- case 'browse':
-@@ -279,7 +279,7 @@ function musicLookup($type, $itemid)
- "FROM music_artists " .
- "GROUP BY artist_name_sort " .
- "HAVING artist_name_sort " .
-- "LIKE '" . $db->escape($itemid.'%') .
"' " .
-+ "LIKE " . $db->escape($itemid.'%') . "
" .
- "ORDER BY artist_name_sort";
- }
- $sh = $db->query($query);
-@@ -1008,7 +1008,7 @@ function getRandItems($type)
- function searchMusic($terms, $option)
- {
- global $db;
-- $sql_terms = "'%".$db->escape($terms)."%'";
-+ $sql_terms = "CONCAT('%', ".$db->escape($terms).",
'%')";
- $query = 'SELECT ms.song_id, ma.album_name, ms.track, mt.artist_name, ms.name,
ms.rating, '.
- 'SEC_TO_TIME(ms.length/1000) AS length, genre '.
- 'FROM music_songs AS ms '.
-@@ -1111,14 +1111,14 @@ function internalUpdatePlaylist($songs, $count, $length)
- $songlist = implode(',', $songs);
-
- $query = 'music_playlists SET'.
-- " playlist_songs='".$db->escape($songlist)."'".
-+ " playlist_songs=".$db->escape($songlist).
- ',length='.$db->escape($length).
- ',songcount='.$db->escape($count);
-
- if (empty($plId))
- {
- $query = 'INSERT INTO '.$query.
--
",hostname='".$db->escape('mythweb-'.$_SERVER['SERVER_NAME'])."'".
-+
",hostname=".$db->escape('mythweb-'.$_SERVER['SERVER_NAME']).
- ",playlist_name='".MYTH_WEB_PLAYLIST_NAME."'";
- }
- else
-@@ -1252,7 +1252,7 @@ function savePlaylist($pl_name, $newpl)
- else
- {
- $query = 'UPDATE music_playlists SET'.
-- ' playlist_name=\''.$db->escape($pl_name).'\''.
-+ ' playlist_name='.$db->escape($pl_name).
- ",hostname='' ".
- 'WHERE playlist_id='.$db->escape($pl['playlist_id']);
-
-@@ -1360,7 +1360,7 @@ function playlist_move($item1,$item2)
- $songs[$idx2] = $tmp;
-
- $query = 'UPDATE music_playlists SET'.
-- ' playlist_songs=\''.$db->escape(implode(',',
$songs)).'\' '.
-+ ' playlist_songs='.$db->escape(implode(',', $songs)).'
'.
- 'WHERE
playlist_id='.$db->escape($pl['playlist_id']).';';
- $db->query($query);
- }
-diff --git a/modules/tv/classes/Channel.php b/modules/tv/classes/Channel.php
-index 8fac90a..a435028 100644
---- a/modules/tv/classes/Channel.php
-+++ b/modules/tv/classes/Channel.php
-@@ -50,7 +50,7 @@ class Channel extends MythBase {
- $channel_list = Cache::get('[channelList]');
- if (is_null($channel_list)) {
- global $db;
-- $sql = 'SELECT channel.chanid FROM channel';
-+ $sql = 'SELECT MIN(channel.chanid) AS chanid FROM channel';
- if ($_SESSION['guide_favonly']) {
- $sql .= ', channelgroup, channelgroupnames WHERE channel.chanid =
channelgroup.chanid AND channelgroup.grpid = channelgroupnames.grpid AND
channelgroupnames.name = \'Favorites\'';
- if ($filtered)
-@@ -62,7 +62,7 @@ class Channel extends MythBase {
- // Sort
- $sql .= ' ORDER BY '
- .($_SESSION["sortby_channum"] ? '' :
'channel.callsign, ')
-- .'(channel.channum + 0), channel.channum, channel.chanid';
// sort by channum as both int and string to grab subchannels
-+ .'(channel.channum + 0), channel.channum'; // sort by
channum as both int and string to grab subchannels
- // Query
- $sh = $db->query($sql);
- $channel_list = array();
-@@ -77,7 +77,7 @@ class Channel extends MythBase {
- $callsign_list = Cache::get('[callsignList]');
- if (is_null($callsign_list)) {
- global $db;
-- $sql = 'SELECT channel.chanid, channel.channum, channel.callsign FROM
channel';
-+ $sql = 'SELECT MIN(channel.chanid) AS chanid, channel.channum,
channel.callsign FROM channel';
- if ($_SESSION['guide_favonly'])
- $sql .= ', channelgroup, channelgroupnames WHERE channel.chanid =
channelgroup.chanid AND channelgroup.grpid = channelgroupnames.grpid AND
channelgroupnames.name = \'Favorites\' AND';
- else
-@@ -87,7 +87,7 @@ class Channel extends MythBase {
- // Sort
- $sql .= ' ORDER BY '
- .($_SESSION["sortby_channum"] ? '' :
'channel.callsign, ')
-- .'(channel.channum + 0), channel.channum, channel.chanid';
// sort by channum as both int and string to grab subchannels
-+ .'(channel.channum + 0), channel.channum'; // sort by
channum as both int and string to grab subchannels
- // Query
- $sh = $db->query($sql);
- $callsign_list = array();
-diff --git a/modules/tv/classes/Program.php b/modules/tv/classes/Program.php
-index 57ce447..1de5c77 100644
---- a/modules/tv/classes/Program.php
-+++ b/modules/tv/classes/Program.php
-@@ -629,21 +629,25 @@ class Program extends MythBase {
+diff --git a/includes/utils.php b/includes/utils.php
+index 2ecd71c..5a29dae 100644
+--- a/includes/utils.php
++++ b/includes/utils.php
+@@ -215,12 +215,12 @@
+ * if $gt is set to true, $this will only be returned if it's > 0
+ * if $gt is set to a number, $this will only be returned if it's > $gt
**/
- public function rec_never_record() {
- global $db;
-- $sh = $db->query('REPLACE INTO oldrecorded
(chanid,starttime,endtime,title,subtitle,description,category,seriesid,programid,recordid,station,rectype,recstatus,duplicate)
VALUES ('
-+ $sh = $db->query('REPLACE INTO oldrecorded
(chanid,starttime,endtime,title,subtitle,description,season,episode,category,seriesid,programid,inetref,recordid,station,rectype,recstatus,duplicate,generic)
VALUES ('
- .escape($this->chanid)
.','
- .'NOW()'
.','
- .'NOW()'
.','
- .escape($this->title)
.','
- .escape($this->subtitle)
.','
- .escape($this->description)
.','
-+ .escape(isset($this->season) ? $this->season : 0)
.','
-+ .escape(isset($this->episode) ? $this->episode :
0) .','
- .escape($this->category)
.','
- .escape($this->seriesid)
.','
- .escape($this->programid)
.','
-+ .escape(isset($this->inetref) ? $this->inetref :
'') .','
- .escape(isset($this->recordid) ? $this->recordid :
0) .','
- .escape($this->channel->callsign)
.','
- .escape(isset($this->rectype) ? $this->rectype :
0) .','
- .'11'
.','
-- .'1'
.')')
-+ .'1'
.','
-+ .'0'
.')')
- or trigger_error('SQL Error: '.$db->error, FATAL);
- $sh->finish();
- // Notify the backend of the changes
-@@ -697,7 +701,7 @@ class Program extends MythBase {
- SET oldrecorded.reactivate = 1
- WHERE oldrecorded.starttime = ?
- AND oldrecorded.chanid = ?',
-- $this->starttime,
-+ unix2mythtime($this->starttime),
- $this->chanid
- );
- $this->rec_override(rectype_override);
-@@ -770,40 +774,22 @@ class Program extends MythBase {
-
- public function getAspect() {
- global $db;
-- $sh = $db->query('SELECT recordedmarkup.type,
-- recordedmarkup.data
-- FROM recordedmarkup
-- WHERE recordedmarkup.chanid = ?
-- AND recordedmarkup.starttime = FROM_UNIXTIME(?)
-- AND recordedmarkup.type IN (10, 11, 12, 13, 14)
-- GROUP BY recordedmarkup.type
-- ORDER BY SUM((SELECT IFNULL(rm.mark, recordedmarkup.mark)
-- FROM recordedmarkup AS rm
-- WHERE rm.chanid = recordedmarkup.chanid
-- AND rm.starttime = recordedmarkup.starttime
-- AND rm.type IN (10, 11, 12, 13, 14)
-- AND rm.mark > recordedmarkup.mark
-- ORDER BY rm.mark ASC LIMIT 1)- recordedmarkup.mark)
DESC
-- LIMIT 1',
-- $this->chanid,
-- $this->recstartts
-+ $sh = $db->query('SELECT aspect
-+ FROM recordedfile
-+ WHERE recordedid = ?',
-+ $this->recordedid
- );
- $row = $sh->fetch_assoc();
- $sh->finish();
-
-- switch($row['type']) {
-- case 10:
-- return 1;
-- case 11:
-- return 4/3;
-- case 12:
-- return 16/9;
-- case 13:
-- return 2.21/1;
-- case 14:
-- return $row['data']/1000000.0;
-- default:
-- return 4/3;
-+ if (($row['aspect'] > 1.777777) && ($row['aspect']
< 1.777779)) {
-+ // avoid low precision 16:9 to avoid 320x179 thumbnails
-+ return 16/9;
-+ } elseif ($row['aspect'] > 1) {
-+ return $row['aspect'];
-+ } else {
-+ // default 4:3
-+ return 4/3;
- }
+- function _or($this, $or_this, $gt = false) {
++ function _or($a, $or_this, $gt = false) {
+ if ($gt === true)
+- return $this > 0 ? $this : $or_this;
++ return $a > 0 ? $a : $or_this;
+ if (!empty($gt))
+- return $this > $gt ? $this : $or_this;
+- return $this ? $this : $or_this;
++ return $a > $gt ? $a : $or_this;
++ return $a ? $a : $or_this;
}
- }
-diff --git a/modules/tv/classes/Schedule.php b/modules/tv/classes/Schedule.php
-index 8cbfac4..c63f948 100644
---- a/modules/tv/classes/Schedule.php
-+++ b/modules/tv/classes/Schedule.php
-@@ -374,9 +374,9 @@ class Schedule extends MythBase {
- _or($this->playgroup, 'Default' ),
- _or($this->storagegroup, 'Default' ),
- _or($this->prefinput, 0, true),
-- _or($this->next_record, '00:00:00' ),
-- _or($this->last_record, '00:00:00' ),
-- _or($this->last_delete, '00:00:00' ),
-+ _or($this->next_record, NULL ),
-+ _or($this->last_record, NULL ),
-+ _or($this->last_delete, NULL ),
- _or($this->inetref, '' ),
- _or($this->season, 0 ),
- _or($this->episode, 0 ),
-diff --git a/modules/tv/includes/programs.php b/modules/tv/includes/programs.php
-index dff6eb4..e64a27c 100644
---- a/modules/tv/includes/programs.php
-+++ b/modules/tv/includes/programs.php
-@@ -97,7 +97,7 @@
- trigger_error("load_all_program_data() attempted with out any
channels", FATAL);
- $these_channels = implode(',', $these_channels);
- // Build the sql query, and execute it
-- $query = 'SELECT program.*,
-+ $query = 'SELECT DISTINCT program.*,
- UNIX_TIMESTAMP(program.starttime) AS starttime_unix,
- UNIX_TIMESTAMP(program.endtime) AS endtime_unix,
- IFNULL(programrating.system, "") AS rater,
-@@ -106,9 +106,9 @@
- channel.channum
- FROM program USE INDEX (id_start_end)
- LEFT JOIN programrating USING (chanid, starttime)
-- LEFT JOIN channel ON program.chanid = channel.chanid
-- LEFT JOIN credits ON (program.chanid = credits.chanid AND
program.starttime = credits.starttime)
-- LEFT JOIN people ON (credits.person = people.person)
-+ LEFT JOIN channel USING (chanid)
-+ LEFT JOIN credits USING (chanid, starttime)
-+ LEFT JOIN people USING (person)
- WHERE';
- // Only loading a single channel worth of information
- if ($chanid > 0)
-@@ -128,10 +128,11 @@
- if ($extra_query)
- $query .= ' AND '.$extra_query;
- // Group and sort
-- if (!$distinctTitle)
-- $query .= "\nGROUP BY channel.callsign, program.chanid,
program.starttime";
-- else
-- $query .= "\nGROUP BY program.title";
-+ // FIXME reenable with e.g. ANY_VALUE or rewrite to use the Service API
-+ // if (!$distinctTitle)
-+ // $query .= "\nGROUP BY channel.callsign, program.chanid,
program.starttime";
-+ // else
-+ // $query .= "\nGROUP BY program.title";
- $query .= " ORDER BY program.starttime";
- // Limit
- if ($single_program)
-diff --git a/modules/tv/set_channels.php b/modules/tv/set_channels.php
-index 7bdd4fb..9534b21 100644
---- a/modules/tv/set_channels.php
-+++ b/modules/tv/set_channels.php
-@@ -33,7 +33,7 @@
- visible = ?';
- $query_params[] = $data['xmltvid'];
- $query_params[] = $data['freqid'];
-- $query_params[] = $data['finetune'];
-+ $query_params[] = empty($data['finetune']) ? 0 :
$data['finetune'];
- $query_params[] = $data['videofilters'];
- $query_params[] = $data['brightness'];
- $query_params[] = $data['contrast'];
-diff --git a/mythweb.pl b/mythweb.pl
-index 252ecf4..4f36a33 100755
---- a/mythweb.pl
-+++ b/mythweb.pl
-@@ -10,6 +10,9 @@
- use Cwd 'abs_path';
- use File::Basename;
-+# Add mythweb dir to @INC
-+ use lib dirname(abs_path($ENV{'SCRIPT_FILENAME'} or $0));
-+
- # pwd is / when running under mod_rewrite, so we should chdir to the script
- # directory for consistency
- chdir dirname(abs_path($ENV{'SCRIPT_FILENAME'} or $0));
+ /**
diff --git a/mythweb.spec b/mythweb.spec
index b559513..5759922 100644
--- a/mythweb.spec
+++ b/mythweb.spec
@@ -1,11 +1,11 @@
-%global vers_string v0.28-13-g3fa642f
+%global vers_string v0.28.1-1-gd94cf0b
Name: mythweb
Summary: The web interface to MythTV
URL:
http://www.mythtv.org/
-Version: 0.28
-Release: 6%{?dist}
+Version: 0.28.1
+Release: 1%{?dist}
License: GPLv2 and LGPLv2 and MIT
@@ -14,7 +14,7 @@ Source1: mythweb.conf
Source2: ChangeLog
# Patch generated from mythweb fixes branch. From mythweb git directory:
-# git diff -p --stat %{version} > mythweb-fixes.patch
+# git diff -p --stat <git_tag> > mythweb-fixes.patch
Patch0: mythweb-0.28-fixes.patch
# This is needed for perl dependency auto-detection
diff --git a/sources b/sources
index 068b5c3..d828b60 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9c2cfb0440a188d313ef9ad5fd1cccfe mythweb-0.28.tar.gz
+3109e9751a246881084771923ebd57ba mythweb-0.28.1.tar.gz