summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Haug2006-07-05 00:02:19 (GMT)
committer Nathan Haug2006-07-05 00:02:19 (GMT)
commitad4ccdc777e84a22d604002d426261888e070037 (patch)
tree9e327c35585ca9daef9fcc6794af87264e84df1d
parent73618d3720c14ab76a024997e607e42c73019d84 (diff)
Add/Remove user callback arguments corrected under PHP5. Thanks greggles. Issue #64053.
-rw-r--r--buddylist.module6
1 files changed, 2 insertions, 4 deletions
diff --git a/buddylist.module b/buddylist.module
index 12c56e1..dd5ac44 100644
--- a/buddylist.module
+++ b/buddylist.module
@@ -75,8 +75,8 @@ function buddylist_menu($may_cache) {
// RSS feeds
$links[] = array('path' => 'buddylist/'. $id .'/buddies/recent/feed', 'title' => t('xml feed'), 'access' => user_access('view buddy lists'), 'callback' => 'buddylist_buddyfeed', 'type' => MENU_CALLBACK, 'callback arguments' => array($id));
// other callbacks
- $links[] = array('path' => 'buddy/add', 'title' => t('add to %buddylist', buddylist_translation()), 'access' => user_access('maintain buddy list'), 'callback' => 'buddylist_addbuddy', 'callback arguments' => arg(2), 'type' => MENU_CALLBACK);
- $links[] = array('path' => 'buddy/delete', 'title' => t('delete from %buddylist', buddylist_translation()), 'access' => user_access('maintain buddy list'), 'callback' => 'buddylist_deletebuddy', 'callback arguments' => arg(2), 'type' => MENU_CALLBACK);
+ $links[] = array('path' => 'buddy/add', 'title' => t('add to %buddylist', buddylist_translation()), 'access' => user_access('maintain buddy list'), 'callback' => 'buddylist_addbuddy', 'type' => MENU_CALLBACK);
+ $links[] = array('path' => 'buddy/delete', 'title' => t('delete from %buddylist', buddylist_translation()), 'access' => user_access('maintain buddy list'), 'callback' => 'buddylist_deletebuddy', 'type' => MENU_CALLBACK);
}
return $links;
}
@@ -711,7 +711,6 @@ function buddylist_buddyfeed($uid) {
function buddylist_addbuddy($uid) {
global $user;
- $uid = (int)$uid;
$buddy = user_load(array('uid' => $uid));
if (empty($buddy->name)) {
@@ -749,7 +748,6 @@ function buddylist_addbuddy_confirm_submit($form_id, $form_values) {
*/
function buddylist_deletebuddy($uid) {
global $user;
- $uid = (int)$uid;
$buddy = user_load(array('uid' => $uid));
if (empty($buddy->name)) {