CustomActions : Added disableOnSuccessMsg parameter

This commit is contained in:
Benjamin Renard 2011-05-20 18:11:42 +02:00
parent 62bb6c55a1
commit 5d911be334

View file

@ -42,11 +42,13 @@ if(LSsession :: startLSsession()) {
$objectname=$object -> getDisplayName(); $objectname=$object -> getDisplayName();
$GLOBALS['Smarty'] -> assign('pagetitle',$title.' : '.$objectname); $GLOBALS['Smarty'] -> assign('pagetitle',$title.' : '.$objectname);
if ($config['function']($object)) { if ($config['function']($object)) {
if ($config['onSuccessMsgFormat']) { if ($config['disableOnSuccessMsg']!=true) {
LSsession :: addInfo(getFData($config['onSuccessMsgFormat'],$objectname)); if ($config['onSuccessMsgFormat']) {
} LSsession :: addInfo(getFData($config['onSuccessMsgFormat'],$objectname));
else { }
LSsession :: addInfo(getFData(_('The custom action %{customAction} have been successfully execute on %{objectname}.'),array('objectname' => $objectname,'customAction' => $_GET['customAction']))); else {
LSsession :: addInfo(getFData(_('The custom action %{customAction} have been successfully execute on %{objectname}.'),array('objectname' => $objectname,'customAction' => $_GET['customAction'])));
}
} }
LSsession :: redirect('view.php?LSobject='.$_GET['LSobject'].'&refresh'); LSsession :: redirect('view.php?LSobject='.$_GET['LSobject'].'&refresh');
} }