Branch Coverage

File:C4/ImportExportFramework.pm
Coverage:0.0%

line%coveragebranch
2090TFif ($dbh)
2130TFif ($mode eq 'ods' or $mode eq 'excel')
2160TF$mode && $mode eq 'ods' ? :
2170TFif ($dom)
2190TFif ($mode and $mode eq 'ods')
2270TFif ($@)
2280TFif $debug
2330TF$mode eq 'csv' || $mode eq 'sql' ? :
0TF$mode eq 'ods' ? :
0TFif (_export_table('marc_tag_structure', $dbh, $mode eq 'csv' || $mode eq 'sql' ? $xmlStrRef : $dom, $mode eq 'ods' ? $elementSS : $root, $frameworkcode, $mode))
2340TF$mode eq 'csv' || $mode eq 'sql' ? :
0TF$mode eq 'ods' ? :
0TFif (_export_table('marc_subfield_structure', $dbh, $mode eq 'csv' || $mode eq 'sql' ? $xmlStrRef : $dom, $mode eq 'ods' ? $elementSS : $root, $frameworkcode, $mode))
2350TFif $mode eq 'ods' or $mode eq 'excel'
2500TFif ($mode eq 'csv') { }
0TFelsif ($mode eq 'sql') { }
0TFelsif ($mode eq 'ods') { }
2930TFif ($@)
2940TFif $debug
3400TFif ($@)
3410TFif $debug
3760TF$$hashRef{'Type'} =~ /int/i ? :
3880TFif ($$_{'type'} eq 'float' and not defined $data) { }
0TFelsif ($$_{'type'} eq 'string' and (not $data and $data ne '0')) { }
3930TFif $$_{'type'} eq 'string'
4040TFif ($@)
4050TFif $debug
4410TF$$hashRef{'Type'} =~ /int/i ? :
4580TFif ($$_{'type'} eq 'Number' and not defined $data) { }
0TFelsif ($$_{'type'} eq 'String' and (not $data and $data ne '0')) { }
4630TF$$_{'type'} eq 'String' ? :
4670TFif ($@)
4680TFif $debug
4960TFif ($ENV{'TMP'} and -d $ENV{'TMP'}) { }
0TFelsif ($ENV{'TMPDIR'} and -d $ENV{'TMPDIR'}) { }
0TFelsif ($ENV{'TEMP'} and -d $ENV{'TEMP'}) { }
5120TF-d $tmp ? :
5170TFif ($@) { }
5430TF-d $tmp ? :
5450TFif ($@)
5490TFif ($tempdir)
5520TFif (open OUT, "> $tempdir/content.xml")
5560TFif (open OUT, "> $tempdir/mimetype")
5600TFif (open OUT, "> $tempdir/meta.xml")
5640TFif (open OUT, "> $tempdir/styles.xml")
5680TFif (open OUT, "> $tempdir/settings.xml")
5820TFif (open OUT, "> $tempdir/META-INF/manifest.xml")
5870TFif ($@) { }
5880TFif $debug
5980TFif ($@)
6010TFif not $cmd or not -x $cmd
6060TFif (-f "$tempdir/new.ods")
6070TFif (open MYFILE, "$tempdir/new.ods")
6180TFif (not $tempModule and $tempdir)
6240TFif ($@)
6280TFif $ok
6760TFif (-r $filename and $dbh) { }
6780TFif ($filename =~ /\.(csv|ods|xml|sql)$/i) { }
6810TFif $deleteFilename
6840TFif ($extension eq 'ods')
6870TFif ($filename)
6900TFif ($extension eq 'ods' or $extension eq 'xml') { }
6940TFif ($dom)
7010TFif ($dom) { }
7030TFif ($extension eq 'sql') { }
7100TFif (($numDeletedAux = _import_table($dbh, 'marc_tag_structure', $frameworkcode, $dom, ['frameworkcode', 'tagfield'], $extension)) >= 0)
7110TFif $numDeletedAux > 0
7120TFif (($numDeletedAux = _import_table($dbh, 'marc_subfield_structure', $frameworkcode, $dom, ['frameworkcode', 'tagfield', 'tagsubfield'], $extension)) >= 0)
7130TFif $numDeletedAux > 0
7140TF$numDeleted > 0 ? :
7190TFif $debug
7220TFif ($@) { }
7230TFif $debug
7250TFif ($extension eq 'sql' or $extension eq 'csv')
7260TFif $dom
7300TFif $deleteFilename
7320TFif $debug
7340TFif ($deleteFilename and $tempdir and -d $tempdir and -w $tempdir)
7400TFif ($@)
7610TF'C4::Context'->config('db_scheme') eq 'mysql' ? :
7680TFunless $line =~ /^\s*(?i:DELETE\s+FROM|INSERT\s+INTO)\s+(?:marc_tag_structure|marc_subfield_structure)/
7710TFunless ($line =~ /'$frameworkcode'/)
7730TFif ($parser) { }
7750TFif $line =~ /;$/
7780TFif ($where and $where->op eq '=' and $line =~ /^\s*DELETE/) { }
7790TFunless $_ =~ /frameworkcode='$frameworkcode'/
7850TFif ($parser->VERSION < 1.3) { }
7970TFif (scalar @arrFields == scalar @arrValues)
8010TFif ($_ eq 'frameworkcode' and $arrValues[$j] ne $frameworkcode) { }
8090TFif $modified
8130TFif $@
8170TFif ($error)
8180TFunless $line =~ /;$/
8190TFif ($line =~ /^\s*DELETE/) { }
0TFelsif ($line =~ /^\s*INSERT\s+INTO\s+(.*?)\s+\((.*?frameworkcode.*?)\)\s+VALUES\s+\((.+)\)\s*;\s*$/) { }
8200TFunless $_ =~ /frameworkcode='$frameworkcode'/
8270TFif ($values)
8300TFif (scalar @arrFields == scalar @arrValues)
8330TFif ($arrFields[$i] eq 'frameworkcode' and $arrValues[$i]{'value'} ne $frameworkcode) { }
0TFelsif ($arrValues[$i]{'literal'}) { }
8400TFif ($modified)
8640TFif $currentChar =~ /^\s$/
8650TFif $posBegin and not $currentChar =~ /^[,']$/
8660TFif (not $posBegin) { }
8670TFif ($currentChar eq q[']) { }
8740TFif ($currentChar eq ',') { }
0TFelsif ($currentChar eq q['] and $posLiteral) { }
8750TFunless ($posLiteral)
8800TFif $literalEscape eq '\\' and substr($values, $currentPos - 2, 1) eq $literalEscape
8810TFif ($literalEscape eq q['] and substr($values, $currentPos, 1) eq $literalEscape)
8860TFif substr($values, $currentPos, 1) eq ','
8920TF$posLiteral ? :
0TFif $posBegin
9070TF-d $tmp ? :
9090TFif ($@)
9130TFif ($tempdir)
9190TFif $file->isDirectory
9210TFunless $extractName eq 'content.xml'
9250TFif ($@)
9280TFif not $cmd or not -x $cmd
9310TFif (-f "$tempdir/content.xml")
9320TFif $deleteFilename
9360TFif $deleteFilename
9620TFif ($fieldsA) { }
9700TFunless (exists $$fields{$_})
10040TFif ($format eq 'csv') { }
0TFelsif ($format eq 'ods') { }
10200TFif ($ok) { }
10210TFif (($ok = scalar keys %fields2Delete) > 0)
10460TFif ($db_scheme eq 'mysql') { }
10530TFif ($db_scheme eq 'mysql') { }
10590TFif ($@) { }
10600TFunless ($db_scheme eq 'mysql')
10700TFunless $@
10720TFif $debug
10760TFif ($ok)
10800TFif exists $$fields2Delete{$field}
11020TFif ($nodeR->nodeType == 1 and $format && $format eq 'ods' && $nodeR->nodeName =~ /(?:table:)?table-row/ || $nodeR->nodeName =~ /(?:ss:)?Row/ and $nodeR->hasChildNodes)
11030TFif ($j == 0) { }
11060TFunless _check_validity_worksheet($dbh, $table, $nodeR, \@fields, $format)
11100TFif $dataStr
11130TFif $updateStr
11170TFif (scalar @fields == scalar @$dataFieldsR)
11510TFif ($row =~ /,"[^"]*[\r\n]+$/ or $row =~ /^[^"]+[\r\n]+$/)
11560TFif ($partialRow)
11610TFif ($row =~ /(?:".*?",?)+/)
11630TFif $arrData[0] =~ /^"/
11650TFif $arrData[$#arrData] =~ /"$/
11660TFif (@arrData)
11670TFif ($arrData[0] eq '#-#' and $arrData[$#arrData] eq '#-#') { }
0TFelsif ($fieldsNameRead and $arrData[0] eq 'tagfield') { }
11750TFif (scalar @$fields == scalar @arrData)
11760TFif (not $fieldsNameRead) { }
11800TFif ($arrData[$i] ne $$fields[$i])
11850TFif ($fieldsNameRead)
11890TFif $dataStr
11920TFif $updateStr
11990TFif ($$fields[$j] eq 'frameworkcode' and $_ ne $frameworkcode) { }
12310TFif (@nodes == 1 and $nodes[0]->hasChildNodes) { }
12350TFif $debug
12520TFif (@nodes > 0) { }
12550TFif (@nodesT == 1 and $nodesT[0]->hasChildNodes)
12610TFif $debug
12740TFif ($node->nodeType == 1 and $node->nodeName =~ /(?:table:)?table-cell/)
12750TFif ($node->hasAttributeNS('urn:oasis:names:tc:opendocument:xmlns:office:1.0', 'value')) { }
0TFelsif ($node->hasChildNodes) { }
12790TFif (@nodes2 == 1 and $nodes2[0]->hasChildNodes)
12830TFif ($node->hasAttributeNS('urn:oasis:names:tc:opendocument:xmlns:table:1.0', 'number-columns-repeated'))
12980TFif ($node and $node->hasChildNodes)
13050TFif ($format and $format eq 'ods') { }
13060TFif $repeated <= 0
13080TFif defined $data
13100TFif ($node2->nodeType == 1 and $node2->nodeName =~ /(?:ss:)?Cell/)
13120TFif (@nodes3 == 1 and $nodes3[0]->hasChildNodes)
13180TFif ($ok)
13190TFif $data eq '#'
13200TFif $$fields[$i] eq 'frameworkcode'
13260TFif $repeated <= 0
13380TFif ($node and $node->hasChildNodes)
13420TFif ($format and $format eq 'ods') { }
13440TFif defined $data
13460TFif ($node2->nodeType == 1 and $node2->nodeName =~ /(?:ss:)?Cell/)
13480TFif (@nodes3 == 1 and $nodes3[0]->hasChildNodes)