Commit 27b126ee authored by Robert Lyon's avatar Robert Lyon
Browse files

Count both inititing and accepting friends (Bug 1348428)

When counting 'make friends' towards progress bar

Change-Id: I50574ac5339b07d89e194f915f6feeded91e28fd
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
parent 30a3e92f
......@@ -334,10 +334,11 @@ class PluginArtefactInternal extends PluginArtefact {
$meta->completed = $count[0]->completed;
case 'makefriend':
// We count make friend as either initiating or accepting a friendship
$sql = "SELECT COUNT(*) AS completed
FROM {usr_friend}
WHERE usr1 = ?";
$count = get_records_sql_array($sql, array($USER->get('id')));
WHERE usr1 = ? OR usr2 = ?";
$count = get_records_sql_array($sql, array($USER->get('id'), $USER->get('id')));
$meta->completed = $count[0]->completed;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment