Branch Coverage

lib/CGI/OptimalQuery/SaveSearchTool.pm
Criterion Covered Total %
branch 0 226 0.0


line true false branch
26 0 0 if $current_saved_search
29 0 0 if ($o->{'q'}->param('OQsaveSearchTitle') ne '')
38 0 0 unless $data{'rows_page'} eq 'All' or $data{'rows_page'} > 25
39 0 0 if (ref $o->{'schema'}{'state_params'} eq 'ARRAY')
66 0 0 if ($o->{'schema'}{'canSaveDefaultSearches'} and defined $o->{'q'}->param('save_search_default'))
70 0 0 if $rec{'is_default'}
74 0 0 if ($o->{'schema'}{'savedSearchAlerts'})
79 0 0 if ($rec{'alert_mask'})
101 0 0 if scalar @uids >= $o->{'schema'}{'savedSearchAlertMaxRecs'}
108 0 0 if ($o->{'q'}->param('OQss') ne '')
111 0 0 if ($is_update)
114 0 0 if (ref $val eq 'ARRAY') { }
117 0 0 $_ eq '' ? :
120 0 0 $val eq '' ? :
129 0 0 unless ($is_update)
130 0 0 if $o->{'dbh'}{'Driver'}{'Name'} eq 'Oracle'
134 0 0 if (ref $val eq 'ARRAY') { }
137 0 0 $_ eq '' ? :
140 0 0 $val eq '' ? :
149 0 0 if ($@)
153 0 0 if ($err =~ /unique\ constraint/i or $err =~ /are not unique/ or $err =~ /duplicate\ entry/i or $err =~ /unique\_violation/i or $err =~ /unique\ key/i or $err =~ /duplicate\ key/i or $err =~ /constraint\_unique/i) { }
178 0 0 if ($o->{'schema'}{'savedSearchAlerts'}) { }
180 0 0 if ($o->{'q'}->param('OQss') ne '')
184 0 0 $rec->{'ALERT_MASK'} > 0 ? :
191 0 0 if ($rec->{'ALERT_START_HOUR'} > 12) { }
196 0 0 if ($rec->{'ALERT_END_HOUR'} > 12) { }
228 0 0 $alerts_enabled ? :
0 0 $alerts_enabled ? :
0 0 $rec->{'ALERT_MASK'} & 1 ? :
0 0 $rec->{'ALERT_MASK'} & 2 ? :
0 0 $rec->{'ALERT_MASK'} & 4 ? :
0 0 $rec->{'ALERT_DOW'} =~ /0/ ? :
0 0 $rec->{'ALERT_DOW'} =~ /1/ ? :
0 0 $rec->{'ALERT_DOW'} =~ /2/ ? :
0 0 $rec->{'ALERT_DOW'} =~ /3/ ? :
0 0 $rec->{'ALERT_DOW'} =~ /4/ ? :
0 0 $rec->{'ALERT_DOW'} =~ /5/ ? :
0 0 $rec->{'ALERT_DOW'} =~ /6/ ? :
234 0 0 if ($o->{'q'}->param('OQss') ne '')
243 0 0 if ($o->{'schema'}{'canSaveDefaultSearches'})
245 0 0 $is_default_ss ? :
249 0 0 if $o->{'q'}->param('OQss') ne ''
273 0 0 if $CGI::OptimalQuery::SaveSearchTool::current_saved_search->{'email_to'} eq ''
276 0 0 if (exists $o->{'schema'}{'options'}{'__PACKAGE__'}) { }
0 0 elsif (exists $o->{'schema'}{'options'}{'CGI::OptimalQuery::InteractiveQuery'}) { }
298 0 0 if $o->{'queryDescr'}
299 0 0 if $filter
310 0 0 if ($o->{'schema'}{'state_params'})
314 0 0 if $v
320 0 0 if ++$cnt > $o->{'schema'}{'savedSearchAlertMaxRecs'}
321 0 0 if ref $opts{'mutateRecord'} eq 'CODE'
324 0 0 if (exists $CGI::OptimalQuery::SaveSearchTool::current_saved_search->{'uids'}{$rec->{'U_ID'}}) { }
334 0 0 if (not $dataTruc and $CGI::OptimalQuery::SaveSearchTool::current_saved_search->{'ALERT_MASK'} & 4 || $CGI::OptimalQuery::SaveSearchTool::current_saved_search->{'ALERT_MASK'} & 1 && $CGI::OptimalQuery::SaveSearchTool::current_saved_search->{'uids'}{$rec->{'U_ID'}} == 3)
344 0 0 if (ref $opts{'OQdataLCol'} eq 'CODE') { }
0 0 elsif (ref $opts{'buildEditLink'} eq 'CODE') { }
0 0 elsif ($opts{'editLink'} ne '' and $rec->{'U_ID'} ne '') { }
346 0 0 if ($link =~ /href\s*\=\s*\"?\'?([^\s\'\"\>]+)/i)
352 0 0 $opts{'editLink'} =~ /\?/ ? :
358 0 0 if $CGI::OptimalQuery::SaveSearchTool::current_saved_search->{'uids'}{$rec->{'U_ID'}} == 3
360 0 0 if ($link)
361 0 0 unless ($link =~ m[^https?\://]i)
369 0 0 if (exists $noEsc{$col}) { }
0 0 elsif (ref $rec->{$col} eq 'ARRAY') { }
370 0 0 if (ref $rec->{$col} eq 'ARRAY') { }
384 0 0 if length $buf > $o->{'schema'}{'savedSearchAlertEmailCharLimit'}
390 0 0 if ($row_cnt > 0)
392 0 0 if $dataTruc
410 0 0 if ($dbh->{'Driver'}{'Name'} eq 'Oracle') { }
0 0 elsif ($dbh->{'Driver'}{'Name'} eq 'SQLite') { }
0 0 elsif ($dbh->{'Driver'}{'Name'} eq 'mysql') { }
0 0 elsif ($dbh->{'Driver'}{'Name'} eq 'Pg' or $dbh->{'Driver'}{'Name'} eq 'Microsoft SQL Server') { }
427 0 0 unless $opts{'base_url'} =~ m[^https?\://]
432 0 0 unless ref $opts{'handler'} eq 'CODE'
433 0 0 unless my $dbh = $opts{'dbh'}
439 0 0 if ($type =~ /^(err|debug)$/i) { }
454 0 0 if ($dbh->{'Driver'}{'Name'} eq 'Oracle')
462 0 0 if $readLen > $dbh->{'LongReadLen'}
477 0 0 if ($dbh->{'Driver'}{'Name'} eq 'Oracle') { }
0 0 elsif ($dbh->{'Driver'}{'Name'} eq 'SQLite') { }
0 0 elsif ($dbh->{'Driver'}{'Name'} eq 'mysql') { }
0 0 elsif ($dbh->{'Driver'}{'Name'} eq 'Pg') { }
0 0 elsif ($dbh->{'Driver'}{'Name'} eq 'Microsoft SQL Server') { }
498 0 0 if $opts{'debug'}
503 0 0 if $opts{'debug'}
522 0 0 unless ref $p eq 'HASH'
527 0 0 if (ref $v eq 'ARRAY') { }
542 0 0 if $ENV{'QUERY_STRING'}
544 0 0 $opts{'base_url'} =~ m[https?\://([^/]+)] ? :
556 0 0 if $opts{'debug'}
558 0 0 if ($@)
564 0 0 unless $rec->{'email_to'} =~ /\@/
568 0 0 if ($rec->{'err_msg'}) { }
570 0 0 if ($rec->{'email_to'})
587 0 0 if ($opts{'debug'}) { }
591 0 0 unless &$sendmail_handler(%email)
601 0 0 if ($status == 1) { }
607 0 0 if ($status == 3)
621 0 0 if $rec->{'ALERT_MASK'} & 1 and $total_new > 0 or $rec->{'ALERT_MASK'} & 2 and $total_deleted > 0 or $rec->{'ALERT_MASK'} & 4 and $total_count > 0
624 0 0 if ($should_send_email)
632 0 0 if $total_new > 0
687 0 0 if ($opts{'debug'}) { }
691 0 0 unless &$sendmail_handler(%email)
698 0 0 if $update_uids eq ''
699 0 0 if $rec->{'err_msg'} eq ''
704 0 0 if (not $rec->{'err_msg'} and $update_uids ne $rec->{'ALERT_UIDS'})
710 0 0 if $opts{'debug'}
725 0 0 unless (exists $COMPILED_FUNCS{$fn})
726 0 0 unless open my $fh, '<', $fn
730 0 0 if $@
740 0 0 if $@ =~ /Can\'t locate/
741 0 0 if $@
742 0 0 unless $rv == 1
744 0 0 unless $codeRef