Browse code

Fixed complaint listing

Jaidyn Lev authored on 2018-11-20 21:24:04
Showing 3 changed files
... ...
@@ -29,7 +29,7 @@ $user_complaints = complaints_with_ee($complaints, $user);
29 29
 
30 30
 <?php
31 31
 
32
-echo html_complaints_list($user_complaints);
32
+echo html_complaints_list($user_complaints, $users, $companies);
33 33
 
34 34
 ?>
35 35
 
... ...
@@ -119,7 +119,7 @@ function complaints_with_ee($string, $username)
119 119
 }
120 120
 
121 121
 
122
-function html_complaints_list($complaints)
122
+function html_complaints_list($complaints, $users, $companies)
123 123
 {
124 124
 	$stack = "";
125 125
 
... ...
@@ -127,6 +127,8 @@ function html_complaints_list($complaints)
127 127
 	for ($i=0;$i < count($complaints);$i++)
128 128
 	{
129 129
 		$complaint = $complaints[$i];
130
+		$er_name = complaint_er_name($complaint, $users);
131
+		$ee_name = complaint_ee_name($complaint, $companies);
130 132
 		$stack = $stack
131 133
 			. "<p class='complaint'><a href='old/?q="
132 134
 			. complaint_title($complaint)
... ...
@@ -136,11 +138,11 @@ function html_complaints_list($complaints)
136 138
 
137 139
 		$stack = $stack
138 140
 			. "<p><b>Complaintant:</b> "
139
-			. complaint_er_name($complaint)
141
+			. $er_name
140 142
 			. "</p>\n";
141 143
 		$stack = $stack
142 144
 			. "<p><b>Complaintee:</b> "
143
-			. complaint_ee_name($complaint)
145
+			. $ee_name
144 146
 			. "</p>\n";
145 147
 		$stack = $stack
146 148
 			."</p><hr>\n";
... ...
@@ -31,7 +31,7 @@ $user_complaints = complaints_with_er($complaints, $user);
31 31
 
32 32
 <?php
33 33
 
34
-echo html_complaints_list($user_complaints);
34
+echo html_complaints_list($user_complaints, $users, $companies);
35 35
 
36 36
 ?>
37 37