[Slashdotjp-dev 679] [184] merged from otp code

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2007年 10月 15日 (月) 15:15:43 JST


Revision: 184
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=184
Author:   tach
Date:     2007-10-15 15:15:42 +0900 (Mon, 15 Oct 2007)

Log Message:
-----------
merged from otp code

Modified Paths:
--------------
    slashjp/trunk/plugins/Admin/admin.pl
    slashjp/trunk/plugins/Admin/dump
    slashjp/trunk/plugins/Login/login.pl


-------------- next part --------------
Modified: slashjp/trunk/plugins/Admin/admin.pl
===================================================================
--- slashjp/trunk/plugins/Admin/admin.pl	2007-10-15 05:33:58 UTC (rev 183)
+++ slashjp/trunk/plugins/Admin/admin.pl	2007-10-15 06:15:42 UTC (rev 184)
@@ -1162,9 +1162,11 @@
 		$storyref->{commentstatus} = $form->{commentstatus};
 
 		$storyref->{uid} ||= $user->{uid};
-		$storyref->{dept} =~ s/[-\s]+/-/g;
-		$storyref->{dept} =~ s/^-//;
-		$storyref->{dept} =~ s/-$//;
+		if ($constants->{use_dept_space2dash}){
+			$storyref->{dept} =~ s/[-\s]+/-/g;
+			$storyref->{dept} =~ s/^-//;
+			$storyref->{dept} =~ s/-$//;
+		}
 
 		my($related_sids_hr, $related_urls_hr, $related_cids_hr) = extractRelatedStoriesFromForm($form);
 		$storyref->{related_sids_hr} = $related_sids_hr;
@@ -1345,7 +1347,7 @@
 	$authors->{$storyref->{uid}} = $slashdb->getUser($storyref->{uid}, 'nickname') if $storyref->{uid} && !defined($authors->{$storyref->{uid}});
 	my $author_select = createSelect('uid', $authors, $storyref->{uid}, 1);
 
-	$storyref->{dept} =~ s/ /-/gi;
+	$storyref->{dept} =~ s/ /-/gi if $constants->{use_dept_space2dash};
 
 	$locktest = lockTest($storyref->{title});
 
@@ -1927,7 +1929,7 @@
 	my $tid_ref;
 	my $default_set = 0;
 
-	$form->{dept} =~ s/ /-/g;
+	$form->{dept} =~ s/ /-/g if $constants->{use_dept_space2dash};
 
 	$form->{aid} = $slashdb->getStory($form->{sid}, 'aid', 1)
 		unless $form->{aid};
@@ -2254,7 +2256,7 @@
 	my $tid_ref;
 	my $default_set = 0;
 
-	$form->{dept} =~ s/ /-/g;
+	$form->{dept} =~ s/ /-/g if $constants->{use_dept_space2dash};
 
 	my($chosen_hr) = extractChosenFromForm($form);
 	my($tids) = $slashdb->getTopiclistFromChosen($chosen_hr);

Modified: slashjp/trunk/plugins/Admin/dump
===================================================================
--- slashjp/trunk/plugins/Admin/dump	2007-10-15 05:33:58 UTC (rev 183)
+++ slashjp/trunk/plugins/Admin/dump	2007-10-15 06:15:42 UTC (rev 184)
@@ -41,6 +41,7 @@
 INSERT INTO menus(id, menu, label, sel_label, value, seclev, showanon, menuorder) VALUES (NULL,'security','Config','config','[% gSkin.rootdir %]/admin.pl?op=topics',10000,0,9);
 
 INSERT INTO vars (name, value, description) VALUES ('admin_maxdays_divider', '14', 'Max number of days on the admin.pl story list to bother showing the day-dividers');
+INSERT INTO vars (name, value, description) VALUES ('use_dept_space2dash','1','convert spaces to dashes in dept. field');
 INSERT INTO vars (name, value, description) VALUES ('ispell', 'ispell', 'Location of ispell binary or empty string to turn off');
 INSERT INTO vars (name, value, description) VALUES ('ispell_is_really_aspell_with_lang', '', 'Some systems install aspell and a script that mimics the behavior of ispell; if yours does, set this to your preferred language name, e.g. "english"');
 INSERT INTO vars (name, value, description) VALUES ('similarstorydays', '30', 'Number of days to look back for uncommon words when determining similar stories');

Modified: slashjp/trunk/plugins/Login/login.pl
===================================================================
--- slashjp/trunk/plugins/Login/login.pl	2007-10-15 05:33:58 UTC (rev 183)
+++ slashjp/trunk/plugins/Login/login.pl	2007-10-15 06:15:42 UTC (rev 184)
@@ -11,6 +11,7 @@
 use Slash::Utility;
 use Slash::XML;
 use Slash::LDAPDB;
+
 use vars qw($VERSION);
 
 ($VERSION) = ' $Revision$ ' =~ /\$Revision:\s+([^\s]+)/;


Slashdotjp-dev メーリングリストの案内
アーカイブの一覧に戻る