summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-04-26 12:39:53 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-04-26 12:39:53 +0000
commita479c250b2e2cba340a2f52b68dea26e9730df43 (patch)
tree80534e20fdb0f7af059c7f171a6f1087453a35f9
parent88853c1168a333c7c7b7951b2931852e6df7da55 (diff)
Changed the 50 dirs for static content to 100, and a version bump
git-svn-id: svn://vndb.org/vndb@6 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
-rw-r--r--lib/ChangeLog4
-rw-r--r--lib/Multi/Image.pm2
-rw-r--r--lib/Multi/RG.pm4
-rw-r--r--lib/VNDB/Util/DB.pm10
-rw-r--r--lib/VNDB/VN.pm4
5 files changed, 8 insertions, 16 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 37c1eb3b..2568880b 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -4,8 +4,10 @@ TODO:
+ Add a 'change' when hiding/unhiding an item
+ Remove all references to an item when it's hidden
(preferably with the option to re-add them when unhiding)
+ + Add a link for the hidden 'h' option at /hist
+ + The delete option should be removed
-1.14 - ?
+1.14 - 2008-04-26
- Removed the ID gap prevention method
- Moved static content to static.vndb.org (and rely on lighty for js/css
compression)
diff --git a/lib/Multi/Image.pm b/lib/Multi/Image.pm
index f9ccd83e..078174a1 100644
--- a/lib/Multi/Image.pm
+++ b/lib/Multi/Image.pm
@@ -56,7 +56,7 @@ sub cmd_coverimage {
sub format { # imgid
$_[HEAP]{imgid} = $_[ARG0];
- $_[HEAP]{img} = sprintf '%s/%02d/%d.jpg', $_[HEAP]{imgpath}, $_[ARG0]%50, $_[ARG0];
+ $_[HEAP]{img} = sprintf '%s/%02d/%d.jpg', $_[HEAP]{imgpath}, $_[ARG0]%100, $_[ARG0];
$_[KERNEL]->call(core => log => 3, 'Processing image %d', $_[HEAP]{imgid});
$_[HEAP]{im} = Image::Magick->new;
diff --git a/lib/Multi/RG.pm b/lib/Multi/RG.pm
index bf0ad9f6..4931ef96 100644
--- a/lib/Multi/RG.pm
+++ b/lib/Multi/RG.pm
@@ -198,8 +198,8 @@ sub buildgraph {
my $gid = $Multi::SQL->prepare("SELECT nextval('relgraph_seq')");
$gid->execute;
$gid = $gid->fetchrow_arrayref->[0];
- my $gif = sprintf '%s/%02d/%d.gif', $_[HEAP]{imgdir}, $gid % 50, $gid;
- my $cmap = sprintf '%s/%02d/%d.cmap', $_[HEAP]{datdir}, $gid % 50, $gid;
+ my $gif = sprintf '%s/%02d/%d.gif', $_[HEAP]{imgdir}, $gid % 100, $gid;
+ my $cmap = sprintf '%s/%02d/%d.cmap', $_[HEAP]{datdir}, $gid % 100, $gid;
# generate the graph
$_[HEAP]{gv}->as_gif($gif);
diff --git a/lib/VNDB/Util/DB.pm b/lib/VNDB/Util/DB.pm
index 408a1b86..3f99aff8 100644
--- a/lib/VNDB/Util/DB.pm
+++ b/lib/VNDB/Util/DB.pm
@@ -233,16 +233,6 @@ sub DBLockItem { # table, id, locked
}
-sub DBHideItem { # table, id, hidden
- my($s, $tbl, $id, $h) = @_;
- $s->DBExec(q|
- UPDATE %s
- SET hidden = %d
- WHERE id = %d|,
- $tbl, $h, $id);
-}
-
-
sub DBIncId { # sequence (this is a rather low-level function... aww heck...)
return $_[0]->DBRow(q|SELECT nextval(!s) AS ni|, $_[1])->{ni};
}
diff --git a/lib/VNDB/VN.pm b/lib/VNDB/VN.pm
index 69d4e490..ea13445b 100644
--- a/lib/VNDB/VN.pm
+++ b/lib/VNDB/VN.pm
@@ -34,7 +34,7 @@ sub VNPage {
$v->{next} = $self->DBGetHist(type => 'v', id => $id, next => $v->{cid}, showhid => 1)->[0]{id} if $r->{rev};
if($page eq 'rg' && $v->{rgraph}) {
- open(my $F, '<:utf8', sprintf '%s/%02d/%d.cmap', $self->{mappath}, $v->{rgraph}%50, $v->{rgraph}) || die $!;
+ open(my $F, '<:utf8', sprintf '%s/%02d/%d.cmap', $self->{mappath}, $v->{rgraph}%100, $v->{rgraph}) || die $!;
$v->{rmap} = join('', (<$F>));
close($F);
}
@@ -121,7 +121,7 @@ sub VNEdit {
unlink $tmp;
} else {
$imgid = $self->DBIncId('covers_seq');
- my $new = sprintf '%s/%02d/%d.jpg', $self->{imgpath}, $imgid%50, $imgid;
+ my $new = sprintf '%s/%02d/%d.jpg', $self->{imgpath}, $imgid%100, $imgid;
rename $tmp, $new or die $!;
chmod 0666, $new;
$self->RunCmd(sprintf 'coverimage %d', $imgid);