[Rt-commit] rt branch, 4.2/date-time-improvements-in-charts, updated. rt-3.8.10-72-ge820231

Ruslan Zakirov ruz at bestpractical.com
Fri Jun 17 11:47:04 EDT 2011


The branch, 4.2/date-time-improvements-in-charts has been updated
       via  e820231f53aaf66e8f121d7b08a3b10c123c26d4 (commit)
       via  5f231d66b562a961b77201da769568bf4e1c71f5 (commit)
      from  1f46079b3fa549eab9d7e3789e769af914ab0d65 (commit)

Summary of changes:
 lib/RT/Report/Tickets/Entry.pm |    2 +-
 lib/RT/SearchBuilder.pm        |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 5f231d66b562a961b77201da769568bf4e1c71f5
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Jun 17 19:40:23 2011 +0400

    use $self instead of RT::SearchBuilder
    
    echo of original place of the function, it was in RT::Handle
    at first

diff --git a/lib/RT/SearchBuilder.pm b/lib/RT/SearchBuilder.pm
index c716098..f334b69 100755
--- a/lib/RT/SearchBuilder.pm
+++ b/lib/RT/SearchBuilder.pm
@@ -413,8 +413,8 @@ sub DateTimeIntervalFunction {
     }
     elsif ( $db_type eq 'Pg' ) {
         $res = 'EXTRACT(EPOCH FROM AGE('
-                . RT::SearchBuilder->CombineFunctionWithField( %{ $args{'From'} } )
-                .', '. RT::SearchBuilder->CombineFunctionWithField( %{ $args{'To'} } )
+                . $self->CombineFunctionWithField( %{ $args{'From'} } )
+                .', '. $self->CombineFunctionWithField( %{ $args{'To'} } )
             .'))'
         ;
     }

commit e820231f53aaf66e8f121d7b08a3b10c123c26d4
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Jun 17 19:45:47 2011 +0400

    we can avoid quoting quote character (backslash)

diff --git a/lib/RT/Report/Tickets/Entry.pm b/lib/RT/Report/Tickets/Entry.pm
index 7cd5e1a..2bf20b6 100644
--- a/lib/RT/Report/Tickets/Entry.pm
+++ b/lib/RT/Report/Tickets/Entry.pm
@@ -118,7 +118,7 @@ sub Query {
             my $op = '=';
             if ( defined $value ) {
                 unless ( $value =~ /^\d+$/ ) {
-                    $value =~ s/(['\\])/\\$1/g;
+                    $value =~ s/'/\\'/g;
                     $value = "'$value'";
                 }
             }

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


More information about the Rt-commit mailing list