Re: Changes in Revcheck
| From: | Thomas Schöfbeck | Date: | Wed, 09 Oct 2002 22:04:47 +0000 |
| Subject: | Re: Changes in Revcheck | ||
| References: | 1 2 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969349091@lists.php.net to get a copy of this message | ||
Gabor Hojtsy wrote:
A difficult question to which I haven't found an accurate solution yet: "Alert when the 1st en-change after my trans-sync is older than 'alert_time', if I only get the date of the LAST en-change" (I was too long lazy :) Since it seems difficult to explain the current problem and also my STILL VERY INaccurate proposal in words, I'll try it with some code (if you play around with the values, you'll see what I mean) <?php define("ALERT_DATE", 30);2.) Change the age-criteria for "critical" files to the last change-dateI cannot fully understand what you propose here...of the en-file Currently, if you've synced a file >30 days ago, and today the corresp. en-file gets changed, the status becomes immediately "critical". If we change this to the last change of en-files, we lose the status "critical" with each change (up to 9 times), but I think it's the better choice (if I havent overseen something :)
$en_rev = 11; // rev.-No before concat with "1." in script$trans_rev = 10; // must be <= $en_rev
// (== $en_rev not here because "up-to-date") $en_age = 1; // age in days$trans_age = 31; // must be >= $en_age if( $en_age - $trans_age <= -30 ) // -30 = curr. ALERT_DATE
echo "currently: critical\n";else
echo "currently: old\n";$rev_diff = $en_rev - $trans_rev; if( $en_age >= ALERT_DATE || $rev_diff*$en_age >= ALERT_DATE )
echo "proposed: critical\n";else
echo "proposed: old\n";?> Hope that makes my thought more clear... Cu, Thomas