function subscriptions_arg in Subscriptions 6
Same name and namespace in other branches
- 7 subscriptions.module \subscriptions_arg()
- 2.0.x subscriptions.module.old.php \subscriptions_arg()
Return arg($index) in the proper way.
14 calls to subscriptions_arg()
- subscriptions_blog_ui_blog_form in ./
subscriptions_blog_ui.module - Returns the blog subscription form.
- subscriptions_content_mail_edit_tokens_list in ./
subscriptions_content.module - Implementation of hook_mail_edit_tokens_list().
- subscriptions_content_type_form in ./
subscriptions_content.module - Build the Content Types subscriptions form at user/UID/subscriptions/type.
- subscriptions_form_user_profile_form_alter in ./
subscriptions.module - Implementation of hook_form_alter() for the user/uid/edit form.
- subscriptions_init in ./
subscriptions.module - Implementation of hook_init().
File
- ./
subscriptions.module, line 726 - Subscriptions module.
Code
function subscriptions_arg($index, $member_name = FALSE) {
if (strpos($_GET['q'], 's/del') === 0) {
return arg($index);
}
$mgi = menu_get_item();
$arg = NULL;
if (isset($mgi['map'][$index])) {
$arg = $mgi['map'][$index];
if ($member_name) {
if (is_object($arg) && isset($arg->{$member_name})) {
$arg = $arg->{$member_name};
}
else {
$arg = NULL;
}
}
}
return $arg;
}