[Slashdotjp-dev 940] [459] Change to delete nonexistent stories from story_dirty

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 1月 23日 (水) 17:02:52 JST


Revision: 459
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=459
Author:   tach
Date:     2008-01-23 17:02:51 +0900 (Wed, 23 Jan 2008)

Log Message:
-----------
Change to delete nonexistent stories from story_dirty

Modified Paths:
--------------
    slashjp/trunk/debian/changelog
    slashjp/trunk/themes/slashcode/tasks/freshenup.pl


-------------- next part --------------
Modified: slashjp/trunk/debian/changelog
===================================================================
--- slashjp/trunk/debian/changelog	2008-01-23 07:50:26 UTC (rev 458)
+++ slashjp/trunk/debian/changelog	2008-01-23 08:02:51 UTC (rev 459)
@@ -2,8 +2,9 @@
 
   * Exit init.d script when slashd daemon does not exist
   * Change to delete neverdisplay stories from story_dirty
+  * Change to delete nonexistent stories from story_dirty
 
- -- Taku YASUI <tach****@osdn*****>  Wed, 23 Jan 2008 16:49:44 +0900
+ -- Taku YASUI <tach****@osdn*****>  Wed, 23 Jan 2008 17:02:11 +0900
 
 slash (2.5.0.189-2) unstable; urgency=low
 

Modified: slashjp/trunk/themes/slashcode/tasks/freshenup.pl
===================================================================
--- slashjp/trunk/themes/slashcode/tasks/freshenup.pl	2008-01-23 07:50:26 UTC (rev 458)
+++ slashjp/trunk/themes/slashcode/tasks/freshenup.pl	2008-01-23 08:02:51 UTC (rev 459)
@@ -85,12 +85,18 @@
 	}
 
 	############################################################
-	# delete neverdisplay stories from story_dirty
+	# delete unwanted stories from story_dirty
 	############################################################
 
-	if ($do_all && my $count = $slashdb->sqlDelete("story_dirty USING story_dirty, story_param",
-		"story_dirty.stoid=story_param.stoid AND story_param.name='neverdisplay' AND story_param.value=1")) {
-		slashdLog("Deleted $count neverdisplay stories from story_dirty") if verbosity() >= 1;
+	if ($do_all) {
+		if (my $count = $slashdb->sqlDelete("story_dirty USING story_dirty LEFT JOIN stories USING (stoid)",
+			"stories.sid IS NULL") ) {
+			slashdLog("Deleted $count nonexistent stories from story_dirty") if verbosity() >= 1;
+		}
+		if (my $count = $slashdb->sqlDelete("story_dirty USING story_dirty, story_param",
+			"story_dirty.stoid=story_param.stoid AND story_param.name='neverdisplay' AND story_param.value=1")) {
+			slashdLog("Deleted $count neverdisplay stories from story_dirty") if verbosity() >= 1;
+		}
 	}
 
 	############################################################


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