summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2007-12-02 15:24:26 +0000
committerAndreas Brachold <vdr07@deltab.de>2007-12-02 15:24:26 +0000
commitfabf95b3bde629e06b56b48276adf6a553bc9b6b (patch)
tree11ee006ec4172abfd7219e4f51b2e9b38c005554 /lib
parent1dff121c6ee45d01f3f8a8f162f29d3bc99e25df (diff)
downloadxxv-fabf95b3bde629e06b56b48276adf6a553bc9b6b.tar.gz
xxv-fabf95b3bde629e06b56b48276adf6a553bc9b6b.tar.bz2
* AUTOTIMER: Allow search without topic, e.g. any event inside time range
* buildsearch: Allow simple wildcard search with single *
Diffstat (limited to 'lib')
-rw-r--r--lib/XXV/MODULES/AUTOTIMER.pm31
1 files changed, 17 insertions, 14 deletions
diff --git a/lib/XXV/MODULES/AUTOTIMER.pm b/lib/XXV/MODULES/AUTOTIMER.pm
index 75bced6..4c87ee4 100644
--- a/lib/XXV/MODULES/AUTOTIMER.pm
+++ b/lib/XXV/MODULES/AUTOTIMER.pm
@@ -572,8 +572,10 @@ sub autotimerEdit {
$epg = $sth->fetchrow_hashref();
# Channels Ids in Namen umwandeln
- my @channels = map { $_ = $mod->ChannelToPos($_) } split(/[\s|,]+/, $epg->{Channels});
- $epg->{Channels} = \@channels;
+ if($epg->{Channels}) {
+ my @channels = map { $_ = $mod->ChannelToPos($_) } split(/[\s|,]+/, $epg->{Channels});
+ $epg->{Channels} = \@channels;
+ }
# question erwartet ein Array
my @done = split(/\s*,\s*/, $epg->{Done});
@@ -626,7 +628,6 @@ sub autotimerEdit {
msg => gettext('Activate this autotimer'),
},
'Search' => {
- req => gettext('This is required!'),
msg =>
gettext("Search terms to search for EPG entries.
You can also fine tune your search :
@@ -887,10 +888,6 @@ You can also fine tune your search :
if(ref $data eq 'HASH') {
delete $data->{Channel};
- # Last chance ;)
- return $console->err(gettext('Nothing defined for this search!'))
- unless($data->{Search});
-
$obj->_insert($data);
$data->{Id} = $obj->{dbh}->selectrow_arrayref('SELECT SQL_CACHE max(ID) FROM AUTOTIMER')->[0]
@@ -1097,13 +1094,19 @@ sub _eventsearch {
my $timermod = shift || main::getModule('TIMERS') || return error ("Couldn't access modul TIMERS!");
my $addtime = shift;
- # Searchstrings to Paragraphs Changed
- $a->{Search} =~ s/\:/\:\.\*/
- if($a->{InFields} =~ /description/);
-
- my $query = buildsearch($a->{InFields}, $a->{Search});
- my $search = $query->{query};
- my $term = $query->{term};
+ my $query;
+ my $search = '1';
+ my $term = [];
+
+ if($a->{Search}) {
+ # Search strings to Paragraphs Changed
+ $a->{Search} =~ s/\:/\:\.\*/
+ if($a->{InFields} =~ /description/);
+
+ $query = buildsearch($a->{InFields}, $a->{Search});
+ $search = $query->{query};
+ $term = $query->{term};
+ }
# Start and Stop
if($a->{Start} and $a->{Stop}) {