Commit b2b8fb1d authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Count both inititing and accepting friends (Bug 1348428)" into 1.9_STABLE

parents 5e14bb30 27b126ee
......@@ -334,10 +334,11 @@ class PluginArtefactInternal extends PluginArtefact {
$meta->completed = $count[0]->completed;
break;
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;
break;
default:
......
Markdown is supported
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