svnno****@sourc*****
svnno****@sourc*****
2007年 11月 19日 (月) 15:57:55 JST
Revision: 258 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=258 Author: tach Date: 2007-11-19 15:57:53 +0900 (Mon, 19 Nov 2007) Log Message: ----------- merge from upstream T_2_5_0_184 Modified Paths: -------------- slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm slashjp/branches/upstream/current/plugins/Admin/admin.pl slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm slashjp/branches/upstream/current/plugins/FireHose/firehose.css slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default slashjp/branches/upstream/current/plugins/Tags/Clout/Vote.pm slashjp/branches/upstream/current/sql/mysql/defaults.sql slashjp/branches/upstream/current/sql/mysql/upgrades slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm slashjp/branches/upstream/current/tagboxes/FHEditorPop/FHEditorPop.pm slashjp/branches/upstream/current/tagboxes/FireHoseScores/FireHoseScores.pm slashjp/branches/upstream/current/themes/slashcode/htdocs/users.pl slashjp/branches/upstream/current/themes/slashcode/sql/mysql/datadump.sql slashjp/branches/upstream/current/themes/slashcode/tasks/freshenup.pl slashjp/branches/upstream/current/themes/slashcode/templates/editComm;users;default -------------- next part -------------- Modified: slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm =================================================================== --- slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/Slash/DB/MySQL/MySQL.pm 2007-11-19 06:57:53 UTC (rev 258) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: MySQL.pm,v 1.993 2007/11/07 23:15:22 jamiemccarthy Exp $ +# $Id: MySQL.pm,v 1.996 2007/11/13 23:50:31 jamiemccarthy Exp $ package Slash::DB::MySQL; use strict; @@ -20,7 +20,7 @@ use base 'Slash::DB::Utility'; use Slash::Constants ':messages'; -($VERSION) = ' $Revision: 1.993 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.996 $ ' =~ /\$Revision:\s+([^\s]+)/; # Fry: How can I live my life if I can't tell good from evil? @@ -5044,6 +5044,28 @@ } # end closure { # closure +my $_al2_type_aliases = undef; +sub _load_al2_type_aliases { + my($self) = @_; + my $alias_text = getCurrentStatic('al2_type_aliases') || ''; + $_al2_type_aliases = { }; + return if !$alias_text; + my @aliases = grep { $_ } split /\s+/, $alias_text; + for my $alias (@aliases) { + my($src, $implied) = $alias =~ /^(\w+)->(\w+)$/; + $_al2_type_aliases->{$src} = $implied if $src && $implied; + } +} +sub getAL2TypeAliases { + my($self) = @_; + $self->_load_al2_type_aliases if !defined($_al2_type_aliases); + # Return a copy of the cache, just in case anyone munges it up. + my $aliases = {( %$_al2_type_aliases )}; + return $aliases; +} +} # end closure + +{ # closure my %_al2_types_by_id = ( ); sub getAL2TypeById { my($self, $al2tid) = @_; @@ -5227,11 +5249,8 @@ } # XXXSRCID Try to use memcached to retrieve this data. -#use Data::Dumper; $Data::Dumper::Sortkeys = 1; -#print STDERR "getAL2 srcids: " . Dumper($srcids); my($where) = $self->_get_where_and_valuelist_al2($srcids); my $values = $self->sqlSelectColArrayref('value', 'al2', $where); -#print STDERR "getAL2 where: '$where' values: " . Dumper($values); # The al2.value column ORs together for all the AL2 rows that # apply for a user. E.g. if the subnet has 'nopost' set, the @@ -5251,9 +5270,18 @@ ) { $retval->{$name} = $al2types->{$name}; } -#print STDERR "getAL2 name=$name bv=$bitvector bp=$al2types->{$name}{bitpos}\n"; } -#if ($retval && keys %$retval) { print STDERR "getAL2 retval keys: '" . join(" ", sort keys %$retval) . "'\n"; } + + # If there are any al2 type aliases, return dummy hashref fields + # for them too. + my $aliases = $self->getAL2TypeAliases(); + for my $src (keys %$aliases) { + if ($retval->{$src}) { + my $implied = $aliases->{$src}; + $retval->{$implied} = { implied_by => $src }; + } + } + return $retval; } @@ -5267,8 +5295,6 @@ if (!ref($srcid)) { $srcid = { get_srcid_type($srcid) => $srcid }; } -#use Data::Dumper; $Data::Dumper::Sortkeys = 1; -#print STDERR "getAL2Log srcid: " . Dumper($srcid); my($where) = $self->_get_where_and_valuelist_al2($srcid); # Do the main select on al2_log to pull in all the changes made @@ -6610,7 +6636,7 @@ } } else { $is_future_column = '0 AS is_future'; - $where = "$column_name < $now"; + $where = "$column_name <= $now"; } return ($is_future_column, $where); Modified: slashjp/branches/upstream/current/plugins/Admin/admin.pl =================================================================== --- slashjp/branches/upstream/current/plugins/Admin/admin.pl 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/plugins/Admin/admin.pl 2007-11-19 06:57:53 UTC (rev 258) @@ -2,14 +2,14 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: admin.pl,v 1.326 2007/11/08 08:54:00 pudge Exp $ +# $Id: admin.pl,v 1.327 2007/11/13 17:25:04 jamiemccarthy Exp $ use strict; use File::Temp 'tempfile'; use Image::Size; use Time::HiRes; use LWP::UserAgent; -use URI::URL; +use URI; use XML::Simple; use Slash; @@ -1449,7 +1449,7 @@ my $yoogli_similar_stories = {}; if ($constants->{yoogli_oai_search}) { my $query = $constants->{yoogli_oai_query_base} .= '?verb=GetRecord&metadataPrefix=oai_dc&rescount='; - $query .= $constants->{yoogli_oai_result_count} . '&identifier=' . URI::URL->new($storyref->{introtext}); + $query .= $constants->{yoogli_oai_result_count} . '&identifier=' . URI->new($storyref->{introtext}); my $ua = new LWP::UserAgent; $ua->timeout($constants->{yoogli_oai_result_count} + 2); Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/ajax.pl 2007-11-19 06:57:53 UTC (rev 258) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: ajax.pl,v 1.61 2007/11/08 08:53:55 pudge Exp $ +# $Id: ajax.pl,v 1.62 2007/11/12 15:27:41 entweichen Exp $ use strict; use warnings; @@ -14,7 +14,7 @@ use Slash::Utility; use vars qw($VERSION); -($VERSION) = ' $Revision: 1.61 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.62 $ ' =~ /\$Revision:\s+([^\s]+)/; ################################################################## sub main { @@ -518,6 +518,11 @@ delete $bvmessagecodes->{$bvmessagecode}; last; } + # build our list of valid delivery modes + if (($bvdeliverymodes->{$bvdeliverymode}->{'bitvalue'} & $bvmessagecodes->{$bvmessagecode}->{'delivery_bvalue'}) || + ($bvdeliverymodes->{$bvdeliverymode}->{'bitvalue'} == 0)) { + push(@{$bvmessagecodes->{$bvmessagecode}->{'valid_bvdeliverymodes'}}, $bvdeliverymodes->{$bvdeliverymode}->{'code'}); + } } } Modified: slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/plugins/Ajax/htdocs/images/common.js 2007-11-19 06:57:53 UTC (rev 258) @@ -1,5 +1,5 @@ // _*_ Mode: JavaScript; tab-width: 8; indent-tabs-mode: true _*_ -// $Id: common.js,v 1.149 2007/10/31 19:55:14 entweichen Exp $ +// $Id: common.js,v 1.150 2007/11/14 14:47:19 scc Exp $ var fh_play = 0; var fh_is_timed_out = 0; @@ -18,6 +18,7 @@ var firehose_removed_first = '0'; var firehose_future; var firehose_removals; +var firehose_is_embedded = 0; var fh_colorslider; var fh_ticksize; var fh_pageval = 0; @@ -1078,6 +1079,9 @@ params['duration'] = firehose_duration; params['issue'] = firehose_issue; params['page'] = page; + if ( firehose_is_embedded ) { + params['embed'] = 1; + } params['fh_pageval'] = fh_pageval; $('busy').className = ""; ajax_update(params, '', handlers); Modified: slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default =================================================================== --- slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/plugins/Ajax/templates/prefs_d2;ajax;default 2007-11-19 06:57:53 UTC (rev 258) @@ -31,15 +31,13 @@ [% IF user.discussion2 && user.discussion2 == "slashdot" %] <blockquote> <div> - How Many Comments - [% comment_q_name = (user.is_subscriber || user.is_admin) ? 'd2_comment_q_all' : 'd2_comment_q'; + Retrieve [% comment_q_name = (user.is_subscriber || user.is_admin) ? 'd2_comment_q_all' : 'd2_comment_q'; comment_q = Slash.db.getDescriptions(comment_q_name); - Slash.createSelect('d2_comment_q', comment_q, user.d2_comment_q, 1) %]<br> + Slash.createSelect('d2_comment_q', comment_q, user.d2_comment_q, 1) %] Comments<br> - Comment Retrieval Order - [% comment_order = Slash.db.getDescriptions('d2_comment_order'); + Get [% comment_order = Slash.db.getDescriptions('d2_comment_order'); comment_order_def = user.d2_comment_order || 0; # score - Slash.createSelect('d2_comment_order', comment_order, comment_order_def, 1) %] + Slash.createSelect('d2_comment_order', comment_order, comment_order_def, 1) %] Comments First </div> </blockquote> [% END %] @@ -91,4 +89,4 @@ __seclev__ 500 __version__ -$Id: prefs_d2;ajax;default,v 1.7 2007/11/05 19:37:55 entweichen Exp $ +$Id: prefs_d2;ajax;default,v 1.8 2007/11/13 19:46:21 entweichen Exp $ Modified: slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/plugins/FireHose/FireHose.pm 2007-11-19 06:57:53 UTC (rev 258) @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: FireHose.pm,v 1.182 2007/11/01 20:42:19 tvroom Exp $ +# $Id: FireHose.pm,v 1.183 2007/11/13 17:25:04 jamiemccarthy Exp $ package Slash::FireHose; @@ -35,14 +35,14 @@ use Date::Calc qw(Days_in_Month Add_Delta_YMD); use POSIX qw(ceil); use LWP::UserAgent; -use URI::URL; +use URI; use XML::Simple; use base 'Slash::DB::Utility'; use base 'Slash::DB::MySQL'; use vars qw($VERSION); -($VERSION) = ' $Revision: 1.182 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.183 $ ' =~ /\$Revision:\s+([^\s]+)/; sub createFireHose { my($self, $data) = @_; $data->{dept} ||= ""; @@ -761,6 +761,38 @@ } } +sub getURLsForItem { + my($self, $item) = @_; + my $url_id = $item->{url_id}; + my $url = $url_id ? $self->getUrl($url_id)->{url} : undef; + my $url_prepend = $url ? qq{<a href="$url">$url</a>} : ''; + my $text = qq{$url_prepend $item->introtext $item->{bodytext}}; + + my %urls = ( ); + my $tokens = HTML::TokeParser->new(\$text); + return ( ) unless $tokens; + while (my $token = $tokens->get_tag('a')) { + my $linkurl = $token->[1]{href}; + next unless $linkurl; + my $canon = URI->new($linkurl)->canonical()->as_string(); + $urls{$canon} = 1; + } + return sort keys %urls; +} + +sub itemHasSpamURL { + my($self, $item) = @_; + my @spamurlregexes = grep { $_ } split /\s+/, ($self->getBlock('spamurlregexes') || ''); + return 0 unless @spamurlregexes; + my @urls = $self->getURLsForItem($item); + for my $url (@urls) { + for my $regex (@spamurlregexes) { + return 1 if $url =~ $regex; + } + } + return 0; +} + sub getPrimaryFireHoseItemByUrl { my($self, $url_id) = @_; my $ret_val = 0; @@ -1566,7 +1598,7 @@ return 0 unless $user->{is_admin} && $constants->{yoogli_oai_query_base} && $constants->{yoogli_oai_result_count}; my $query = $constants->{yoogli_oai_query_base} .= '?verb=GetRecord&metadataPrefix=oai_dc&rescount='; - $query .= $constants->{yoogli_oai_result_count} . '&identifier=' . URI::URL->new($item->{introtext}); + $query .= $constants->{yoogli_oai_result_count} . '&identifier=' . URI->new($item->{introtext}); my $yoogli_similar_stories = {}; my $ua = new LWP::UserAgent; @@ -2409,4 +2441,4 @@ =head1 VERSION -$Id: FireHose.pm,v 1.182 2007/11/01 20:42:19 tvroom Exp $ +$Id: FireHose.pm,v 1.183 2007/11/13 17:25:04 jamiemccarthy Exp $ Modified: slashjp/branches/upstream/current/plugins/FireHose/firehose.css =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/firehose.css 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/plugins/FireHose/firehose.css 2007-11-19 06:57:53 UTC (rev 258) @@ -434,6 +434,10 @@ #nixmenu ul {margin: 0 0 0 43px; background: #222; opacity: .9; border: 1px solid #111;} #nodmenu li:hover, #nixmenu li:hover, #nodmenu li.selected, #nixmenu li.selected {background: #000; color: #fff;} +.embed #nodmenu .menu, #console #nodmenu .menu {left: 20px !important; background: url('//images.slashdot.org/popup_nix.png') no-repeat;} +.embed #nixmenu .menu, #console #nixmenu .menu {left: 25px !important;} +.embed #nodmenu ul, #console #nodmenu ul {margin: 0 0 0 43px; background: #222; opacity: .9; border: 1px solid #111;} + .article .title, .article h3, .article .generaltitle {border: none !important} .article .generaltitle, #firehoselist .article .title, .article h3 {line-height: 170% !important;} .briefarticle .generaltitle, .briefarticle .title, .briefarticle h3 {line-height: 160% !important;} Modified: slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default =================================================================== --- slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/plugins/FireHose/templates/list;firehose;default 2007-11-19 06:57:53 UTC (rev 258) @@ -175,6 +175,9 @@ } var fh_view_mode = '[% options.mode %]'; var page = '[% page %]'; + [% IF form.embed %] + firehose_is_embedded = 1; // defined in common.js + [% END %] fh_is_admin = [% IF user.is_admin && !user.firehose_usermode %]1[% ELSE %]0[% END %]; var updateIntervalType = [% IF user.is_admin && !user.firehose_usermode %]1[% ELSE %]2[% END %]; var inactivity_timeout = [% IF user.is_admin && !user.firehose_usermode %]10800[% ELSE %]3600[% END %]; @@ -196,4 +199,4 @@ </script> __version__ -$Id: list;firehose;default,v 1.104 2007/10/24 00:30:08 scc Exp $ +$Id: list;firehose;default,v 1.105 2007/11/14 14:47:19 scc Exp $ Modified: slashjp/branches/upstream/current/plugins/Tags/Clout/Vote.pm =================================================================== --- slashjp/branches/upstream/current/plugins/Tags/Clout/Vote.pm 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/plugins/Tags/Clout/Vote.pm 2007-11-19 06:57:53 UTC (rev 258) @@ -7,7 +7,7 @@ use vars qw($VERSION); -($VERSION) = ' $Revision: 1.4 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.5 $ ' =~ /\$Revision:\s+([^\s]+)/; sub init { my($self) = @_; @@ -297,7 +297,7 @@ # rare choice (for either user) is considered more indicative. my($su, $nu) = ($hr->{sourcetag_uid}, $hr->{newtag_uid}); my($stn, $ntn) = ($hr->{sourcetag_tagnameid}, $hr->{newtag_tagnameid}); - my($nodid, $nixid) = ($stn == $self->{nodid}, $stn == $self->{nixid}); + my($nodid, $nixid) = ($self->{nodid}, $self->{nixid}); if ( ( $stn == $nodid || $stn == $nixid ) && ( $ntn == $nodid || $ntn == $nixid ) ) { my($su, $nu) = ($hr->{sourcetag_uid}, $hr->{newtag_uid}); Modified: slashjp/branches/upstream/current/sql/mysql/defaults.sql =================================================================== --- slashjp/branches/upstream/current/sql/mysql/defaults.sql 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/sql/mysql/defaults.sql 2007-11-19 06:57:53 UTC (rev 258) @@ -3,7 +3,7 @@ #-------------------------------------------------------- # Server version 3.23.26-beta-log # -# $Id: defaults.sql,v 1.377 2007/11/08 08:57:13 pudge Exp $ +# $Id: defaults.sql,v 1.379 2007/11/14 18:04:23 pudge Exp $ # # @@ -25,7 +25,7 @@ INSERT INTO al2_types VALUES (8, 6, 'trusted', 'Trusted'); INSERT INTO al2_types VALUES (9, 7, 'proxy', 'Valid Proxy'); INSERT INTO al2_types VALUES (10, 8, 'nopostanon', 'No Comment Post Anon'); -INSERT INTO al2_types VALUES (11, 9, 'binspam', 'Binspammer'); +INSERT INTO al2_types VALUES (11, 9, 'spammer', 'Spammer'); # @@ -746,6 +746,7 @@ INSERT INTO vars (name, value, description) VALUES ('adminmail_check_replication', 0, 'Check replication if is caught up before starting adminmail'); INSERT INTO vars (name, value, description) VALUES ('adminmail_mod','admin****@examp*****','All admin mail about moderation goes here'); INSERT INTO vars (name, value, description) VALUES ('adminmail_post','admin****@examp*****','All admin mail about comment posting goes here'); +INSERT IGNORE INTO vars (name, value, description) VALUES ('al2_type_aliases', 'spammer->nosubmit spammer->nopost nopost->nopostanon', 'List of AL2s that imply other AL2s, in a whitespace-delimited list of A->B format'); INSERT INTO vars (name, value, description) VALUES ('allow_anonymous','1','allow anonymous posters'); INSERT INTO vars (name, value, description) VALUES ('allow_nonadmin_ssl','0','0=users with seclev <= 1 cannot access the site over Secure HTTP; 1=they all can; 2=only if they are subscribers'); INSERT INTO vars (name, value, description) VALUES ('anonymous_coward_uid', '1', 'UID to use for anonymous coward'); @@ -831,7 +832,7 @@ INSERT INTO vars (name, value, description) VALUES ('cur_performance_stats_lastid', '0', 'accesslogid to start searching at'); INSERT INTO vars (name, value, description) VALUES ('cur_performance_stats_weeks', '8', 'number of weeks back to compare current stats to'); INSERT INTO vars (name, value, description) VALUES ('currentqid',1,'The Current Question on the homepage pollbooth'); -INSERT INTO vars (name, value, description) VALUES ('cvs_tag_currentcode','T_2_5_0_183','The current cvs tag that the code was updated to - this does not affect site behavior but may be useful for your records'); +INSERT INTO vars (name, value, description) VALUES ('cvs_tag_currentcode','T_2_5_0_184','The current cvs tag that the code was updated to - this does not affect site behavior but may be useful for your records'); INSERT INTO vars (name, value, description) VALUES ('datadir','/usr/local/slash/www.example.com','What is the root of the install for Slash'); INSERT INTO vars (name, value, description) VALUES ('db_auto_increment_increment','1','If your master DB uses auto_increment_increment, i.e. multiple master replication, echo its value into this var'); INSERT INTO vars (name, value, description) VALUES ('dbsparklines_disp','0','Display dbsparklines in the currentAdminUsers box?'); Modified: slashjp/branches/upstream/current/sql/mysql/upgrades =================================================================== --- slashjp/branches/upstream/current/sql/mysql/upgrades 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/sql/mysql/upgrades 2007-11-19 06:57:53 UTC (rev 258) @@ -10,7 +10,7 @@ # after X started at the same time that X was tagged. # -# $Id: upgrades,v 1.1274 2007/11/09 03:48:26 pudge Exp $ +# $Id: upgrades,v 1.1279 2007/11/14 18:49:17 jamiemccarthy Exp $ # # BEGIN tf23's additions @@ -5000,8 +5000,6 @@ # 2007-11-01 UPDATE vars SET value = 'T_2_5_0_182' WHERE name = 'cvs_tag_currentcode'; -# SLASHDOT LAST UPDATED HERE - # for plugins/Falk ALTER TABLE ad_settings ADD COLUMN always TINYINT UNSIGNED NOT NULL DEFAULT 0; @@ -5038,3 +5036,19 @@ # 2007-11-08 UPDATE vars SET value = 'T_2_5_0_183' WHERE name = 'cvs_tag_currentcode'; +# SLASHDOT LAST UPDATED HERE + +INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('spamurlregexes','',100,'static','Whitespace-delimited list of regexes which indicate a spammer URL.','mainpage',5,'Spam URL Regexes',0,NULL,NULL,0); +INSERT IGNORE INTO vars (name, value, description) VALUES ('al2_type_aliases', 'spammer->nosubmit spammer->nopost nopost->nopostanon', 'List of AL2s that imply other AL2s, in a whitespace-delimited list of A->B format'); + +UPDATE code_param SET name = 'Few' WHERE type = 'd2_comment_q' AND name = 'Tiny'; +UPDATE code_param SET name = 'More' WHERE type = 'd2_comment_q' AND name = 'Medium'; +UPDATE code_param SET name = 'Many' WHERE type = 'd2_comment_q' AND name = 'Large'; +UPDATE code_param SET name = 'Oldest' WHERE type = 'd2_comment_order' AND name = 'Date'; +UPDATE code_param SET name = 'Highest Rated' WHERE type = 'd2_comment_order' AND name = 'Score'; + +UPDATE al2_types SET name='spammer',title='Binspammer' WHERE name='binspam'; + +# 2007-11-14 +UPDATE vars SET value = 'T_2_5_0_184' WHERE name = 'cvs_tag_currentcode'; + Modified: slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm =================================================================== --- slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/tagboxes/Despam/Despam.pm 2007-11-19 06:57:53 UTC (rev 258) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: Despam.pm,v 1.2 2007/11/08 21:52:21 jamiemccarthy Exp $ +# $Id: Despam.pm,v 1.3 2007/11/13 17:23:39 jamiemccarthy Exp $ package Slash::Tagbox::Despam; @@ -28,7 +28,7 @@ use Data::Dumper; use vars qw( $VERSION ); -$VERSION = ' $Revision: 1.2 $ ' =~ /\$Revision:\s+([^\s]+)/; +$VERSION = ' $Revision: 1.3 $ ' =~ /\$Revision:\s+([^\s]+)/; use base 'Slash::DB::Utility'; # first for object init stuff, but really # needs to be second! figure it out. -- pudge @@ -167,7 +167,7 @@ if ($binspam_count > $constants->{tagbox_despam_binspamsallowed_ip}) { main::tagboxLog(sprintf("%s->run marking srcid %s for %d admin binspam tags, based on %d (%d)", ref($self), $submitter_srcid, $binspam_count, $fhid, $affected_id)); - $self->despam_srcid($fhitem, $binspam_count); + $self->despam_srcid($submitter_srcid, $binspam_count); } } } else { @@ -182,7 +182,7 @@ if ($binspam_count > $constants->{tagbox_despam_binspamsallowed}) { main::tagboxLog(sprintf("%s->run marking uid %d for %d admin binspam tags, based on %d (%d)", ref($self), $submitter_uid, $binspam_count, $fhid, $affected_id)); - $self->despam_uid($fhitem, $binspam_count); + $self->despam_uid($submitter_uid, $binspam_count); } } } Modified: slashjp/branches/upstream/current/tagboxes/FHEditorPop/FHEditorPop.pm =================================================================== --- slashjp/branches/upstream/current/tagboxes/FHEditorPop/FHEditorPop.pm 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/tagboxes/FHEditorPop/FHEditorPop.pm 2007-11-19 06:57:53 UTC (rev 258) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: FHEditorPop.pm,v 1.20 2007/11/08 21:52:21 jamiemccarthy Exp $ +# $Id: FHEditorPop.pm,v 1.21 2007/11/09 16:21:35 jamiemccarthy Exp $ # This goes by seclev right now but perhaps should define "editor" # to be more about author than admin seclev. In which case the @@ -32,7 +32,7 @@ use Data::Dumper; use vars qw( $VERSION ); -$VERSION = ' $Revision: 1.20 $ ' =~ /\$Revision:\s+([^\s]+)/; +$VERSION = ' $Revision: 1.21 $ ' =~ /\$Revision:\s+([^\s]+)/; use base 'Slash::DB::Utility'; # first for object init stuff, but really # needs to be second! figure it out. -- pudge @@ -145,7 +145,8 @@ my $tagboxdb = getObject('Slash::Tagbox'); my $firehose = getObject('Slash::FireHose'); - my $fhitem = $firehose->getFireHose($affected_id); + my $fhid = $firehose->getFireHoseIdFromGlobjid($affected_id); + my $fhitem = $firehose->getFireHose($fhid); # All firehose entries start out with popularity 1. my $popularity = 1; @@ -225,8 +226,6 @@ } # Set the corresponding firehose row to have this popularity. - my $affected_id_q = $self->sqlQuote($affected_id); - my $fhid = $self->sqlSelect('id', 'firehose', "globjid = $affected_id_q"); my $firehose_db = getObject('Slash::FireHose'); warn "Slash::Tagbox::FHEditorPop->run bad data, fhid='$fhid' db='$firehose_db'" if !$fhid || !$firehose_db; if ($options->{return_only}) { Modified: slashjp/branches/upstream/current/tagboxes/FireHoseScores/FireHoseScores.pm =================================================================== --- slashjp/branches/upstream/current/tagboxes/FireHoseScores/FireHoseScores.pm 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/tagboxes/FireHoseScores/FireHoseScores.pm 2007-11-19 06:57:53 UTC (rev 258) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: FireHoseScores.pm,v 1.5 2007/11/08 21:52:21 jamiemccarthy Exp $ +# $Id: FireHoseScores.pm,v 1.7 2007/11/13 17:25:04 jamiemccarthy Exp $ package Slash::Tagbox::FireHoseScores; @@ -28,7 +28,7 @@ use Data::Dumper; use vars qw( $VERSION ); -$VERSION = ' $Revision: 1.5 $ ' =~ /\$Revision:\s+([^\s]+)/; +$VERSION = ' $Revision: 1.7 $ ' =~ /\$Revision:\s+([^\s]+)/; use base 'Slash::DB::Utility'; # first for object init stuff, but really # needs to be second! figure it out. -- pudge @@ -166,8 +166,7 @@ my $tagsdb = getObject('Slash::Tags'); my $tagboxdb = getObject('Slash::Tagbox'); my $firehose_db = getObject('Slash::FireHose'); - my $affected_id_q = $self->sqlQuote($affected_id); - my $fhid = $self->sqlSelect('id', 'firehose', "globjid = $affected_id_q"); + my $fhid = $firehose_db->getFireHoseIdFromGlobjid($affected_id); warn "Slash::Tagbox::FireHoseScores->run bad data, fhid='$fhid' db='$firehose_db'" if !$fhid || !$firehose_db; my $fhitem = $firehose_db->getFireHose($fhid); @@ -235,8 +234,8 @@ $popularity += $extra_pop; } - # If this is spam, its score goes way down. - if ($fhitem->{is_spam} eq 'yes') { + # If this is spam, or contains a spam URL, its score goes way down. + if ($fhitem->{is_spam} eq 'yes' || $firehose_db->itemHasSpamURL($fhitem)) { my $max = defined($constants->{firehose_spam_score}) ? $constants->{firehose_spam_score} : -50; Modified: slashjp/branches/upstream/current/themes/slashcode/htdocs/users.pl =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/htdocs/users.pl 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/themes/slashcode/htdocs/users.pl 2007-11-19 06:57:53 UTC (rev 258) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: users.pl,v 1.341 2007/11/01 20:35:18 jamiemccarthy Exp $ +# $Id: users.pl,v 1.342 2007/11/13 23:52:38 jamiemccarthy Exp $ use strict; use Digest::MD5 'md5_hex'; @@ -700,7 +700,7 @@ # existing nopost and spammer my $srcids_to_check = $user->{srcids}; $err_name = 'mailpasswd_readonly_err' - if $reader->checkAL2($srcids_to_check, [qw( nopost spammer )]); + if $reader->checkAL2($srcids_to_check, 'nopost'); } if (!$err_name) { $err_name = 'mailpasswd_toooften_err' @@ -3177,7 +3177,7 @@ sub listReadOnly { my $reader = getObject('Slash::DB', { db_type => 'reader' }); - my $readonlylist = $reader->getAL2List([qw( nopost spammer )]); + my $readonlylist = $reader->getAL2List('nopost'); slashDisplay('listReadOnly', { readonlylist => $readonlylist, Modified: slashjp/branches/upstream/current/themes/slashcode/sql/mysql/datadump.sql =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/sql/mysql/datadump.sql 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/themes/slashcode/sql/mysql/datadump.sql 2007-11-19 06:57:53 UTC (rev 258) @@ -4,7 +4,7 @@ #-------------------------------------------------------- # Server version 3.23.26-beta-log # -# $Id: datadump.sql,v 1.52 2006/08/30 01:53:35 jamiemccarthy Exp $ +# $Id: datadump.sql,v 1.53 2007/11/13 17:25:04 jamiemccarthy Exp $ # @@ -40,6 +40,7 @@ INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('newestthree','<!-- newestthree -->',100,'static','','',0,'Newest Three',1,NULL,NULL,0); INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('recenttopics','none yet',500,'static','Recent Topics','mainpage',0,'Recent Topics',1,'',NULL,0); INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('friends_journal','',1,'portald','This adds a box where all of your friend\'s latest journal entries will be displayed.','mainpage',5,'Friend\'s Journal Entries',1,NULL,NULL,0); +INSERT INTO blocks (bid, block, seclev, type, description, skin, ordernum, title, portal, url, rdf, retrieve) VALUES ('spamurlregexes','',100,'static','Whitespace-delimited list of regexes which indicate a spammer URL.','mainpage',5,'Spam URL Regexes',0,NULL,NULL,0); # Modified: slashjp/branches/upstream/current/themes/slashcode/tasks/freshenup.pl =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/tasks/freshenup.pl 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/themes/slashcode/tasks/freshenup.pl 2007-11-19 06:57:53 UTC (rev 258) @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: freshenup.pl,v 1.81 2007/10/09 20:44:48 jamiemccarthy Exp $ +# $Id: freshenup.pl,v 1.83 2007/11/14 14:48:39 scc Exp $ use File::Path; use File::Temp; @@ -45,7 +45,7 @@ # runtask -u slashusername -o run_all=1,timeout_shtml=300 freshenup $do_all = 1 if $constants->{task_options}{run_all}; - my $timeout_render = 30; + my $timeout_render = $constants->{task_options}{timeout_render} || 30; my $timeout_shtml = $constants->{task_options}{timeout_shtml} || 90; my $max_stories = defined($constants->{freshenup_max_stories}) @@ -410,7 +410,8 @@ if ($constants->{plugin}{FireHose}) { gen_firehose_static($virtual_user, "index_firehose.shtml", $gSkin->{name}, "", { skipmenu => 1, skippop => 1, fhfilter=> "story", duration => "7", mode => 'fulltitle', mixedmode => '1', setfield => '1', color => "black", index => "1", nocolors => 1 }); - gen_firehose_static($virtual_user, "firehose.shtml", $gSkin->{name}, "", { duration => "7", mode => 'fulltile', mixedmode => '1', setfield => '1', color => "blue", nodates => '1' }); + gen_firehose_static($virtual_user, "firehose.shtml", $gSkin->{name}, "", { duration => "7", mode => 'fulltitle', mixedmode => '1', setfield => '1', color => "blue", nodates => '1' }); + gen_firehose_static($virtual_user, "embed_firehose.shtml", $gSkin->{name}, "", { embed => '1', smalldevices => '1', duration => "7", mode => 'fulltitle', setfield => '1', color => "blue", nodates => '1' }); } $slashdb->markSkinClean($mp_skid); delete $dirty_skins{$mp_skid}; @@ -441,6 +442,7 @@ if ($constants->{plugin}{FireHose}) { gen_firehose_static($virtual_user, "index_firehose.shtml", $skin->{name}, $skinname, { skipmenu => 1, skippop => 1, fhfilter=> "'story $skin->{name}'", duration => "7", mode => 'fulltitle', mixedmode => '1', setfield => '1', color => "black", index => "1", nocolors => "1" }); gen_firehose_static($virtual_user, "firehose.shtml", $skin->{name}, $skinname, { duration => "7", mode => 'fulltitle', mixedmode => '1', setfield => '1', color => "blue", nodates => '1', fhfilter => "'$skin->{name}'" }); + gen_firehose_static($virtual_user, "embed_firehose.shtml", $skin->{name}, $skinname, { embed => '1', smalldevices => '1', duration => "7", mode => 'fulltitle', setfield => '1', color => "blue", nodates => '1', fhfilter => "'$skin->{name}'" }); } $slashdb->markSkinClean($key); Modified: slashjp/branches/upstream/current/themes/slashcode/templates/editComm;users;default =================================================================== --- slashjp/branches/upstream/current/themes/slashcode/templates/editComm;users;default 2007-11-18 16:02:53 UTC (rev 257) +++ slashjp/branches/upstream/current/themes/slashcode/templates/editComm;users;default 2007-11-19 06:57:53 UTC (rev 258) @@ -63,15 +63,13 @@ [% IF user_edit.discussion2 && user_edit.discussion2 == "slashdot" %] <blockquote><div> - How Many Comments - [% comment_q_name = ( Slash.isSubscriber(user_edit) || (user_edit.seclev >= 100) ) ? 'd2_comment_q_all' : 'd2_comment_q'; + Retrieve [% comment_q_name = ( Slash.isSubscriber(user_edit) || (user_edit.seclev >= 100) ) ? 'd2_comment_q_all' : 'd2_comment_q'; comment_q = Slash.db.getDescriptions(comment_q_name); - Slash.createSelect('d2_comment_q', comment_q, user_edit.d2_comment_q, 1) %]<br> + Slash.createSelect('d2_comment_q', comment_q, user_edit.d2_comment_q, 1) %] Comments<br> - Comment Retrieval Order - [% comment_order = Slash.db.getDescriptions('d2_comment_order'); + Get [% comment_order = Slash.db.getDescriptions('d2_comment_order'); comment_order_def = user_edit.d2_comment_order || 0; - Slash.createSelect('d2_comment_order', comment_order, comment_order_def, 1) %] + Slash.createSelect('d2_comment_order', comment_order, comment_order_def, 1) %] Comments First </div></blockquote> [% END %] @@ -307,4 +305,4 @@ __seclev__ 500 __version__ -$Id: editComm;users;default,v 1.65 2007/10/16 22:31:25 pudge Exp $ +$Id: editComm;users;default,v 1.66 2007/11/13 19:49:11 entweichen Exp $