From 29e055f10a5ddf6424415c9cd9265d9d38e46ab3 Mon Sep 17 00:00:00 2001 From: Silvio Date: Fri, 20 Aug 2010 16:55:05 -0300 Subject: Code cleanup --- apps/subfield.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'apps/subfield.php') diff --git a/apps/subfield.php b/apps/subfield.php index 8d58661..919e0b6 100644 --- a/apps/subfield.php +++ b/apps/subfield.php @@ -16,7 +16,8 @@ $display = new CinisisDisplayHelper('Subfield finder'); $form = $display->formInputText('entry', $entry); $form .= $display->formInputText('fid', $fid); $form .= $display->formInputText('sid', $sid); -$display->form($form, basename(__FILE__)); +$script = basename(__FILE__); +$display->form($form, $script); // Get a db instance. $isis = new IsisFinder(); @@ -29,17 +30,14 @@ if ($isis) { list($entry, $result) = $isis->nextSubfield($field, $subfield, $entry); // Navigation bar. - $display->navbar($entry, $isis->entries, 'subfield.php', '&fid='. $fid . '&sid='. $sid); + $display->navbar($entry, $isis->entries, $script, '&fid='. $fid . '&sid='. $sid); // Format output. - echo "
\n";
-  echo "Selected field: $fid: ". $field['name'] .".\n";
-  echo "Selected subfield: $sid: $subfield.\n";
-  echo "Showing entry ". $display->entryLink($entry) ." from ". $isis->entries ." total entries.\n";
-  echo "Repetitions found: ". count($result[$field['name']]) .".\n";
-  echo "\n";
-  print_r($result[$field['name']]);
-  echo '
'; + $display->pre("Selected field: $fid: ". $field['name'] ."."); + $display->pre("Selected subfield: $sid: $subfield."); + $display->pre("Showing entry ". $display->entryLink($entry) ." from ". $isis->entries ." total entries."); + $display->pre("Repetitions found: ". count($result[$field['name']]) ."."); + $display->dump($result[$field['name']]); } $display->footer(); -- cgit v1.2.3