SOURCES: mythtv-branch.diff (NEW) - release 0.19 fixes up to svn 1...
glen
glen at pld-linux.org
Sun May 28 13:59:04 CEST 2006
Author: glen Date: Sun May 28 11:59:04 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- release 0.19 fixes up to svn 10051
---- Files affected:
SOURCES:
mythtv-branch.diff (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/mythtv-branch.diff
diff -u /dev/null SOURCES/mythtv-branch.diff:1.1
--- /dev/null Sun May 28 13:59:04 2006
+++ SOURCES/mythtv-branch.diff Sun May 28 13:58:59 2006
@@ -0,0 +1,6215 @@
+Index: mythplugins/mythweb/themes/wml/header.php
+===================================================================
+--- mythplugins/mythweb/themes/wml/header.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/themes/wml/header.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -26,4 +26,4 @@
+ <p><a href="<?php echo root ?>tv/upcoming"><?php echo t('Upcoming Recordings') ?></a></p>
+ <p><a href="<?php echo root ?>tv/recorded"><?php echo t('Recorded Programs') ?></a></p>
+ <p><a href="<?php echo root ?>tv/search"><?php echo t('Search') ?></a></p>
+-<p><a href="<?php echo root ?>status?xml"><?php echo t('Backend Status') ?></a></p>
++<p><a href="<?php echo root ?>status/xml"><?php echo t('Backend Status') ?></a></p>
+Index: mythplugins/mythweb/themes/default/weather/weather.php
+===================================================================
+--- mythplugins/mythweb/themes/default/weather/weather.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/themes/default/weather/weather.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -93,13 +93,13 @@
+ $tomorrow = date("m/d/Y", mktime(0, 0, 0, date("m") , date("d")+1, date("Y")));
+
+ switch($forecast->dayofweek) {
++ case 0: $day = t('Sunday'); break;
+ case 1: $day = t('Monday'); break;
+ case 2: $day = t('Tuesday'); break;
+ case 3: $day = t('Wednesday'); break;
+ case 4: $day = t('Thursday'); break;
+ case 5: $day = t('Friday'); break;
+ case 6: $day = t('Saturday'); break;
+- case 7: $day = t('Sunday'); break;
+ default: $day = $forecast->date; break;
+ }
+
+Index: mythplugins/mythweb/themes/default/music/music.php
+===================================================================
+--- mythplugins/mythweb/themes/default/music/music.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/themes/default/music/music.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -164,10 +164,12 @@
+
+ function print_header($filterPlaylist,$filterArtist,$filterAlbum,$filterGenre) {
+ $this->filterPlaylist=$filterPlaylist;
+-// Set the desired page title
+- $page_title = 'MythWeb - '.t('Music');
+-// Print the page header
+- require_once theme_dir.'/header.php';
++ // Set the desired page title
++ global $page_title, $Modules, $headers;
++ $page_title = 'MythWeb - '.t('Music');
++ // Print the page header
++ require_once theme_dir.'/header.php';
++
+ printf("<form action=\"".root."music\" method=\"GET\" >\n");
+ printf("<input type=\"hidden\" name=\"mode\" value=\"music\" />\n");
+
+Index: mythplugins/mythweb/themes/default/tv/detail.php
+===================================================================
+--- mythplugins/mythweb/themes/default/tv/detail.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/themes/default/tv/detail.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -51,7 +51,7 @@
+ <?php } ?>
+ <div id="program_title">
+ <h1>
+- <a href="<?php echo root ?>tv/search/<?php echo urlencode($program->title) ?>&search_title=yes"><?php echo $schedule->title ?></a>
++ <a href="<?php echo root ?>tv/search/<?php echo str_replace('%2F', '/', rawurlencode($schedule->title)) ?>?search_title=1"><?php echo $schedule->title ?></a>
+ </h1>
+ <div id="program_time">
+ <?php
+Index: mythplugins/mythweb/includes/mythbackend.php
+===================================================================
+--- mythplugins/mythweb/includes/mythbackend.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/includes/mythbackend.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -15,10 +15,6 @@
+ // The character string used by the backend to separate records
+ define('backend_sep', '[]:[]');
+
+-// A couple of global variables to keep duplicate queries to a minimum
+- $Scheduled_Recordings = array();
+- $Recorded_Programs = array();
+-
+ // MYTH_PROTO_VERSION is defined in libmyth in mythtv/libs/libmyth/mythcontext.h
+ // and should be the current MythTV protocol version.
+ define('MYTH_PROTO_VERSION', 26);
+Index: mythplugins/mythweb/includes/programs.php
+===================================================================
+--- mythplugins/mythweb/includes/programs.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/includes/programs.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -81,7 +81,9 @@
+ /**/
+ function &load_all_program_data($start_time, $end_time, $chanid = false, $single_program = false, $extra_query = '') {
+ global $Channels, $db;
+- // Make a local hash of channel chanid's with references to the actual channel data
++ // Make a local hash of channel chanid's with references to the actual
++ // channel data (Channels are not indexed by anything in particular, so
++ // that the user can sort by chanid or channum).
+ $channel_hash = array();
+ // An array (that later gets converted to a string) containing the id's of channels we want to load
+ $these_channels = array();
+@@ -104,7 +106,7 @@
+ load_all_channels();
+ // Scan through the channels array and actually assign those references
+ foreach (array_keys($Channels) as $key) {
+- $channel_hash[$Channels[$key]->chanid] = &$Channels[$key];
++ $channel_hash[$Channels[$key]->chanid] =& $Channels[$key];
+ // Reinitialize the programs array for this channel
+ $Channels[$key]->programs = array();
+ // Keep track of this channel id in case we're only grabbing info for certain channels - workound included to avoid blank chanid's
+@@ -130,11 +132,13 @@
+ LEFT JOIN programrating USING (chanid, starttime)
+ LEFT JOIN oldrecorded
+ ON oldrecorded.recstatus IN (-3, 11)
+- AND IF(oldrecorded.programid OR oldrecorded.seriesid,
++ AND IF(oldrecorded.programid AND oldrecorded.seriesid,
+ oldrecorded.programid = program.programid
+ AND oldrecorded.seriesid = program.seriesid,
+- oldrecorded.title = program.title
+- AND oldrecorded.subtitle = program.subtitle
++ oldrecorded.title AND oldrecorded.subtitle
++ AND oldrecorded.description
++ AND oldrecorded.title = program.title
++ AND oldrecorded.subtitle = program.subtitle
+ AND oldrecorded.description = program.description
+ )
+ LEFT JOIN channel ON program.chanid = channel.chanid
+@@ -156,8 +160,12 @@
+ // The extra query, if there is one
+ if ($extra_query)
+ $query .= ' AND '.$extra_query;
+- // Group, sort and query
++ // Group and sort
+ $query .= ' GROUP BY program.chanid, program.starttime ORDER BY program.starttime';
++ // Limit
++ if ($single_program)
++ $query .= ' LIMIT 1';
++ // Query
+ $sh = $db->query($query,
+ star_character, max_stars, max_stars);
+ // No results
+@@ -188,12 +196,8 @@
+ // Cleanup
+ $sh->finish();
+ // If channel-specific information was requested, return an array of those programs, or just the first/only one
+- if ($chanid) {
+- if ($single_program)
+- return $channel_hash[$chanid]->programs[0];
+- else
+- return $channel_hash[$chanid]->programs;
+- }
++ if ($chanid && $single_program)
++ return $these_programs[0];
+ // Just in case, return an array of all programs found
+ return $these_programs;
+ }
+@@ -272,18 +276,18 @@
+ $this->endtime = $data[12]; # show end-time
+ // Is this a previously-recorded program? Calculate the filesize
+ if (!empty($this->filename)) {
+- $this->filesize = ($fs_high + ($fs_low < 0)) * 4294967296 + $fs_low;
+- }
+- // Ah, a scheduled recording - let's load more information about it, to be parsed in below
+- elseif ($this->chanid) {
+- unset($this->filename);
+- // Kludge to avoid redefining the object, which doesn't work in php5
+- $tmp = @get_object_vars(load_one_program($this->starttime, $this->chanid));
+- if (is_array($tmp) && count($tmp) > 0) {
+- foreach ($tmp as $key => $value) {
+- $this->$key = $value;
+- }
++ if (function_exists('gmp_add')) {
++ // GMP functions should work better with 64 bit numbers.
++ $size = gmp_add($fs_low,
++ gmp_mul('4294967296',
++ gmp_add($fs_high, $fs_low < 0 ? '1' : '0'))
++ );
++ $this->filesize = gmp_strval($size);
+ }
++ else {
++ // This is inaccurate, but it's the best we can get without GMP.
++ $this->filesize = ($fs_high + ($fs_low < 0)) * 4294967296 + $fs_low;
++ }
+ }
+ // Load the remaining info we got from mythbackend
+ $this->title = $data[0]; # program name/title
+@@ -291,14 +295,14 @@
+ $this->description = $data[2]; # episode description
+ $this->category = $data[3];
+ #$chanid = $data[4]; # Extracted a few lines earlier
+- #$channum = $data[5];
+- #$callsign = $data[6];
++ $this->channum = $data[5];
++ $this->callsign = $data[6];
+ $this->channame = $data[7];
+ #$pathname = $data[8]; # Extracted a few lines earlier
+ #$fs_high = $data[9]; # Extracted a few lines earlier
+ #$fs_low = $data[10]; # Extracted a few lines earlier
+- #$starttime = $data[11]; # Extracted a few lines earlier
+- #$endtime = $data[12]; # Extracted a few lines earlier
++ #$this->starttime = $data[11]; # Extracted a few lines earlier
++ #$this->endtime = $data[12]; # Extracted a few lines earlier
+ $this->hostname = $data[16];
+ #$this->sourceid = $data[17];
+ $this->cardid = $data[18];
+@@ -320,9 +324,9 @@
+ $this->programid = $data[34];
+ $this->lastmodified = $data[35];
+ $this->recpriority = $data[36];
+- #$this->airdate = $data[37];
+- #$this->hasairdate = $data[38];
+- $this->timestretch = $program_data[39];
++ $this->airdate = date('Y-m-d', $data[37]);
++ $this->hasairdate = $data[38];
++ $this->timestretch = $data[39];
+ $this->recpriority2 = $data[40];
+ // Assign the program flags
+ $this->has_commflag = ($progflags & 0x01) ? true : false; // FL_COMMFLAG = 0x01
+@@ -363,8 +367,8 @@
+ $this->title_pronounce = $data['title_pronounce'];
+ $this->recstatus = $data['recstatus'];
+
+- if ($program_data['tsdefault']) {
+- $this->timestretch = $program_data['tsdefault'];
++ if ($data['tsdefault']) {
++ $this->timestretch = $data['tsdefault'];
+ } else {
+ $this->timestretch = 1.0;
+ }
+@@ -387,12 +391,14 @@
+ // Now we really should scan the $Channel array and add a link to this program's channel
+ foreach (array_keys($Channels) as $key) {
+ if ($Channels[$key]->chanid == $this->chanid) {
+- $this->channel = &$Channels[$key];
++ $this->channel =& $Channels[$key];
+ break;
+ }
+ }
++ // Not found
++ if (!$this->channel)
++ $this->channel =& load_one_channel($this->chanid);
+ }
+-
+ // Calculate the duration
+ if ($this->recendts)
+ $this->length = $this->recendts - $this->recstartts;
+Index: mythplugins/mythweb/includes/utils.php
+===================================================================
+--- mythplugins/mythweb/includes/utils.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/includes/utils.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -276,7 +276,7 @@
+ static $first_run=true;
+ if($first_run) {
+ $first_run=false;
+- echo '<script type="text/javascript" src="/js/debug.js"></script>';
++ echo '<script type="text/javascript" src="'.root.'js/debug.js"></script>';
+ }
+ // Put our data into a string
+ if (is_array($data) || is_object($data))
+Index: mythplugins/mythweb/includes/init.php
+===================================================================
+--- mythplugins/mythweb/includes/init.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/includes/init.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -16,28 +16,15 @@
+ *
+ /**/
+
+-/**
+- * $Path is an array of PATH_INFO passed into the script via mod_rewrite or some
+- * other lesser means. It contains most of the information required for
+- * figuring out what functions the user wants to access.
+- *
+- * @global array $GLOBALS['Path']
+- * @name $Path
+-/**/
+- global $Path;
+- $Path = explode('/', preg_replace('/^\/+/', '', // Remove leading slashes
+- preg_replace('/[\s]+/', ' ', // Convert extra whitespace
+- // Grab the path info from various different places.
+- array_key_exists('PATH_INFO', $_SERVER)
+- && $_SERVER['PATH_INFO']
+- ? $_SERVER['PATH_INFO']
+- : (array_key_exists('PATH_INFO', $_ENV)
+- && $_ENV['PATH_INFO']
+- ? $_ENV['PATH_INFO']
+- : $_GET['PATH_INFO']
+- )
+- ))
+- );
++// mod_redirect can do some weird things when php is run in cgi mode
++ $keys = preg_grep('/^REDIRECT_/', array_keys($_SERVER));
++ if (!empty($keys)) {
++ foreach ($keys as $key) {
++ $key = substr($key, 9);
++ if (!array_key_exists($key, $_SERVER))
++ $_SERVER[$key] = $_SERVER["REDIRECT_$key"];
++ }
++ }
+
+ // Clean the document root variable and make sure it doesn't have a trailing slash
+ $_SERVER['DOCUMENT_ROOT'] = preg_replace('/\/+$/', '', $_SERVER['DOCUMENT_ROOT']);
+@@ -94,6 +81,29 @@
+ exit;
+ }
+
++/**
++ * $Path is an array of PATH_INFO passed into the script via mod_rewrite or some
++ * other lesser means. It contains most of the information required for
++ * figuring out what functions the user wants to access.
++ *
++ * @global array $GLOBALS['Path']
++ * @name $Path
++/**/
++ global $Path;
++ $Path = explode('/', preg_replace('/^\/+/', '', // Remove leading slashes
++ preg_replace('/[\s]+/', ' ', // Convert extra whitespace
++ // Grab the path info from various different places.
++ array_key_exists('PATH_INFO', $_SERVER)
++ && $_SERVER['PATH_INFO']
++ ? $_SERVER['PATH_INFO']
++ : (array_key_exists('PATH_INFO', $_ENV)
++ && $_ENV['PATH_INFO']
++ ? $_ENV['PATH_INFO']
++ : $_GET['PATH_INFO']
++ )
++ ))
++ );
++
+ // Load the database connection routines
+ require_once 'includes/db.php';
+
+Index: mythplugins/mythweb/includes/mobile.php
+===================================================================
+--- mythplugins/mythweb/includes/mobile.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/includes/mobile.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -74,58 +74,56 @@
+ * If you don't know the screensize of some mobile terminal then use
+ * an empty array or approximate dimensions.
+ */
+- $mobiles = array(/* Phones using the Series 60 platform, e.g. Nokia 3650 and 6600. */
+- 'Series 60' => array('width' => 176, 'height' => 208),
+- 'Series60' => array('width' => 176, 'height' => 208),
+- 'C500' => array('width'=>176, 'height'=> 220), // SPV C500
++ $mobiles = array(
++ /* Phones using the Series 60 platform, e.g. Nokia 3650 and 6600. */
++ 'Series 60' => array('width' => 176, 'height' => 208),
++ 'Series60' => array('width' => 176, 'height' => 208),
++ 'C500' => array('width'=>176, 'height'=> 220), // SPV C500
++ /* Phones using the Series 90 platform, e.g. Nokia 7710. */
++ 'Series 90' => array('width' => 640, 'height' => 320),
++ 'Series90' => array('width' => 640, 'height' => 320),
++ /* The following strings are added for the Palm browser WebPro
++ * WebPro sometimes supplies the screen dimensions, but sometimes not
++ * but we try to detect the best as possible */
++ '240x320' => array('width' => 240, 'height' => 320), // PocketPC IE
++ '320x320' => array('width' => 320, 'height' => 320), // For all Palm Tungsten models
++ '320x480' => array('width' => 320, 'height' => 480), // For Palm Tungsten T
++ '480x320' => array('width' => 480, 'height' => 320), // For Palm Tungsten T
++ '320x480x16' => array('width' => 320, 'height' => 480), // For Palm Tungsten T
++ '480x320x16' => array('width' => 480, 'height' => 320), // For Palm Tungsten T
++ '320x320x16' => array('width' => 320, 'height' => 320),
++ 'WebPro' => array('width' => 320, 'height' => 320), // For all Palm Tungsten models
++ /* A generic mobile phone using Symbian OS. All Symbian phones don't
++ * necessarily have the same screen size so if you want to include
++ * some specific Symbian phones then place them above this line. */
++ 'Symbian' => array('width' => 176, 'height' => 208),
+
+- /* Phones using the Series 90 platform, e.g. Nokia 7710. */
+- 'Series 90' => array('width' => 640, 'height' => 320),
+- 'Series90' => array('width' => 640, 'height' => 320),
++ 'Nokia' => array(), // Nokia phones and emulators
++ 'Eric' => array(), // Ericsson WAP phones and emulators
++ 'WapI' => array(), // Ericsson WapIDE 2.0
++ 'MC21' => array(), // Ericsson MC218
++ 'AUR ' => array(), // Ericsson R320
++ 'R380' => array(), // Ericsson R380
++ 'UP.B' => array(), // UP.Browser
++ 'WinW' => array(), // WinWAP browser
++ 'UPG1' => array(), // UP.SDK 4.0
++ 'upsi' => array(), // another kind of UP.Browser ??
++ 'QWAP' => array(), // unknown QWAPPER browser
++ 'Jigs' => array(), // unknown JigSaw browser
++ 'Java' => array(), // unknown Java based browser
++ 'Alca' => array(), // unknown Alcatel-BE3 browser (UP based?)
++ 'MITS' => array(), // unknown Mitsubishi browser
++ 'MOT-' => array(), // unknown browser (UP based?)
++ 'My S' => array(), // unknown Ericsson devkit browser ?
++ 'WAPJ' => array(), // Virtual WAPJAG www.wapjag.de
++ 'fetc' => array(), // fetchpage.cgi Perl script from www.wapcab.de
++ 'ALAV' => array(), // yet another unknown UP based browser ?
++ 'Wapa' => array(), // another unknown browser (Web based "Wapalyzer"?)
++ 'LGE-' => array(), // LG phones
+
+- /* The following strings are added for the Palm browser WebPro
+- * WebPro sometimes supplies the screen dimensions, but sometimes not
+- * but we try to detect the best as possible
+- */
+- '320x480' => array('width' => 320, 'height' => 480), // For Palm Tungsten T
+- '480x320' => array('width' => 480, 'height' => 320), // For Palm Tungsten T
+- '320x320' => array('width' => 320, 'height' => 320), // For all Palm Tungsten models
+- '320x480x16' => array('width' => 320, 'height' => 480), // For Palm Tungsten T
+- '480x320x16' => array('width' => 480, 'height' => 320), // For Palm Tungsten T
+- '320x320x16' => array('width' => 320, 'height' => 320),
+- 'WebPro' => array('width' => 320, 'height' => 320), // For all Palm Tungsten models
+-
+- /* A generic mobile phone using Symbian OS. All Symbian phones don't
+- * necessarily have the same screen size so if you want to include
+- * some specific Symbian phones then place them above this line. */
+- 'Symbian' => array('width' => 176, 'height' => 208),
+-
+- 'Nokia' => array(), // Nokia phones and emulators
+- 'Eric' => array(), // Ericsson WAP phones and emulators
+- 'WapI' => array(), // Ericsson WapIDE 2.0
+- 'MC21' => array(), // Ericsson MC218
+- 'AUR ' => array(), // Ericsson R320
+- 'R380' => array(), // Ericsson R380
+- 'UP.B' => array(), // UP.Browser
+- 'WinW' => array(), // WinWAP browser
+- 'UPG1' => array(), // UP.SDK 4.0
+- 'upsi' => array(), // another kind of UP.Browser ??
+- 'QWAP' => array(), // unknown QWAPPER browser
+- 'Jigs' => array(), // unknown JigSaw browser
+- 'Java' => array(), // unknown Java based browser
+- 'Alca' => array(), // unknown Alcatel-BE3 browser (UP based?)
+- 'MITS' => array(), // unknown Mitsubishi browser
+- 'MOT-' => array(), // unknown browser (UP based?)
+- 'My S' => array(), // unknown Ericsson devkit browser ?
+- 'WAPJ' => array(), // Virtual WAPJAG www.wapjag.de
+- 'fetc' => array(), // fetchpage.cgi Perl script from www.wapcab.de
+- 'ALAV' => array(), // yet another unknown UP based browser ?
+- 'Wapa' => array(), // another unknown browser (Web based "Wapalyzer"?)
+- 'LGE-' => array(), // LG phones
+-
+- /* For debugging: you can try out the mobile mode without a mobile phone.
+- * Replace 'Opera' with your browser. Comment out for release version. */
+- //'Opera' => array('width' => 176, 'height' => 208)
++ /* For debugging: you can try out the mobile mode without a mobile phone.
++ * Replace 'Opera' with your browser. Comment out for release version. */
++ //'Opera' => array('width' => 176, 'height' => 208)
+ );
+
+ /* Scan through $mobiles and try to find matching user agent. */
+Index: mythplugins/mythweb/includes/recording_schedules.php
+===================================================================
+--- mythplugins/mythweb/includes/recording_schedules.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/includes/recording_schedules.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -68,10 +68,14 @@
+ // Cleanup
+ mysql_free_result($result);
+
++// Initialize
++ global $Scheduled_Recordings, $Num_Conflicts, $Num_Scheduled;
++ $Scheduled_Recordings = array();
++ $Num_Conflicts = 0;
++ $Num_Scheduled = 0;
++
+ // Load all of the scheduled recordings. We will need them at some point, so we
+ // might as well get it overwith here.
+- global $Scheduled_Recordings, $Num_Conflicts, $Num_Scheduled;
+- $Scheduled_Recordings = array();
+ foreach (get_backend_rows('QUERY_GETALLPENDING', 2) as $key => $program) {
+ // The offset entry
+ if ($key === 'offset') {
+Index: mythplugins/mythweb/includes/session.php
+===================================================================
+--- mythplugins/mythweb/includes/session.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/includes/session.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -19,8 +19,8 @@
+
+ // Start the session
+ session_name('mythweb_id');
+- session_set_cookie_params(60 * 60 * 30, '/'); // 30 day timeout on cookies
+- ini_set('session.gc_maxlifetime', 60 * 60 * 30); // ... and sessions
++ session_set_cookie_params(60 * 60 * 24 * 365, '/'); // 1 year timeout on cookies
++ ini_set('session.gc_maxlifetime', 60 * 60 * 24 * 30); // 30 day timeout on sessions
+ session_set_save_handler('sess_do_nothing', 'sess_do_nothing', 'sess_read', 'sess_write', 'sess_destroy', 'sess_gc');
+ session_start();
+
+Index: mythplugins/mythweb/modules/weather/handler.php
+===================================================================
+--- mythplugins/mythweb/modules/weather/handler.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/modules/weather/handler.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -222,8 +222,10 @@
+
+ $data = explode("|", $data);
+ for($i = 0;$i<5;$i++) {
+- $forecast = new Forecast($data[5 + $i],$data[$i]);
+- $forecast->dayofweek = $data[$i];
++ # mktime uses 0-6; msnbc gives us 1-7; adjust msnbc to match mktime
++ $dayofweek = $data[$i] - 1;
++ $forecast = new Forecast($data[5 + $i],$dayofweek);
++ $forecast->dayofweek = $dayofweek;
+ list($forecast->DescImage,$forecast->DescText) = getImageAndDescFromId($data[15 + $i]);
+ $forecast->DescImage = (strlen($forecast->DescImage) > 0) ? $forecast->DescImage : "unknown.png";
+ $forecast->DescText = (strlen($forecast->DescText) > 0) ? $forecast->DescText : t('Unknown') . " (" . $data[15+$i] . ")";
+Index: mythplugins/mythweb/modules/status/handler.php
+===================================================================
+--- mythplugins/mythweb/modules/status/handler.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/modules/status/handler.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -18,14 +18,17 @@
+ $masterhost = get_backend_setting('MasterServerIP');
+ $statusport = get_backend_setting('BackendStatusPort');
+
++// XML mode?
++ $xml_param = ($Path[1] == 'xml') ? '/xml' : '';
++
+ // Make sure the content is interpreted as UTF-8
+ header('Content-Type: text/html; charset=UTF-8');
+
+ // Load the status page
+ if (function_exists('file_get_contents'))
+- $status = file_get_contents("http://$masterhost:$statusport");
++ $status = file_get_contents("http://$masterhost:$statusport$xml_param");
+ else
+- $status = implode("\n", file("http://$masterhost:$statusport"));
++ $status = implode("\n", file("http://$masterhost:$statusport$xml_param"));
+
+ // Extract the page title
+ preg_match('#<title>(.+?)</title>#s', $status, $title);
+Index: mythplugins/mythweb/modules/backend_log/handler.php
+===================================================================
+--- mythplugins/mythweb/modules/backend_log/handler.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/modules/backend_log/handler.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -16,7 +16,7 @@
+ // Where to start searching from
+ $_GET['start'] = intVal($_GET['start']);
+ if ($_GET['start'] < 1)
+- $_GET['start'] = 1;
++ $_GET['start'] = 0;
+
+ // How many entries to show?
+ $_GET['show'] = intVal($_GET['show']);
+Index: mythplugins/mythweb/modules/tv/upcoming.php
+===================================================================
+--- mythplugins/mythweb/modules/tv/upcoming.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/modules/tv/upcoming.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -103,8 +103,9 @@
+ continue;
+ }
+ // Skip deactivated shows?
+- elseif (!$_SESSION['scheduled_recordings']['disp_deactivated']) {
+- continue;
++ elseif ($show->recstatus != 'Recording') {
++ if (!$_SESSION['scheduled_recordings']['disp_deactivated'])
++ continue;
+ }
+ // Assign a reference to this show to the various arrays
+ $all_shows[] =& $Scheduled_Recordings[$channum][$starttime][$key];
+Index: mythplugins/mythweb/modules/tv/recorded.php
+===================================================================
+--- mythplugins/mythweb/modules/tv/recorded.php (.../tags/release-0-19) (revision 10051)
++++ mythplugins/mythweb/modules/tv/recorded.php (.../branches/release-0-19-fixes) (revision 10051)
+@@ -128,9 +128,21 @@
+ continue;
+ // Get the length (27 == recendts; 26 == recstartts)
+ $length = $record[27] - $record[26];
+- // Keep track of the total time and disk space used
++ // Keep track of the total time and disk space used (9 == fs_high; 10 == fs_low)
+ $Total_Time += $length;
+- $Total_Used += ($record[9] + ($record[10] < 0)) * 4294967296 + $record[10]; // 9 == fs_high; 10 == fs_low;
++ if (function_exists('gmp_add')) {
++ // GMP functions should work better with 64 bit numbers.
++ $size = gmp_add($record[10],
++ gmp_mul('4294967296',
++ gmp_add($record[9], $record[10] < 0 ? '1' : '0')
++ )
++ );
++ $Total_Used = gmp_strval(gmp_add($Total_Used, $size));
++ }
++ else {
++ // This is inaccurate, but it's the best we can get without GMP.
++ $Total_Used += ($record[9] + ($record[10] < 0)) * 4294967296 + $record[10];
++ }
+ // keep track of their names and how many episodes we have recorded
+ $Total_Programs++;
+ $Groups[$record[30]]++;
+@@ -223,8 +235,28 @@
+
+ // How much free disk space on the backend machine?
+ list($size_high, $size_low, $used_high, $used_low) = explode(backend_sep, backend_command('QUERY_FREE_SPACE'));
+- define(disk_size, (($size_high + ($size_low < 0)) * 4294967296 + $size_low) * 1024);
+- define(disk_used, (($used_high + ($used_low < 0)) * 4294967296 + $used_low) * 1024);
++ if (function_exists('gmp_add')) {
++ // GMP functions should work better with 64 bit numbers.
++ $size = gmp_mul('1024',
++ gmp_add($size_low,
++ gmp_mul('4294967296',
++ gmp_add($size_high, $size_low < 0 ? '1' : '0'))
++ )
++ );
++ define(disk_size, gmp_strval($size));
++ $size = gmp_mul('1024',
++ gmp_add($used_low,
++ gmp_mul('4294967296',
++ gmp_add($used_high, $used_low < 0 ? '1' : '0'))
++ )
++ );
++ define(disk_used, gmp_strval($size));
++ }
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list