Use in_array(...) instead of array_key_exists(...) to display "Geht nicht" correctly.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 21 Nov 2019 21:58:07 +0000 (21:58 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 21 Nov 2019 21:58:07 +0000 (21:58 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrreport/trunk@2838 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrreport_body.php

index 88950b9aad333e9acdbee65a52265b4e5326fc9a..3136dadc2f3691316758db2404f4afa736432618 100644 (file)
@@ -453,7 +453,7 @@ function wrReportTableRowRender($table, $row, $format, $showActions, $parser) {
 
        // $row['condition']
        $condition_text = '---';
 
        // $row['condition']
        $condition_text = '---';
-       if (array_key_exists($row['condition'], WrReport::$wrConditions)) $condition_text = WrReport::getWrConditionText($row['condition']);
+       if (in_array($row['condition'], WrReport::$wrConditions)) $condition_text = WrReport::getWrConditionText($row['condition']);
        $td = $tr->appendElement('td');
        if ($row['delete_date']) $td->appendElement('em')->appendText(wfMessage('wrreport-deletereport-deleted')->text());
        else $td->appendText($condition_text);
        $td = $tr->appendElement('td');
        if ($row['delete_date']) $td->appendElement('em')->appendText(wfMessage('wrreport-deletereport-deleted')->text());
        else $td->appendText($condition_text);
@@ -824,7 +824,7 @@ class WrReport {
                                else $date = strftime('%d.%m.', $date_report);
 
                                $td = $tr->appendElement('td');
                                else $date = strftime('%d.%m.', $date_report);
 
                                $td = $tr->appendElement('td');
-                               if (array_key_exists($condition, WrReport::$wrConditions)) {
+                               if (in_array($condition, WrReport::$wrConditions)) {
                                        $td->appendElement('a', array('href' => $title->getLocalURL() . '#' . Sanitizer::escapeIdForLink(wfMessage('wrreport-reports-sectionname'))))->appendText(WrReport::getWrConditionText($condition));
                                        $td->appendText(' ');
                                        $small = $td->appendElement('small');
                                        $td->appendElement('a', array('href' => $title->getLocalURL() . '#' . Sanitizer::escapeIdForLink(wfMessage('wrreport-reports-sectionname'))))->appendText(WrReport::getWrConditionText($condition));
                                        $td->appendText(' ');
                                        $small = $td->appendElement('small');