git://git.jankratochvil.net
/
www.energie.vellum.cz.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
energie_obsah.contents now permitted NULL to show just the title image
[www.energie.vellum.cz.git]
/
obsah_init.pl
diff --git
a/obsah_init.pl
b/obsah_init.pl
index
d2ded01
..
1f7be33
100755
(executable)
--- a/
obsah_init.pl
+++ b/
obsah_init.pl
@@
-37,7
+37,7
@@
eval { &db_do("drop table $tb_obsah") };
."month tinyint not null,"
."month_last tinyint not null,"
."sequential smallint not null,"
."month tinyint not null,"
."month_last tinyint not null,"
."sequential smallint not null,"
- ."contents text n
ot n
ull"
+ ."contents text null"
.")");
&db_do("alter table $tb_obsah add unique (year,month)");
.")");
&db_do("alter table $tb_obsah add unique (year,month)");
@@
-66,7
+66,8
@@
sub flush_month
$_=$contents;
return if !defined $_;
if (!$_) {
$_=$contents;
return if !defined $_;
if (!$_) {
- print("Empty contents".&where()."!\n");
+ # Permitted to show just the title image
+ #print("Empty contents".&where()."!\n");
}
else {
tr/ \t\n/ \n/s;
}
else {
tr/ \t\n/ \n/s;
@@
-76,7
+77,7
@@
sub flush_month
tr/\002//d;
$_=substr($_,1);
}
tr/\002//d;
$_=substr($_,1);
}
- $insert_tb_obsah->execute($year,$month,$month_last,$sequential,
$_
) or die "SQL insert failure: $!";
+ $insert_tb_obsah->execute($year,$month,$month_last,$sequential,
($_ || undef())
) or die "SQL insert failure: $!";
undef $year,$month;
undef $contents;
undef $first;
undef $year,$month;
undef $contents;
undef $first;