[Slashdotjp-dev 1265] [793] * Add "reasons_base", "reasons_plused" and "reasons_minused" to constants

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 10月 17日 (金) 15:54:39 JST


Revision: 793
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=793
Author:   tach
Date:     2008-10-17 15:54:38 +0900 (Fri, 17 Oct 2008)

Log Message:
-----------
 * Add "reasons_base", "reasons_plused" and "reasons_minused" to constants
   - To change modreasons by moderated score

Modified Paths:
--------------
    slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm
    slashjp/branches/2.5.0.192/debian/changelog


-------------- next part --------------
Modified: slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm
===================================================================
--- slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm	2008-10-14 06:29:33 UTC (rev 792)
+++ slashjp/branches/2.5.0.192/Slash/DB/MySQL/MySQL.pm	2008-10-17 06:54:38 UTC (rev 793)
@@ -8058,8 +8058,20 @@
 		$conf{reasons} = $self->sqlSelectAllHashref(
 			"id", "*", "modreasons"
 		);
+		$conf{reasons_base} = $self->sqlSelectAllHashref(
+			"id", "*", "modreasons", "m2able = 1 OR val = 0"
+		);
+		$conf{reasons_plused} = $self->sqlSelectAllHashref(
+			"id", "*", "modreasons", "m2able = 1 OR val <= 0"
+		);
+		$conf{reasons_minused} = $self->sqlSelectAllHashref(
+			"id", "*", "modreasons", "m2able = 1 OR val >= 0"
+		);
 		foreach my $d (split(/,/, $conf{modreasons_select_disabled} || '')) {
 			$conf{reasons}{int($d)}{select_disabled} = 1;
+			$conf{reasons_base}{int($d)}{select_disabled} = 1;
+			$conf{reasons_plused}{int($d)}{select_disabled} = 1;
+			$conf{reasons_minused}{int($d)}{select_disabled} = 1;
 		}
 	}
 

Modified: slashjp/branches/2.5.0.192/debian/changelog
===================================================================
--- slashjp/branches/2.5.0.192/debian/changelog	2008-10-14 06:29:33 UTC (rev 792)
+++ slashjp/branches/2.5.0.192/debian/changelog	2008-10-17 06:54:38 UTC (rev 793)
@@ -5,8 +5,10 @@
     - 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
+  * Add "reasons_base", "reasons_plused" and "reasons_minused" to constants
+    - To change modreasons by moderated score
 
- -- Taku YASUI <tach****@osdn*****>  Wed,  8 Oct 2008 10:53:49 +0000
+ -- Taku YASUI <tach****@osdn*****>  Fri, 17 Oct 2008 06:52:24 +0000
 
 slash (2.5.0.192-20) unstable; urgency=low
 


Slashdotjp-dev メーリングリストの案内
Back to archive index