[freeside-commits] branch master updated. 82f76d01660b785f6c4ea13ba547c93c1c2c404d

Ivan ivan at 420.am
Sun Jan 18 14:23:38 PST 2015


The branch, master has been updated
       via  82f76d01660b785f6c4ea13ba547c93c1c2c404d (commit)
      from  961c99fbc92fbe296911a60980aef247f8adc049 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 82f76d01660b785f6c4ea13ba547c93c1c2c404d
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Jan 18 14:23:26 2015 -0800

    disable quotations without fully-qualifying all other searches, RT#20688, RT#22232

diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 4546741..0810a7e 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -45,6 +45,8 @@ our $nowarn_classload = 0;
 our $no_update_diff = 0;
 our $no_history = 0;
 
+our $qsearch_qualify_columns = 0;
+
 our $no_check_foreign = 1; #well, not inefficiently in perl by default anymore
 
 my $rsa_module;
@@ -754,7 +756,7 @@ sub get_real_fields {
 
       my $op = '=';
       my $column = $_;
-      my $table_column = "$table.$column";
+      my $table_column = $qsearch_qualify_columns ? "$table.$column" : $column;
       my $type = dbdef->table($table)->column($column)->type;
       my $value = $record->{$column};
       $value = $value->{'value'} if ref($value);
diff --git a/httemplate/search/quotation.html b/httemplate/search/quotation.html
index 6badb13..55c60f0 100755
--- a/httemplate/search/quotation.html
+++ b/httemplate/search/quotation.html
@@ -73,6 +73,8 @@ my $curuser = $FS::CurrentUser::CurrentUser;
 die "access denied"
   unless $curuser->access_right('List quotations');
 
+local($FS::Record::qsearch_qualify_columns) = 1;
+
 my $join_prospect_main = 'LEFT JOIN prospect_main USING ( prospectnum )';
 my $join_cust_main = FS::UI::Web::join_cust_main('quotation');
 

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

Summary of changes:
 FS/FS/Record.pm                  |    4 +++-
 httemplate/search/quotation.html |    2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list