Attached is a first draft of a patch required to implement the 'Most active' project blocks in the Mark Boulton designs.

CommentFileSizeAuthor
apache-solr-support.patch1.18 KBdries

Comments

dww’s picture

Status: Active » Needs work

A)

+  // TODO: ideally we'd be able to return statistics per branch but that 
+  //       informaiton is not available in the CVS tables.

Sure it is. What do you think the {cvs_files}.branch field is about? ;)

B) $interval = 60 * 60 * 24 * 30 * 2; // 2 months

Seems like a nice thing to use a variable for so it's possible to alter this behavior without changing the code.

C) Probably wise to ensure the node you're indexing is a project that has CVS configured at all before doing any of the rest of this. For example, add this to the top of the function:

if (empty($node->cvs['directory'])) {
  return;
}

That'll help with the "we need to optimize this" part too, since then you're only doing the nasty query on project nodes, not every node we try to index.

aclight’s picture

Even better would be using project_use_cvs() instead of directly inspecting $node->cvs['directory'], no?

lisarex’s picture

Linking this from the Redesign project #661680: Meta issue for CVS integration because this issue was tagged 'drupal.org redesign'

drumm’s picture

Status: Needs work » Closed (won't fix)

Moving to git will deprecate this module, so it is not worth adding features.