CustomActions : Added disableOnSuccessMsg parameter
authorBenjamin Renard <brenard@easter-eggs.com>
Fri, 20 May 2011 16:11:42 +0000 (18:11 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Fri, 20 May 2011 16:15:13 +0000 (18:15 +0200)
public_html/custom_action.php

index 18edce4..f1e3dc3 100644 (file)
@@ -42,11 +42,13 @@ if(LSsession :: startLSsession()) {
                 $objectname=$object -> getDisplayName();
                 $GLOBALS['Smarty'] -> assign('pagetitle',$title.' : '.$objectname);
                 if ($config['function']($object)) {
-                  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'])));
+                  if ($config['disableOnSuccessMsg']!=true) {
+                    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'])));
+                    }
                   }
                   LSsession :: redirect('view.php?LSobject='.$_GET['LSobject'].'&refresh');
                 }