svnno****@sourc*****
svnno****@sourc*****
2008年 10月 8日 (水) 19:55:21 JST
Revision: 786 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=786 Author: tach Date: 2008-10-08 19:55:21 +0900 (Wed, 08 Oct 2008) Log Message: ----------- Add to redirect when nickname is not found but matchname is found Modified Paths: -------------- slashjp/branches/2.5.0.192/Slash/Apache/User/User.pm slashjp/branches/2.5.0.192/debian/changelog -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/Slash/Apache/User/User.pm =================================================================== --- slashjp/branches/2.5.0.192/Slash/Apache/User/User.pm 2008-10-08 06:42:34 UTC (rev 785) +++ slashjp/branches/2.5.0.192/Slash/Apache/User/User.pm 2008-10-08 10:55:21 UTC (rev 786) @@ -793,6 +793,16 @@ my $reader_user = $slashdb->getDB('reader'); my $reader = getObject('Slash::DB', { virtual_user => $reader_user }); my $uid = $reader->getUserUID($nick); + unless ($uid) { + my $matchname = nick2matchname($nick); + $nick = $reader->sqlSelect('nickname', 'users', "matchname='$matchname'"); + if ($nick) { + $nick = fixparam($nick); + $string =~ s!^[^/]+!!; + $query = "?$query" if ($query); + redirect($constants->{real_rootdir} . "/~$nick$string$query"); + } + } my $nick_orig = $nick; $nick = fixparam($nick); # make safe to pass back to script Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-10-08 06:42:34 UTC (rev 785) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-10-08 10:55:21 UTC (rev 786) @@ -4,8 +4,9 @@ - Change white-space to "%20" instead of "+" on fixparam() - Change "%20" to white-space on userdir_handler() - Not to change "+" to white-space on userdir_handler() + - Add to redirect when nickname is not found but matchname is found - -- Taku YASUI <tach****@osdn*****> Wed, 8 Oct 2008 06:38:49 +0000 + -- Taku YASUI <tach****@osdn*****> Wed, 8 Oct 2008 10:53:49 +0000 slash (2.5.0.192-20) unstable; urgency=low