Custom Action : Added redirectToObjectList parameter
authorBenjamin Renard <brenard@easter-eggs.com>
Thu, 15 Dec 2011 10:22:51 +0000 (11:22 +0100)
committerBenjamin Renard <brenard@easter-eggs.com>
Thu, 15 Dec 2011 10:22:51 +0000 (11:22 +0100)
public_html/custom_action.php

index 20f8234..ae55395 100644 (file)
@@ -50,7 +50,12 @@ if(LSsession :: startLSsession()) {
                       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');
+                  if ($config['redirectToObjectList']) {
+                    LSsession :: redirect('view.php?LSobject='.$_GET['LSobject'].'&refresh');
+                  }
+                  else {
+                    LSsession :: redirect('view.php?LSobject='.$_GET['LSobject'].'&dn='.$_GET['dn']);
+                  }
                 }
                 else {
                   LSerror :: addErrorCode('LSldapObject_31',array('objectname' => $objectname,'customAction' => $_GET['customAction']));