Referral Site Deleting

Steve McKenzie - April 11, 2007 - 23:44
Project:Referral Links
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Steve McKenzie
Status:needs work
Description

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

#1

Walt Esquivel - February 26, 2008 - 14:57

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

#2

Farreres - July 5, 2008 - 08:12

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

#3

Farreres - July 5, 2008 - 10:58

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;
}

#4

Farreres - July 5, 2008 - 10:59
Status:active» reviewed & tested by the community

#5

Farreres - July 5, 2008 - 11:01
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.

 
 

Drupal is a registered trademark of Dries Buytaert.