Tatsuki SUGIURA
sugi****@users*****
2006年 7月 12日 (水) 20:41:47 JST
Index: slashjp/plugins/Email/Email.pm diff -u slashjp/plugins/Email/Email.pm:1.2 slashjp/plugins/Email/Email.pm:1.3 --- slashjp/plugins/Email/Email.pm:1.2 Fri Dec 24 05:13:35 2004 +++ slashjp/plugins/Email/Email.pm Wed Jul 12 20:41:47 2006 @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. -# Copyright 1997-2004 by Open Source Development Network. See README +# Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: Email.pm,v 1.2 2004/12/23 20:13:35 oliver Exp $ +# $Id: Email.pm,v 1.3 2006/07/12 11:41:47 sugi Exp $ package Slash::Email; @@ -15,7 +15,7 @@ use Slash::Utility; -($VERSION) = ' $Revision: 1.2 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.3 $ ' =~ /\$Revision:\s+([^\s]+)/; ######################################################## Index: slashjp/plugins/Email/PLUGIN diff -u slashjp/plugins/Email/PLUGIN:1.2 slashjp/plugins/Email/PLUGIN:1.3 --- slashjp/plugins/Email/PLUGIN:1.2 Fri Dec 24 05:13:35 2004 +++ slashjp/plugins/Email/PLUGIN Wed Jul 12 20:41:47 2006 @@ -1,4 +1,4 @@ -# $Id: PLUGIN,v 1.2 2004/12/23 20:13:35 oliver Exp $ +# $Id: PLUGIN,v 1.3 2006/07/12 11:41:47 sugi Exp $ name=Email description="Allows users to email text versions of articles to someone else." Index: slashjp/plugins/Email/email.pl diff -u slashjp/plugins/Email/email.pl:1.3 slashjp/plugins/Email/email.pl:1.4 --- slashjp/plugins/Email/email.pl:1.3 Fri Dec 31 21:35:53 2004 +++ slashjp/plugins/Email/email.pl Wed Jul 12 20:41:47 2006 @@ -1,13 +1,13 @@ #!/usr/bin/perl -w # This code is a part of Slash, and is released under the GPL. -# Copyright 1997-2004 by Open Source Development Network. See README +# Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: email.pl,v 1.3 2004/12/31 12:35:53 oliver Exp $ +# $Id: email.pl,v 1.4 2006/07/12 11:41:47 sugi Exp $ # Slash::Email - web script # # Email a Slash site story to a friend! -# (c) OSDN 2002 +# (c) OSTG 2002 use strict; use Slash 2.003; # require Slash 2.3.x @@ -16,7 +16,7 @@ use Slash::Constants ':messages'; use vars qw($VERSION); -($VERSION) = ' $Revision: 1.3 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.4 $ ' =~ /\$Revision:\s+([^\s]+)/; # this is an example main(). feel free to use what you think @@ -30,8 +30,8 @@ my $gSkin = getCurrentSkin(); # Primary fields. - my $sid = $form->{sid}; - my $email = $form->{email}; + my $sid = $form->{sid} || ''; + my $email = $form->{email} || ''; # Use for ops where anonymous access is optional. my $allow_anon = @@ -177,17 +177,10 @@ return; } - for (qw(ipid subnetid uid)) { - # We skip the UID test for anonymous users. - next if $_ eq 'uid' && $user->{is_anon}; - # Otherwise we perform the specific read-only test. - my $read_only = $slashdb->checkReadOnly('nopost', { - $_ => $user->{$_}, - }); - if ($read_only) { - print getData('readonly'); - return; - } + # XXXSRCID might want to do this on a reader db + if ($slashdb->checkAL2($user->{srcids}, 'nopost')) { + print getData('readonly'); + return; } # Retrieve story and all information necessary for proper display. @@ -280,8 +273,8 @@ sub removeOptout { my($slashdb, $constants, $user, $form, $gSkin, $Plugins) = @_; - my $email = decode_entities($form->{email}); - my $rc = $Plugins->{Email}->removeFromOptoutList($form->{email}); + my $email = decode_entities($form->{email} || ''); + my $rc = $Plugins->{Email}->removeFromOptoutList($form->{email} || ''); print getData('optout_removed', { result => $rc }); removeOptoutForm(@_); Index: slashjp/plugins/Email/mysql_dump diff -u slashjp/plugins/Email/mysql_dump:1.3 slashjp/plugins/Email/mysql_dump:1.4 --- slashjp/plugins/Email/mysql_dump:1.3 Fri Dec 31 21:35:53 2004 +++ slashjp/plugins/Email/mysql_dump Wed Jul 12 20:41:47 2006 @@ -1,5 +1,5 @@ # -# $Id: mysql_dump,v 1.3 2004/12/31 12:35:53 oliver Exp $ +# $Id: mysql_dump,v 1.4 2006/07/12 11:41:47 sugi Exp $ # INSERT INTO menus (menu, label, value, seclev, menuorder) VALUES ('admin', 'Email Opt-out List', '[% gSkin.rootdir %]/email.pl?op=optoutrem_form', 5000, 200); Index: slashjp/plugins/Email/mysql_schema diff -u slashjp/plugins/Email/mysql_schema:1.3 slashjp/plugins/Email/mysql_schema:1.4 --- slashjp/plugins/Email/mysql_schema:1.3 Fri Dec 31 21:35:53 2004 +++ slashjp/plugins/Email/mysql_schema Wed Jul 12 20:41:47 2006 @@ -1,5 +1,5 @@ # -# $Id: mysql_schema,v 1.3 2004/12/31 12:35:53 oliver Exp $ +# $Id: mysql_schema,v 1.4 2006/07/12 11:41:47 sugi Exp $ # DROP TABLE IF EXISTS email_optout;