[PATCH 4/5] Web PVR: Prevent adding search = .* to pvr list

dinkypumpkin dinkypumpkin at gmail.com
Tue Feb 14 18:29:46 EST 2012


---
 get_iplayer.cgi |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/get_iplayer.cgi b/get_iplayer.cgi
index e841b61..56455f0 100755
--- a/get_iplayer.cgi
+++ b/get_iplayer.cgi
@@ -3098,7 +3098,7 @@ sub search_progs {
 		{
 			-class => 'action'.$add_search_class_suffix,
 			-title => 'Create a persistent PVR search using the current search terms (i.e. all below programmes)',
-			-onClick => "if ( $matchcount > 30 ) { alert('Please limit your search to result in no more than 30 current programmes'); return false; } BackupFormVars(form); form.NEXTPAGE.value='pvr_add'; form.submit(); RestoreFormVars(form);",
+			-onClick => "if ('$opt->{SEARCH}->{current}' == '.*') { alert('Search = .* will download all available programmes.  Please enter a more specific search term.'); return false; } if ('$opt->{SEARCH}->{current}' == '') { alert('Please enter a search term.'); return false; } if ( $matchcount > 30 ) { alert('Please limit your search to result in no more than 30 current programmes'); return false; }  BackupFormVars(form); form.NEXTPAGE.value='pvr_add'; form.submit(); RestoreFormVars(form);",
 		},
 		'Add Search to PVR'
 	);
-- 
1.7.5.4




More information about the get_iplayer mailing list