Branch Coverage

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


line true false branch
23 0 0 if $current_saved_search
26 0 0 if ($o->{'q'}->param('OQsaveSearchTitle') ne '')
35 0 0 unless $data{'rows_page'} eq 'All' or $data{'rows_page'} > 25
36 0 0 if (ref $o->{'schema'}{'state_params'} eq 'ARRAY')
63 0 0 if ($o->{'schema'}{'canSaveDefaultSearches'} and defined $o->{'q'}->param('save_search_default'))
68 0 0 if ($o->{'schema'}{'savedSearchAlerts'})
73 0 0 if ($rec{'alert_mask'})
93 0 0 if scalar @uids > $o->{'schema'}{'savedSearchAlertMaxRecs'}
99 0 0 if ($o->{'q'}->param('OQss') ne '')
102 0 0 if ($is_update)
105 0 0 if (ref $val eq 'ARRAY') { }
108 0 0 $_ eq '' ? :
111 0 0 $val eq '' ? :
119 0 0 unless ($is_update)
120 0 0 if $o->{'dbh'}{'Driver'}{'Name'} eq 'Oracle'
124 0 0 if (ref $val eq 'ARRAY') { }
127 0 0 $_ eq '' ? :
130 0 0 $val eq '' ? :
139 0 0 if ($o->{'schema'}{'canSaveDefaultSearches'} and $rec{'is_default'})
143 0 0 if ($@)
146 0 0 if ($@)
150 0 0 if ($err =~ /unique\ constraint/i 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)
171 0 0 if ($o->{'schema'}{'savedSearchAlerts'}) { }
173 0 0 if ($o->{'q'}->param('OQss') ne '')
177 0 0 $rec->{'ALERT_MASK'} > 0 ? :
184 0 0 if ($rec->{'ALERT_START_HOUR'} > 12) { }
189 0 0 if ($rec->{'ALERT_END_HOUR'} > 12) { }
221 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/ ? :
227 0 0 if ($o->{'q'}->param('OQss') ne '')
236 0 0 if ($o->{'schema'}{'canSaveDefaultSearches'})
238 0 0 $is_default_ss ? :
242 0 0 if $o->{'q'}->param('OQss') ne ''
266 0 0 if $CGI::OptimalQuery::SaveSearchTool::current_saved_search->{'email_to'} eq ''
269 0 0 if (exists $o->{'schema'}{'options'}{'__PACKAGE__'}) { }
0 0 elsif (exists $o->{'schema'}{'options'}{'CGI::OptimalQuery::InteractiveQuery'}) { }
291 0 0 if $o->{'queryDescr'}
292 0 0 if $filter
303 0 0 if ($o->{'schema'}{'state_params'})
307 0 0 if $v
313 0 0 if ++$cnt > $o->{'schema'}{'savedSearchAlertMaxRecs'}
314 0 0 if ref $opts{'mutateRecord'} eq 'CODE'
317 0 0 if (exists $CGI::OptimalQuery::SaveSearchTool::current_saved_search->{'uids'}{$rec->{'U_ID'}}) { }
327 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)
337 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 '') { }
339 0 0 if ($link =~ /href\s*\=\s*\"?\'?([^\s\'\"\>]+)/i)
345 0 0 $opts{'editLink'} =~ /\?/ ? :
350 0 0 if $CGI::OptimalQuery::SaveSearchTool::current_saved_search->{'uids'}{$rec->{'U_ID'}} == 3
352 0 0 if ($link)
353 0 0 unless ($link =~ m[^https?\://]i)
354 0 0 unless $link =~ m[^/]
362 0 0 if (exists $noEsc{$col}) { }
0 0 elsif (ref $rec->{$col} eq 'ARRAY') { }
363 0 0 if (ref $rec->{$col} eq 'ARRAY') { }
377 0 0 if length $buf > $o->{'schema'}{'savedSearchAlertEmailCharLimit'}
383 0 0 if ($row_cnt > 0)
385 0 0 if $dataTruc
403 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') { }
422 0 0 if ($opts{'base_url'} =~ m[^(https?\://[^/]+)(.*)]i) { }
428 0 0 unless ref $opts{'handler'} eq 'CODE'
429 0 0 unless my $dbh = $opts{'dbh'}
435 0 0 if ($type =~ /^(err|debug)$/i) { }
450 0 0 if ($dbh->{'Driver'}{'Name'} eq 'Oracle')
458 0 0 if $readLen > $dbh->{'LongReadLen'}
473 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') { }
494 0 0 if $opts{'debug'}
499 0 0 if $opts{'debug'}
518 0 0 unless ref $p eq 'HASH'
523 0 0 if (ref $v eq 'ARRAY') { }
538 0 0 if $ENV{'QUERY_STRING'}
540 0 0 $opts{'base_url'} =~ m[https?\://([^/]+)] ? :
552 0 0 if $rec->{'email_to'} eq ''
553 0 0 if $opts{'debug'}
555 0 0 if ($@)
562 0 0 if ($rec->{'err_msg'}) { }
564 0 0 if ($rec->{'email_to'})
580 0 0 if ($opts{'debug'}) { }
584 0 0 unless &$sendmail_handler(%email)
594 0 0 if ($status == 1) { }
600 0 0 if ($status == 3)
613 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
616 0 0 if ($should_send_email)
624 0 0 if $total_new > 0
679 0 0 if ($opts{'debug'}) { }
683 0 0 unless &$sendmail_handler(%email)
690 0 0 if $update_uids eq ''
691 0 0 if $rec->{'err_msg'} eq ''
696 0 0 if ($update_uids ne $rec->{'ALERT_UIDS'})
702 0 0 if $opts{'debug'}
717 0 0 unless (exists $COMPILED_FUNCS{$fn})
718 0 0 unless open my $fh, '<', $fn
722 0 0 if $@
732 0 0 if $@ =~ /Can\'t locate/
733 0 0 if $@
734 0 0 unless $rv == 1
736 0 0 unless $codeRef