[mythtv] Re: [mythtv-users] Mythweb bug - Apostrophe not handled
Clint Gilders
techservices at onlinehobbyist.com
Wed Jun 9 20:51:43 EDT 2004
Joel Anderson wrote:
> There seems to be a problem in the search page with apostrophes too. When
> the results show up there is an escape (backslash) in front of the
> apostrophe, which you have to then manually remove to re-run the search.
> Otherwise the escape gets escaped, and you end up with a lot of backslashes.
> Not sure if anyone else is seeing this, I haven't found any other posts so I
> thought I would point it out.
I sent a patch to one of the developers a couple of days ago. Maybe
it'll get commited or atleast help out. I also patched a problem where
if you delete a show when sorted by title you are redirected back to the
unsorted list of all shows.
I've attached the patch. It was made against Myth .15 from Knoppmyth R4V4.
I write lots of PHP but don't make many patches. Forgive me if this
isn't in the proper format.
--
Clint Gilders <techservices at onlinehobbyist.com>
Director of Technology Services
OnlineHobbyist.com, Inc.
-------------- next part --------------
--- /var/www/recorded_programs.org.php 2004-06-07 11:46:20.000000000 -0400
+++ /var/www/recorded_programs.php 2004-06-07 13:18:20.000000000 -0400
@@ -24,14 +24,23 @@
// No need to scan the rest of the items, so leave early
break;
}
+ // If there is a title submitted, filter by it.
+ if(isset($_GET['title'])) {
+ $_GET['title'] = urlencode(stripslashes($_GET['title']));
+ header("Location: recorded_programs.php?title=" . $_GET['title'] . "");
+ exit;
+ }
// Redirect back to the page again, but without the query string, so reloads are cleaner
- header('Location: recorded_programs.php');
- exit;
+ else {
+ header('Location: recorded_programs.php');
+ exit;
+ }
}
// Queries for a specific program title
isset($_GET['title']) or $_GET['title'] = $_POST['title'];
isset($_GET['title']) or $_GET['title'] = $_SESSION['recorded_title'];
+ $_GET['title'] = stripslashes($_GET['title']);
// Parse the program list
$recordings = get_backend_rows('QUERY_RECORDINGS Delete');
--- /var/www/themes/Default/recorded_programs.org.php 2004-06-07 11:36:04.000000000 -0400
+++ /var/www/themes/Default/recorded_programs.php 2004-06-07 11:37:24.000000000 -0400
@@ -38,7 +38,7 @@
function confirm_delete(id) {
if (confirm("<?php echo _LANG_CONFIRM_DELETE?>\n\n "+files[id][0]))
- location.href = "recorded_programs.php?delete=yes&file="+files[id][1];
+ location.href = "recorded_programs.php?title=<?php echo urlencode($show->title)?>&delete=yes&file="+files[id][1];
}
// -->
-------------- next part --------------
_______________________________________________
mythtv-dev mailing list
mythtv-dev at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
More information about the mythtv-users
mailing list