reply: identify textual journal columns
[minimedit.git] / widget / reply.php
index ab04137493b770a94e3fb5f59c948bac1d9aec64..879b53d248317faa662e9ae66184260fa84188ce 100644 (file)
@@ -2,7 +2,9 @@
 global $User, $Db, $Issue;
 require_once 'database.inc.php';
 
-print '<h3>Reacties</h3>'."\n";
+$journalcol = [
+       'assign' => 'Toegewezen aan',
+];
 
 if ($_POST) {
        try {
@@ -20,7 +22,7 @@ if ($_POST) {
 
                if (isset($Issue)) {
                        $row = [];
-                       foreach (['assign'] as $col) {
+                       foreach (array_keys($journalcol) as $col) {
                                if (!isset($_POST[$col])) continue;
                                $row[$col] = $_POST[$col] ?: NULL;
                        }
@@ -77,7 +79,7 @@ if ($User) {
                        '<label for="%s">%s:</label> '
                        . '<input id="%1$s" name="%1$s" value="%s" />'."\n",
                        'assign',
-                       'Toegewezen aan',
+                       $journalcol['assign'],
                        htmlspecialchars($Issue->assign ?? '')
                );
                printf(