Commit 8ddc4f41 authored by Peter Kiraly's avatar Peter Kiraly

Issue #2617562: Applying securty patch.

parent 90cf837b
......@@ -1486,8 +1486,8 @@ function xc_ncip_provider_menu() {
'title callback' => 'xc_ncip_provider_title',
'title arguments' => array(4),
'description' => 'Renew an item',
'page callback' => 'xc_ncip_provider_renew_item_page',
'page arguments' => array(4, 6, 7, 8, 9),
'page callback' => 'drupal_get_form',
'page arguments' => array('xc_ncip_provider_renew_item_form', 4, 6, 7, 8, 9),
'access arguments' => array(ADMINISTER_NCIP_PROVIDERS),
'type' => MENU_CALLBACK,
);
......@@ -3797,6 +3797,46 @@ function xc_ncip_provider_check_in_item($ncip_provider_id, $item_id, $agency_id
}
}
function xc_ncip_provider_renew_item_form($form, &$form_state, $ncip_provider, $user_id, $item_id,
$desired_date_for_return = NULL, $shipping_information_address = NULL) {
$form['ncip_provider'] = array(
'#type' => 'value',
'#value' => $ncip_provider,
);
$form['user_id'] = array(
'#type' => 'value',
'#value' => $user_id,
);
$form['item_id'] = array(
'#type' => 'value',
'#value' => $item_id,
);
$form['desired_date_for_return'] = array(
'#type' => 'value',
'#value' => $desired_date_for_return,
);
$form['shipping_information_address'] = array(
'#type' => 'value',
'#value' => $shipping_information_address,
);
return confirm_form($form,
t('Are you sure you want to renew this item?'),
'admin/xc/ncip/provider', '', t('Renew'), t('Cancel'));
}
function xc_ncip_provider_renew_item_form_submit($form, &$form_state) {
$ncip_provider = $form_state['values']['ncip_provider'];
$user_id = $form_state['values']['user_id'];
$item_id = $form_state['values']['item_id'];
$desired_date_for_return = $form_state['values']['desired_date_for_return'];
$shipping_information_address = $form_state['values']['shipping_information_address'];
xc_ncip_provider_renew_item_page($ncip_provider, $user_id, $item_id,
$desired_date_for_return, $shipping_information_address);
}
/**
* Renew item page
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment