summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/mre/patch.diff
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra-testing/community/mre/patch.diff')
-rw-r--r--abs/extra-testing/community/mre/patch.diff273
1 files changed, 273 insertions, 0 deletions
diff --git a/abs/extra-testing/community/mre/patch.diff b/abs/extra-testing/community/mre/patch.diff
new file mode 100644
index 0000000..66390d9
--- /dev/null
+++ b/abs/extra-testing/community/mre/patch.diff
@@ -0,0 +1,273 @@
+--- ../mre-1.1.2/class/MythClient.php.original 2006-04-05 17:39:13.000000000 -0500
++++ ../mre-1.1.2/class/MythClient.php 2010-05-14 10:16:54.000000000 -0500
+@@ -112,7 +112,7 @@
+ return '0';
+ }
+ foreach($out as $line)
+- if(preg_match('/^Library API version: (.*)$/', $line, $matches))
++ if(preg_match('/^Library API *: (.*)$/', $line, $matches))
+ return $matches[1];
+ return '0';
+ }
+--- ../mre-1.1.2/class/NHLEvent.php.original 2006-11-05 17:06:57.000000000 -0600
++++ ../mre-1.1.2/class/NHLEvent.php 2010-05-21 00:44:49.000000000 -0500
+@@ -27,7 +27,7 @@
+ /**
+ * URL to grab game info from
+ */
+- const url = 'http://scores.espn.go.com/nhl/scoreboard';
++ const url = 'http://localhost/scores/nhl.php';
+
+ /**
+ * Class constructor.
+@@ -39,32 +39,27 @@
+ parent::__construct();
+
+ $criteria = $this->generateSearchTerms($gameInfo);
++
+ if(!sizeof($criteria))
+ trigger_error("Unable to generate valid search terms! [$gameInfo]", E_USER_WARNING);
+ else
+ {
+ $data = file(self::url);
+- if($data !== FALSE)
+- foreach($criteria as $term)
+- {
+- $status = '';
+- foreach($data as $line)
+- if(preg_match('/' . preg_quote($term) . '/', $line))
+- {
+- $status = $line;
+- break;
+- }
+- if(preg_match('/id.*st"\>(.*)\<\/td/U', $status, $match))
+- {
+- $this->setStatus($match[1]);
+- if(preg_match('/^Final/', $match[1]))
+- $this->setEventOver(TRUE);
+- else
+- $this->setEventOver(FALSE);
+- $this->setValid(TRUE);
+- break;
+- }
++ if($data)
++ {
++ foreach($data as $line)
++ {
++ if((strpos($line,$criteria[0]))&&(strpos($line,$criteria[1])))
++ {
++ if(strpos($line,'FINAL'))
++ $this->setEventOver(TRUE);
++ else
++ $this->setEventOver(FALSE);
++ $this->setValid(TRUE);
++ break;
++ }
+ }
++ }
+ }
+ if(!$this->isValid())
+ trigger_error("Unable to find NHL info for '$gameInfo'! The NHL parser may need to be updated.", E_USER_WARNING);
+--- ../mre-1.1.2/conf/mre.conf.in.original 2006-08-13 16:48:57.000000000 -0500
++++ ../mre-1.1.2/conf/mre.conf.in 2010-05-04 00:25:26.000000000 -0500
+@@ -28,9 +28,9 @@
+ ; *** Application settings
+ ; Unprivledged user to run as, if started as root
+ ; This script will not run as root
+-user = nobody
++user = mythtv
+ ; Run MRE as daemon? Requires pcntl_* functions built into PHP
+-daemon = true
++daemon = false
+ ; Number of minutes to sleep between runs
+ sleep = 5
+ ; Logging level (0 = normal, 1 = +error, 2 = +warning, 3 = +debug)
+--- ../mre-1.1.2/class/MLBEvent.php.original 2006-11-05 17:06:57.000000000 -0600
++++ ../mre-1.1.2/class/MLBEvent.php 2010-05-21 20:08:30.000000000 -0500
+@@ -27,7 +27,7 @@
+ /**
+ * URL to grab game info from
+ */
+- const url = 'http://scores.espn.go.com/mlb/scoreboard';
++ const url = 'http://localhost/scores/mlb.php';
+
+ /**
+ * Class constructor.
+@@ -43,41 +43,22 @@
+ trigger_error("Unable to generate valid search terms! [$gameInfo]", E_USER_WARNING);
+ else
+ {
+- $data = file(self::url);
+- $games = array();
+- if($data !== FALSE)
+- {
+- // Split the huge string into individual game data
+- foreach($data as $line)
+- if(preg_match('/\<div id="allGames".*\>.*/', $line))
+- {
+- while(($loc = strrpos($line, 'teamTop')) !== FALSE)
+- {
+- $games[] = substr($line, $loc);
+- $line = substr($line, 0, $loc);
+- }
+- break;
+- }
+- if(!sizeof($games))
+- trigger_error("Unable to find valid game data within source!", E_USER_WARNING);
+- foreach($criteria as $term)
+- {
+- foreach($games as $game)
+- {
+- if(preg_match('/' . preg_quote($term) . '/', $game))
+- if(preg_match('/teamTop.*\>(.*)\<\/td\>/U', $game, $matches))
+- {
+- $this->setStatus($matches[1]);
+- if(preg_match('/^(Final|Postponed)/', $matches[1]))
+- $this->setEventOver(TRUE);
+- else
+- $this->setEventOver(FALSE);
+- $this->setValid(TRUE);
+- break 2;
+- }
+- }
++ $data = file(self::url);
++ if($data)
++ {
++ foreach($data as $line)
++ {
++ if((strpos($line,$criteria[0]))&&(strpos($line,$criteria[1])))
++ {
++ if((strpos($line,'FINAL'))or(strpos($line,'Postponed')))
++ $this->setEventOver(TRUE);
++ else
++ $this->setEventOver(FALSE);
++ $this->setValid(TRUE);
++ break;
++ }
+ }
+- }
++ }
+ }
+ if(!$this->isValid())
+ trigger_error("Unable to find MLB info for '$gameInfo'! The MLB parser may need to be updated.", E_USER_WARNING);
+--- ../mre-1.1.2/class/NBAEvent.php.original 2006-11-05 17:06:57.000000000 -0600
++++ ../mre-1.1.2/class/NBAEvent.php 2010-05-21 21:15:42.000000000 -0500
+@@ -27,7 +27,7 @@
+ /**
+ * URL to grab game info from
+ */
+- const url = 'http://scores.espn.go.com/nba/scoreboard';
++ const url = 'http://localhost/scores/nba.php';
+
+ /**
+ * Class constructor.
+@@ -44,35 +44,21 @@
+ else
+ {
+ $data = file(self::url);
+- if($data !== FALSE)
+- foreach($criteria as $term)
+- {
+- $status = '';
+- $i = 0;
+- while($i < sizeof($data))
+- {
+- if(preg_match('/' . preg_quote($term) . '/', $data[$i]))
+- {
+- $status = $data[$i];
+- break;
+- }
+- ++$i;
+- }
+- if($i == sizeof($data))
+- --$i;
+-
+- if(preg_match('/id.*clock"\>(.*)\<\/div/U', $data[$i], $match) ||
+- preg_match('/id.*clock"\>(.*)\<\/div/U', $data[$i-1], $match))
+- {
+- $this->setStatus($match[1]);
+- if(preg_match('/^Final/', $match[1]))
+- $this->setEventOver(TRUE);
+- else
+- $this->setEventOver(FALSE);
+- $this->setValid(TRUE);
+- break;
+- }
++ if($data)
++ {
++ foreach($data as $line)
++ {
++ if((strpos($line,$criteria[0]))&&(strpos($line,$criteria[1])))
++ {
++ if(strpos($line,'FINAL'))
++ $this->setEventOver(TRUE);
++ else
++ $this->setEventOver(FALSE);
++ $this->setValid(TRUE);
++ break;
++ }
+ }
++ }
+ }
+ if(!$this->isValid())
+ trigger_error("Unable to find NBA info for '$gameInfo'! The NBA parser may need to be updated.", E_USER_WARNING);
+--- ../mre-1.1.2/class/NFLEvent.php.original 2006-11-05 17:06:57.000000000 -0600
++++ ../mre-1.1.2/class/NFLEvent.php 2010-05-21 19:09:36.000000000 -0500
+@@ -27,7 +27,7 @@
+ /**
+ * URL to grab game info from
+ */
+- const url = 'http://scores.espn.go.com/nfl/scoreboard';
++ const url = 'http://localhost/scores/nfl.php';
+
+ /**
+ * Class constructor.
+@@ -44,33 +44,21 @@
+ else
+ {
+ $data = file(self::url);
+- $games = array();
+- if($data !== FALSE)
+- {
+- // Split the huge string into individual game data
+- foreach($data as $line)
+- if(preg_match('/\<td class="teamTop.*".*\>.*/', $line))
+- $games[] = $line;
+- if(!sizeof($games))
+- trigger_error("Unable to find valid game data within source!", E_USER_WARNING);
+- foreach($criteria as $term)
+- {
+- foreach($games as $game)
+- {
+- if(preg_match('/' . preg_quote($term) . '/', $game))
+- if(preg_match('/teamTop.*\>(.*)\<\/td\>/U', $game, $matches))
+- {
+- $this->setStatus($matches[1]);
+- if(preg_match('/^(Final|Postponed)/', $matches[1]))
+- $this->setEventOver(TRUE);
+- else
+- $this->setEventOver(FALSE);
+- $this->setValid(TRUE);
+- break 2;
+- }
+- }
+- }
+- }
++ if($data)
++ {
++ foreach($data as $line)
++ {
++ if((strpos($line,$criteria[0]))&&(strpos($line,$criteria[1])))
++ {
++ if(strpos($line,'FINAL'))
++ $this->setEventOver(TRUE);
++ else
++ $this->setEventOver(FALSE);
++ $this->setValid(TRUE);
++ break;
++ }
++ }
++ }
+ }
+ if(!$this->isValid())
+ trigger_error("Unable to find NFL info for '$gameInfo'! The NFL parser may need to be updated.", E_USER_WARNING);