[bugs] [Bug 1002] New - chora: avoid "Warning: Undefined property:
author"
bugs@bugs.horde.org
bugs@bugs.horde.org
Fri, 26 Jul 2002 08:28:45 -0300
http://bugs.horde.org/show_bug.cgi?id=1002
*** shadow/1002 Fri Jul 26 08:28:45 2002
--- shadow/1002.tmp.1569 Fri Jul 26 08:28:45 2002
***************
*** 0 ****
--- 1,50 ----
+ Bug#: 1002
+ Product: Horde
+ Version: other
+ Platform: Mozilla 5.x
+ OS/Version: Solaris
+ Status: NEW
+ Resolution:
+ Severity: normal
+ Priority: P2
+ Component: Core
+ Area: BUILD
+ AssignedTo: chuck@horde.org
+ ReportedBy: cholland@lucent.com
+ URL:
+ Summary: chora: avoid "Warning: Undefined property: author"
+
+ apply a more flexible time format in cvs log files:
+ - separator for date '-' or '/' not only '/'
+ - additional time zone adjustments may appear instead of not expected
+
+ apply the following patch:
+
+ *** chora-1.1/lib/CVSLib/Log.php Thu Jul 25 13:43:50 2002
+ --- chora-1.1/lib/CVSLib/Log.php.orig Wed Mar 20 21:30:08 2002
+ *************** class CVSLib_Log {
+ *** 44,50 ****
+ /* Found revision and filename, now looking for date */
+ case CVSLIB_LOG_DATE:
+ $line = array_shift($raw);
+ ! if
+ (preg_match("|^date:\s+(\d+)[-/](\d+)[-/](\d+)\s+(\d+):(\d+):(\d+).*?;\s+author:\s+(\S+);\s+state:\s+(\S+);(\s+lines:\s+([0-9\s+-]+))?|",
+ $line, $parts)) {
+ $this->date = gmmktime($parts[4], $parts[5], $parts[6],
+ $parts[2], $parts[3], $parts[1]);
+ $this->author = $parts[7];
+ $this->state = $parts[8];
+ --- 44,50 ----
+ /* Found revision and filename, now looking for date */
+ case CVSLIB_LOG_DATE:
+ $line = array_shift($raw);
+ ! if
+ (preg_match("|^date:\s+(\d+)/(\d+)/(\d+)\s+(\d+):(\d+):(\d+);\s+author:\s+(\S+);\s+state:\s+(\S+);(\s+lines:\s+([0-9\s+-]+))?|",
+ $line, $parts)) {
+ $this->date = gmmktime($parts[4], $parts[5], $parts[6],
+ $parts[2], $parts[3], $parts[1]);
+ $this->author = $parts[7];
+ $this->state = $parts[8];
+
+
+