Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,10 @@ public function remove($linkId)
{
// Update the link counts for the terms.
$query->clear()
->update($db->quoteName('#__finder_terms', 't'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please revert the changes to use the shortcuts? When reading the code the full method names are clearer than the shortcuts, especially to newer contributors (IIRC at one point we tried standardizing the repo to use the full names over the shortcuts, or maybe I'm mis-remembering).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readability vs laziness, readability should win ;)
done

->join('INNER', $db->quoteName('#__finder_links_terms' . dechex($i), 'm') . ' ON m.term_id = t.term_id')
->set('t.links = t.links - 1')
->where($db->quoteName('m.link_id') . ' = ' . (int) $linkId);
->update($db->qn('#__finder_terms', 't'))
->join('INNER', $db->qn('#__finder_links_terms' . dechex($i), 'm') . ' ON ' . $db->qn('m.term_id') . ' = ' . $db->qn('t.term_id'))
->set($db->qn('links') . ' = ' . $db->qn('links') . ' - 1')
->where($db->qn('m.link_id') . ' = ' . (int) $linkId);
$db->setQuery($query)->execute();

// Remove all records from the mapping tables.
Expand Down