summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/tpl/defs.pl2
-rw-r--r--data/tpl/home10
-rw-r--r--data/tpl/vnedit2
-rw-r--r--data/tpl/vnpage6
-rw-r--r--data/tpl/vnpage_rg2
-rw-r--r--util/updates/update_1.14.pl5
6 files changed, 14 insertions, 13 deletions
diff --git a/data/tpl/defs.pl b/data/tpl/defs.pl
index 44ce3121..6e568c11 100644
--- a/data/tpl/defs.pl
+++ b/data/tpl/defs.pl
@@ -135,7 +135,7 @@ sub summary { # cmd, len, def
my $len = 0;
my $as = 0;
for (split / /, $_[0]) {
- next if !$_;
+ next if !defined $_ || $_ eq '';
my $l = length;
s/\&/&/g;
s/>/>/g;
diff --git a/data/tpl/home b/data/tpl/home
index 5d8cd763..37ada1d8 100644
--- a/data/tpl/home
+++ b/data/tpl/home
@@ -13,13 +13,13 @@
or to discuss about the database at our <a href="http://forum.vndb.org/">forums</a>.
</p>
-<h3 class="home">VNDB 1.13!</h3>
+<h3 class="home">VNDB 1.14!</h3>
<p class="desc">
- And it's time for an update again: This update makes it possible to specify how much
- a category applies to a visual novel, adds a language filter to the category browser,
- and fixes many, many bugs.
+ A large update technical-wise, but no major noticable changes: Large cover images will now automatically
+ get resized, all static content has been moved to a separate domain, the Nintento Wii has been
+ added to the platform list, and various other small changes and bug fixes.
<br />
- <a href="http://forum.vndb.org/index.php?topic=43.0">Read more...</a> - <a href="http://forum.vndb.org/index.php?board=7.0">news archive</a>.
+ <a href="http://forum.vndb.org/index.php?topic=49.0">Read more...</a> - <a href="http://forum.vndb.org/index.php?board=7.0">news archive</a>.
</p>
<ul class="home">
diff --git a/data/tpl/vnedit b/data/tpl/vnedit
index 3f5c6700..dde98cb3 100644
--- a/data/tpl/vnedit
+++ b/data/tpl/vnedit
@@ -65,7 +65,7 @@
{ type => 'sub', title => 'Image', short => 'img' },
$d{id} ? (
{ type => 'static', text => $d{vn}{image} > 0 ?
- sprintf '<img src="%s/cv/%02d/%d.jpg" style="float: right" />', $p{st}, $d{vn}{image}%50, $d{vn}{image} :
+ sprintf '<img src="%s/cv/%02d/%d.jpg" style="float: right" />', $p{st}, $d{vn}{image}%100, $d{vn}{image} :
$d{vn}{image} < 0 ? '[processing]' : 'No image uploaded yet...' },
) : (),
{ type => 'upload', name => $d{vn}{image} ? 'Change' : 'Upload', short => 'img' },
diff --git a/data/tpl/vnpage b/data/tpl/vnpage
index 1cfdd89a..f602c1e2 100644
--- a/data/tpl/vnpage
+++ b/data/tpl/vnpage
@@ -22,7 +22,7 @@
[ l_cisv => 'CISVisual link', sub { $_[0] ? '<a href="http://cisvisual.net/title/'.$_[0].'">'.$_[0].'</a>' : 'No link' } ],
[ categories => 'Categories', sub { join(' ', map { $VNDB::CAT->{substr($_->[0],0,1)}[1]{substr($_->[0],1,2)}.'('.$_->[1].')' } sort { $a->[0] cmp $b->[0] } @{$_[0]}) || 'No categories selected' }, 1 ],
[ relations => 'Relations', sub { join("<br />\n", map { $VNDB::VREL->[$_->{relation}].': '._hchar($_->{title}) } sort { $a->{id} <=> $b->{id} } @{$_[0]}) } ],
- [ image => 'Image', sub { $_[0] > 0 ? sprintf '<img src="%s/cv/%02d/%d.jpg" />', $p{st}, $_[0]%50, $_[0] : $_[0] < 0 ? '[processing]' : 'No image'; } ],
+ [ image => 'Image', sub { $_[0] > 0 ? sprintf '<img src="%s/cv/%02d/%d.jpg" />', $p{st}, $_[0]%100, $_[0] : $_[0] < 0 ? '[processing]' : 'No image'; } ],
[ img_nsfw => 'NSFW', sub { $_[0] ? 'Not safe' : 'Safe' } ]
) ]]
[[ } ]]-
@@ -42,9 +42,9 @@
<div>
[[ if($d{vn}{image} > 0) { ]]
[[ if($d{vn}{img_nsfw} && !$p{AuthNsfw}) { ]]
- <img src="[[: $p{st} ]]/cv/nsfw.png" id="nsfw" class="[[: $p{st} ]]/cv/[[= sprintf '%02d/%d', $d{vn}{image}%50, $d{vn}{image} ]].jpg" />
+ <img src="[[: $p{st} ]]/cv/nsfw.png" id="nsfw" class="[[: $p{st} ]]/cv/[[= sprintf '%02d/%d', $d{vn}{image}%100, $d{vn}{image} ]].jpg" />
[[ } else { ]]
- <img src="[[: $p{st} ]]/cv/[[= sprintf '%02d/%d', $d{vn}{image}%50, $d{vn}{image} ]].jpg" alt="[[: $p{PageTitle} ]]" />
+ <img src="[[: $p{st} ]]/cv/[[= sprintf '%02d/%d', $d{vn}{image}%100, $d{vn}{image} ]].jpg" alt="[[: $p{PageTitle} ]]" />
[[ } ]]
[[ } elsif($d{vn}{image} < 0) { ]]-
[processing image, please return in a few minutes]
diff --git a/data/tpl/vnpage_rg b/data/tpl/vnpage_rg
index d988e226..2a14a4df 100644
--- a/data/tpl/vnpage_rg
+++ b/data/tpl/vnpage_rg
@@ -6,6 +6,6 @@
[[ } else { ]]
[[= $d{vn}{rmap} ]]
<p id="relations">
- <img src="[[= sprintf "%s/rg/%02d/%d.gif", $p{st}, $d{vn}{rgraph}%50, $d{vn}{rgraph} ]]" usemap="#rgraph" />
+ <img src="[[= sprintf "%s/rg/%02d/%d.gif", $p{st}, $d{vn}{rgraph}%100, $d{vn}{rgraph} ]]" usemap="#rgraph" />
</p>
[[ } ]]
diff --git a/util/updates/update_1.14.pl b/util/updates/update_1.14.pl
index af9840c5..cd45b0fa 100644
--- a/util/updates/update_1.14.pl
+++ b/util/updates/update_1.14.pl
@@ -10,6 +10,7 @@ use DBI;
# /static has been created
# /www/files has already been moved
chdir '/www/vndb';
+require 'lib/global.pl';
# run the usual SQL update script
@@ -24,7 +25,7 @@ mkdir 'static/cv';
mkdir 'static/rg';
chmod 0755, qw|data/rg static/cv static/rg|;
-for (0..49) {
+for (0..99) {
$_ = sprintf "%02d",$_;
mkdir "data/rg/$_";
mkdir "static/rg/$_";
@@ -50,7 +51,7 @@ for (@{$q->fetchall_arrayref([])}) {
my($id) = $q->fetchrow_array();
rename
sprintf('www/img/%s/%s.jpg', substr($_->[0],0,1), $_->[0]),
- sprintf('static/cv/%02d/%d.jpg', $id%50, $id);
+ sprintf('static/cv/%02d/%d.jpg', $id%100, $id);
$sql->do('UPDATE vn_rev SET image_id = ? WHERE image = DECODE(\''.$_->[0].'\', \'hex\')', undef, $id);
}
$sql->do('ALTER TABLE vn_rev DROP COLUMN image');