diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2007-11-27 15:22:33 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2007-11-27 15:22:33 +0000 |
| commit | 73ffd898650f6cb75d323cc438845a3aead1b110 (patch) | |
| tree | e92d68f9802fd2ae1e7479d0e02935ac350bb1bf /lib/XXV/MODULES/CHANNELS.pm | |
| parent | aacaa350f7da7c154264897da26d15ff38df46bb (diff) | |
| download | xxv-73ffd898650f6cb75d323cc438845a3aead1b110.tar.gz xxv-73ffd898650f6cb75d323cc438845a3aead1b110.tar.bz2 | |
* Database: Change method of version control, use comment from table, instead use table 'VERSION'
* RECORDS: Use MD5 for mapping preview images
* RECORDS: Don't use 2nd try to generate preview images
* Handle field names from table now with special character, remove prior workaround
* TIMER: Search lookup also for description
* buildsearch: redesign avoid SQL-Injection
* AUTOTIMER: Speed up background scan, compare now only changed und added epg-events
Diffstat (limited to 'lib/XXV/MODULES/CHANNELS.pm')
| -rw-r--r-- | lib/XXV/MODULES/CHANNELS.pm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/XXV/MODULES/CHANNELS.pm b/lib/XXV/MODULES/CHANNELS.pm index 1bab6a5..d2f7fe0 100644 --- a/lib/XXV/MODULES/CHANNELS.pm +++ b/lib/XXV/MODULES/CHANNELS.pm @@ -190,15 +190,20 @@ sub _init { # ------------------ my $obj = shift || return error('No object defined!'); - return 0, panic("Session to database is'nt connected") - unless($obj->{dbh}); + unless($obj->{dbh}) { + panic("Session to database is'nt connected"); + return 0; + } - # remove old table, if updated rows - tableUpdated($obj->{dbh},'CHANNELS',16,1); - tableUpdated($obj->{dbh},'CHANNELGROUPS',3,1); + my $version = 26; # Must be increment if rows of table changed + # this tables hasen't handmade user data, + # therefore old table could dropped if updated rows + if(!tableUpdated($obj->{dbh},'CHANNELS',$version,1) + || !tableUpdated($obj->{dbh},'CHANNELGROUPS',$version,1)) { + return 0; + } # Look for table or create this table - my $version = main::getVersion; $obj->{dbh}->do(qq| CREATE TABLE IF NOT EXISTS CHANNELS ( Id varchar(100) NOT NULL, |
