summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2008-11-21 16:29:30 +0100
committerYorhel <git@yorhel.nl>2008-11-21 16:29:30 +0100
commitea24234078946e5e0614056b4ce7f94a3b84974d (patch)
tree9926b6e45766f713e7b354e878829812b1b8fe87 /lib
parent3088f3f65241df4f58894f9938e346a57a60720b (diff)
Redirects for old URIs
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog3
-rw-r--r--lib/VNDB/Handler/Misc.pm9
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index d481c2c3..ce2268e5 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -20,6 +20,7 @@ TODO:
- URL changes:
- /p doesn't work anymore, use /p/all
- Revert URL changed from /x99/edit?rev=1 to /x99.1/edit
+ - /v+/stats and /v+/scr moved into /v+
- Functionality changes:
- Ability to sort the userlist on vote and change counts
- Added threads and posts counts to the global statistics
@@ -28,6 +29,8 @@ TODO:
- Automated edits filter to history browser
- Number of threads is shown in the discussion tab for each item
- Boardmods can edit threads without updating the last edited field
+ - No more RSS feeds for changes (will be replaced with a notification
+ system in the future)
1.23 - 2008-10-22 (r117)
- Removed redirects for old revision URLs (the code wasn't very secure...)
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm
index 230f12ca..fe81a1f0 100644
--- a/lib/VNDB/Handler/Misc.pm
+++ b/lib/VNDB/Handler/Misc.pm
@@ -12,6 +12,15 @@ YAWF::register(
qr{}, \&homepage,
qr{(?:([upvr])([1-9]\d*)/)?hist}, \&history,
qr{nospam}, \&nospam,
+
+ # redirects for old URLs
+ qr{(.*[^/]+)/+}, sub { $_[0]->resRedirect("/$_[1]", 'perm') },
+ qr{u/list}, sub { $_[0]->resRedirect('/u/list/all', 'perm') },
+ qr{p}, sub { $_[0]->resRedirect('/p/all', 'perm') },
+ qr{notes}, sub { $_[0]->resRedirect('/d8', 'perm') },
+ qr{faq}, sub { $_[0]->resRedirect('/d6', 'perm') },
+ qr{v([1-9]\d*)/(?:stats|scr|votes)},
+ sub { $_[0]->resRedirect("/v$_[1]", 'perm') },
);