Currently broken. dunno what i just did to break it. will fix ASAP.

Comments

Walt Esquivel’s picture

Is this critical issue still active, or has it been fixed and simply not updated here?

Much appreciated, as your module sounds like a fine one and something I could use on my site.

Best,
Walt

Farreres’s picture

I have this module installed in my site, and deleting a referral is not working. Please correct it.

Farreres’s picture

Found the error. Two array calls are missing in hook_menu. I copy the corrected hook_menu function. Please, someone move it to cvs and generate a new release with the corrected bug.


/**
* Implementation of hook_menu().
*/
function referral_links_menu($may_cache) {
global $user;
$items = array();

$items[] = array(
'path' => 'admin/referral_links',
'title' => t('Referrals links'),
'description' => t('View referral stats.'),
'callback' => 'referral_links_admin',
'access' => user_access('access referral links stats'),
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'admin/referral_links/delete/site',
'title' => t('Referral links'),
'callback' => 'drupal_get_form',
'callback arguments' => array('referral_links_site_delete_confirm'),
'access' => user_access('administer referral links'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/settings/referral_links',
'title' => t('Referral links'),
'description' => t('Manage referral links.'),
'callback' => 'drupal_get_form',
'callback arguments' => array('referral_links_settings_form'),
'access' => user_access('administer referral links'),
'type' => MENU_NORMAL_ITEM,
);

// Display personal user tabs for referral links sites.
if (arg(0) == 'user' && is_numeric(arg(1))) {
$uid = arg(1);
$sites = db_result(db_query("SELECT COUNT(rid) FROM {referral_links_sites} WHERE uid = %d", $uid));
if ($sites > 0 && ($user->uid == $uid || user_access('administer referral links'))) {
$items[] = array(
'path' => 'user/'. $uid .'/referral_links',
'title' => t('Referral Sites'),
'callback' => 'referral_links_user_stats',
'callback arguments' => array($uid),
'access' => user_access('access own referral links stats'),
'type' => MENU_LOCAL_TASK,
);
}
}

return $items;
}

Farreres’s picture

Status: Active » Reviewed & tested by the community
Farreres’s picture

Status: Reviewed & tested by the community » Needs work

Hmm, the form is not generating an error, but it doesn't actually delete anything :) The bug is not yet corrected.