[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
- [Noalyss-commit] [noalyss] 07/20: is_local_admin is deprecated and return always false, (continued)
- [Noalyss-commit] [noalyss] 07/20: is_local_admin is deprecated and return always false, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 02/20: Task #1187 - Problème avec la CA - totaux inégaux #0001187 : rounded problem, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 08/20: security, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 09/20: security, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 05/20: translation, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 10/20: security, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 12/20: protect variable, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 11/20: security, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 13/20: protect variable, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 14/20: Round value , due to the 4 dec in Sale and Expense, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 17/20: After cloning a profil, show it and select the default tab,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 15/20: Menu : fix problem when cloning, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 18/20: After cloning a profil, show it and select the default tab, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 19/20: Menu : highlight selected menu, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 20/20: Menu : highlight selected menu, Dany De Bontridder, 2015/10/24
- [Noalyss-commit] [noalyss] 16/20: Security, Dany De Bontridder, 2015/10/24