]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
landing final patch for bug 76261
authortara%tequilarista.org <>
Fri, 20 Apr 2001 00:19:05 +0000 (00:19 +0000)
committertara%tequilarista.org <>
Fri, 20 Apr 2001 00:19:05 +0000 (00:19 +0000)
checksetup.pl
collectstats.pl
defparams.pl
duplicates.cgi

index 046a3295b95e12de588c7c10fc1c699b0f4a30ef..6ffd1d0fb3153f2b8c89e478c5c14c0e4d726c0a 100755 (executable)
@@ -451,7 +451,7 @@ unless (-d 'data') {
     print "Creating data directory ...\n";
     mkdir 'data', 0770;
     if ($my_webservergroup eq "") {
-        chmod 0777, 'data';
+        chmod 1777, 'data';
     }
     open FILE, '>>data/comments'; close FILE;
     open FILE, '>>data/nomail'; close FILE;
@@ -545,7 +545,7 @@ if ($my_webservergroup) {
     # make sure that contrib keeps the permissions it had (don't touch it)
     chmod 0770, 'data', 'shadow', 'graphs';
     chmod 0666, glob('data/*');
-    chmod 0777, glob('data/*/'); # directories stay executable
+    chmod 1777, glob('data/*/'); # directories stay executable
 }
 
 
@@ -2058,9 +2058,9 @@ if (!($sth->fetchrow_arrayref()->[0])) {
 # a Bugzilla with the old data format, and so upgrade their data files.
 unless (-d 'graphs') {
     print "Creating graphs directory...\n";
-    mkdir 'graphs', 0770; 
+    mkdir 'graphs', 1770; 
     if ($my_webservergroup eq "") {
-        chmod 0777, 'graphs';
+        chmod 1777, 'graphs';
     } 
     
     # Upgrade data format
@@ -2137,16 +2137,14 @@ unless (-d 'graphs') {
     }    
 }
 
-#
 # 2000-12-18.  Added an 'emailflags' field for storing preferences about
 # when email gets sent on a per-user basis.
-#
 if (!GetFieldDef('profiles', 'emailflags')) {
     AddField('profiles', 'emailflags', 'mediumtext');
 }
 
-# http://bugzilla.mozilla.org/show_bug.cgi?id=61637
-# upgrade older versions of bugzilla that have the old comments table
+# 2000-11-27 For Bugzilla 2.5 and later. Change table 'comments' to 
+# 'longdescs' - the new name of the comments table.
 if (&TableExists('comments')) {
     RenameField ('comments', 'when', 'bug_when');
     ChangeFieldType('comments', 'bug_id', 'mediumint not null');
@@ -2158,7 +2156,15 @@ if (&TableExists('comments')) {
     $dbh->do("ALTER TABLE comments RENAME longdescs");
 }
 
-#
+# 2001-04-08 Added a special directory for the duplicates stats.
+unless (-d 'data/duplicates') {
+    print "Creating duplicates directory...\n";
+    mkdir 'data/duplicates', 0770; 
+    if ($my_webservergroup eq "") {
+        chmod 1777, 'data/duplicates';
+    } 
+}
+
 # If you had to change the --TABLE-- definition in any way, then add your
 # differential change code *** A B O V E *** this comment.
 #
index d6a97e4e2832a8149cba76c86c997212cc56e87f..7e0d822f0eed1056efa3e239e9e14161792797ab 100755 (executable)
@@ -130,11 +130,11 @@ sub calculate_dupes {
     # Save % count here in a date-named file
     # so we can read it back in to do changed counters
     # First, delete it if it exists, so we don't add to the contents of an old file
-    if (-e "data/mining/dupes$today") {
-        system("rm -f data/mining/dupes$today");
+    if (<data/duplicates/dupes$today*>) {
+        system("rm -f data/duplicates/dupes$today*");
     }
    
-    dbmopen(%count, "data/mining/dupes$today", 0644) || die "Can't open DBM dupes file: $!";
+    dbmopen(%count, "data/duplicates/dupes$today", 0644) || die "Can't open DBM dupes file: $!";
 
     # Create a hash with key "a bug number", value "bug which that bug is a
     # direct dupe of" - straight from the duplicates table.
index ff60338b0b29d58de0bd51c9eaa9cb7fc71e1101..d27bb0d7ee7b50d549d288557e80666d8d09dcef 100644 (file)
@@ -297,7 +297,8 @@ DefParam("mostfreqhtml",
 
 <blockquote>The Most Frequent Bugs page lists the known open bugs which 
 are reported most frequently in recent builds of Mozilla. It is automatically
-generated from the Bugzilla database.
+generated from the Bugzilla database every 24 hours, by counting the number
+of direct and indirect duplicates of bugs.
 This information is provided in order to assist in minimizing
 the amount of duplicate bugs entered into Bugzilla which in turn cuts down
 on development time.
index 03a3667636c02fcc50a2bbd912f45115492ba906..fbd2af7d6516652fe8060ac9a34463989324cd20 100755 (executable)
@@ -69,18 +69,18 @@ PutHeader("Most Frequently Reported Bugs");
 # Open today's record of dupes
 my $today = &days_ago(0);
 
-if (-e "data/mining/dupes$today.db")
+if (<data/duplicates/dupes$today*>)
 {
-  dbmopen(%dbmcount, "data/mining/dupes$today", 0644) || 
+  dbmopen(%dbmcount, "data/duplicates/dupes$today", 0644) || 
                             &die_politely("Can't open today's dupes file: $!");
 }
 else
 {
   # Try yesterday's, then (in case today's hasn't been created yet)
   $today = &days_ago(1);
-  if (-e "data/mining/dupes$today.db")
+  if (<data/duplicates/dupes$today*>)
   {
-    dbmopen(%dbmcount, "data/mining/dupes$today", 0644) || 
+    dbmopen(%dbmcount, "data/duplicates/dupes$today", 0644) || 
                         &die_politely("Can't open yesterday's dupes file: $!");
   }
   else
@@ -107,9 +107,9 @@ while (($key, $value) = each %count)
 # Try and open the database from "changedsince" days ago
 $before = &days_ago($changedsince);    
 
-if (-e "data/mining/dupes$before.db"
+if (<data/duplicates/dupes$before*>
 {
-  dbmopen(%before, "data/mining/dupes$before", 0644) && ($dobefore = 1);
+  dbmopen(%before, "data/duplicates/dupes$before", 0644) && ($dobefore = 1);
 }
 
 print Param("mostfreqhtml");