Gábor says, "Two of the drupal.org custom modules are not hosted under drupalorg module and are therefore not open source." This patch merges one of them (ircnick.module) into drupalorg.module.

CommentFileSizeAuthor
drupalorg_irc.patch1.02 KBchristefano

Comments

gábor hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Indeed, the full source code of irnick module on drupal.org as of now is (copied from file system):

//

/**
 * @file Custom module for drupal.org to search for users based on IRC
 * nick (which is an optional profile field).
 */

/**
 * Implementation of hook_search().
 */
function ircnick_search($op = 'search', $keys = NULL) {
  switch ($op) {
    case 'name':
      if (user_access('access user profiles')) {
        return t('IRC nicks');
      }
    case 'search':
      if (user_access('access user profiles')) {
        $find = array();
        // Replace wildcards with MySQL/PostgreSQL wildcards.
        $keys = preg_replace('!\*+!', '%', $keys);
        $result = pager_query("SELECT u.name, u.uid FROM {profile_values} pv INNER JOIN {users} u 
ON pv.uid = u.uid WHERE pv.fid = 35 AND LOWER(pv.value) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys)
;
        while ($account = db_fetch_object($result)) {
          $find[] = array('title' => $account->name, 'link' => url('user/'. $account->uid, NULL, N
ULL, TRUE));
        }
        return $find;
      }
  }
}

The code in the patch is identical and given that we are doing a highly custom query using profile field 35, this is not something a general purpose module would do, so drupalorg module is the place for this code. Should be ready to commit.

Deploy by disabling ircnick module and updating drupalorg module after the commit.

kbahey’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Can someone with CVS access refresh from HEAD, and delete the old code?

gábor hojtsy’s picture

@kbahey: Being a co-maintainer on this project I could have committed this one. The reason I did not do it is that if someone updates from CVS without reading this issue, we end up two modules providing the IRC nick search, which will collide. Or if you disable the ircnick module now, and nobody updates for a week, we end up with no nick search for a week. So I was looking for a coordinated commit / update / remove action, and would suggest / encourage doing that in the future in such cases, when deployment the right way is necessary.

Or did I miss something?

kbahey’s picture

I did not know you are a co-maintainer.

I will ping killes about this issue, so he would remove ircnick and refresh from the repo.

kbahey’s picture

Status: Fixed » Reviewed & tested by the community

Actually, I backed it out.

So we are back to the same situation, pending someone with access to do it all.

gábor hojtsy’s picture

I've requested getting credentials to be able to deploy drupalorg module changes, and pending on a little change by nnewton to be able to. I have other tasks in the pipeline which I'd like to complete, and pestering someone to be able to coordinate at all times is not any great.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed and deployed on drupal.org!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

  • Commit 21333ad on 5.x-1.x, 6.x-1.x, 6.x-3.x, 7.x-3.x-dev by kbahey:
    #327070 by christefano, merge ircnick module with drupalorg.module
    
    
  • Commit 9cedd3b on 5.x-1.x, 6.x-1.x, 6.x-3.x, 7.x-3.x-dev by Gábor Hojtsy:
    #327070 by christefano: merge the custom irnick module, which was only a...