[Rt-commit] rt branch, 4.2/links_in_validator, updated. rt-3.8.8-255-gf429424

Ruslan Zakirov ruz at bestpractical.com
Fri Feb 25 14:01:41 EST 2011


The branch, 4.2/links_in_validator has been updated
       via  f429424665ed5d57fdd2c107be373a5c57c2327c (commit)
      from  359014428439321cf8cad00897f3fd67605d49fe (commit)

Summary of changes:
 sbin/rt-validator.in |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit f429424665ed5d57fdd2c107be373a5c57c2327c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Feb 26 00:01:00 2011 +0500

    don't validate "LocalX =~ X" for MergedInto links

diff --git a/sbin/rt-validator.in b/sbin/rt-validator.in
index 0c82ae4..7d20248 100644
--- a/sbin/rt-validator.in
+++ b/sbin/rt-validator.in
@@ -973,8 +973,10 @@ push @CHECKS, 'Links: LocalX != X' => sub {
         # we limit to $dir = */ticket/* so it doesn't conflict with previouse check
         # previouse check is more important as there was a bug in RT when Local$dir
         # was set for not tickets
-        my $where = "Local$dir > 0 AND $dir LIKE ? AND $dir != ". sql_concat('?', "Local$dir");
-        my @binds = ($prefix ."%", $prefix);
+        # XXX: we have issue with MergedInto links - "LocalX !~ X"
+        my $where = "Local$dir > 0 AND $dir LIKE ? AND $dir != ". sql_concat('?', "Local$dir")
+            ." AND Type != ?";
+        my @binds = ($prefix ."%", $prefix, 'MergedInto');
 
         my $sth = execute_query( "SELECT id FROM $table WHERE $where", @binds );
         while ( my ($id, $value) = $sth->fetchrow_array ) {

-----------------------------------------------------------------------


More information about the Rt-commit mailing list