noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 17/20: After cloning a profil, show it and se


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 17/20: After cloning a profil, show it and select the default tab
Date: Sat, 24 Oct 2015 21:45:05 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 2c7cf2027563bfc4c862247ddeb1b1c09b0c4b3d
Author: Dany De Bontridder <address@hidden>
Date:   Sat Oct 24 22:17:06 2015 +0200

    After cloning a profil, show it and select the default tab
---
 include/profile.inc.php |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/include/profile.inc.php b/include/profile.inc.php
index 1ba3915..e1ace5e 100644
--- a/include/profile.inc.php
+++ b/include/profile.inc.php
@@ -145,7 +145,10 @@ if (isset($_POST['save_name']))
 //************************************
 if (isset($_POST['clone']))
 {
-    extract($_POST);
+    $p_id = HtmlInput::default_value_post("p_id", 0);
+    if ( $p_id == 0 || isNumber($p_id) == 0) {
+     throw new Exception (_('Argument'));
+    }
     try
     {
         $cn->start();
@@ -167,12 +170,17 @@ if (isset($_POST['clone']))
                         where pm_id_dep is null and p_id=$1",array($new_id));
         $cn->commit();
         $p_id=$new_id;
+        $_POST['p_id'] = $new_id;
+        $_GET['p_id'] = $new_id;
+        $_REQUEST['p_id'] = $new_id;
+        $_POST['tab']="profile_gen_div";
     }
     catch (Exception $exc)
     {
         echo alert($exc->getMessage());
         $cn->rollback();
     }
+
 }
 //************************************
 // Delete



reply via email to

[Prev in Thread] Current Thread [Next in Thread]