From 0b0fe64f28a108cddcb37aad36e5ff251c08f6d5 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 23 Mar 2005 03:57:57 +0000 Subject: [PATCH] Added more tests for not under source control things. --- template.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/template.php b/template.php index 11bd259..7984677 100644 --- a/template.php +++ b/template.php @@ -206,7 +206,15 @@ class DB_Template // try a SVN ID tag as we can't really tell if we're using it else { - $scinfo = preg_replace('#\$' . 'Id: (.+?) (.+?) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.+?) (.+?) \$#', '\\1 - SVN \\2', $scinfo); + $test = preg_replace('#\$' . 'Id: (.+?) (.+?) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.+?) (.+?) \$#', '\\1 - SVN \\2', $scinfo); + if ($test == '$Id$') + { + $scinfo = 'Not Under Source Control'; + } + else + { + $scinfo = $test; + } break; } @@ -222,6 +230,10 @@ class DB_Template $scinfo = preg_replace('#\$' . '(LastModified)?Revision: (.+?) \$#', 'SVN \\2', $scinfo); $scinfo = preg_replace('#\$' . 'Id: (.+?) ([0-9].+?) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.+?) (.+?) \$#', '\\1 - SVN \\2', $scinfo); } + else + { + $scinfo = 'Not Under Source Control'; + } break; } } -- 2.22.5