Futher improved the redirect option to use return and stack the return path to take the user back to the original area from where they clicked away.
This commit is contained in:
@ -53,7 +53,8 @@ class JFormFieldLibraries extends JFormFieldList
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
'id' => 'int',
|
||||
'view' => 'word'
|
||||
'view' => 'word',
|
||||
'return' => 'base64'
|
||||
));
|
||||
// check if new item
|
||||
$ref = '';
|
||||
@ -63,6 +64,12 @@ class JFormFieldLibraries extends JFormFieldList
|
||||
// only load referal if not new item.
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
$refJ .= '&return=' . $_return;
|
||||
}
|
||||
$user = JFactory::getUser();
|
||||
// only add if user allowed to create library
|
||||
|
Reference in New Issue
Block a user