foreveralone

foreveralone Commit Details


Date:2016-03-06 18:01:03 (8 years 9 months ago)
Author:Natalie Adams
Branch:master
Commit:1e9e38bb0b1cff7ff59fd36d7d34517d3802f0b7
Parents: 543ef6e9d8db330f2647bfd5aff367a1f9864e07
Message:Issue 137: Show what interests were matched on

Changes:

File differences

web/application/controllers/main.php
161161
162162
163163
164
165
166
167
168
169
170
171
172
173
174
175
176
164177
165178
166179
......
190203
191204
192205
193
206
207
208
209
210
211
194212
195213
196214
$this->session->waiting = 0;
$session->save();
$this->session->save();
$interests = implode(", ", $interestWeight);
$message1 = new \application\models\Messages();
$message1->user_from = -1;
$message1->user_to = $session->id;
$message1->message = "Matched on interests -> $interests";
$message1->save();
$message2 = new \application\models\Messages();
$message2->user_from = -1;
$message2->user_to = $this->session->id;
$message2->message = "Matched on interests -> $interests";
$message2->save();
break;
}
}
$messages = \application\models\Messages::getByField("user_to", $this->session->id);
$return = [];
foreach($messages as $message) {
$return[] = $message->user_from . ": " . $message->message;
if ($message->user_from == -1) {
$return[] = "Fran: " . $message->message;
} else {
$return[] = $message->user_from . ": " . $message->message;
}
$message->delete();
}

Archive Download the corresponding diff file

Branches

Tags

Number of commits:
Page rendered in 0.05589s using 20 queries.