Browse code

Bugfix für Fußnoten

Bernd Wurst authored on13/01/2018 07:13:24
Showing3 changed files
... ...
@@ -192,7 +192,9 @@ function footnote($explaination)
192 192
         $footnotes = array();
193 193
     }
194 194
     $fnid = array_search($explaination, $footnotes);
195
-    if (!$fnid) {
195
+    DEBUG($footnotes);
196
+    if ($fnid === FALSE) {
197
+        DEBUG("Footnote »{$explaination}« is not in footnotes!");
196 198
         $footnotes[] = $explaination;
197 199
     }
198 200
     $fnid = array_search($explaination, $footnotes);
... ...
@@ -69,7 +69,7 @@ if ($messages) {
69 69
 <?php if ($footnotes) {
70 70
     echo '<div class="footnotes">';
71 71
     foreach ($footnotes as $num => $explaination) {
72
-       echo str_repeat('*', $num+1).': '.$explaination;
72
+       echo '<p>'.str_repeat('*', $num+1).': '.$explaination.'</p>';
73 73
     }
74 74
     echo '</div>';
75 75
 } ?>
... ...
@@ -64,7 +64,7 @@ if ($headline) {
64 64
 <?php if ($footnotes) {
65 65
     echo '<div class="footnotes">';
66 66
     foreach ($footnotes as $num => $explaination) {
67
-       echo str_repeat('*', $num+1).': '.$explaination;
67
+       echo '<p>'.str_repeat('*', $num+1).': '.$explaination.'</p>';
68 68
     }
69 69
     echo '</div>';
70 70
 } ?>