Works on product canvas and templates
This commit is contained in:
parent
e5122829bd
commit
8d40f1ee23
@ -127,11 +127,10 @@ if ($_POST["action"] == 'add' && ($user->rights->produit->creer || $user->rights
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST["canvas"]) && file_exists('canvas/'.$_POST["canvas"].'/product.'.$_POST["canvas"].'.class.php') )
|
if (!empty($_POST["canvas"]))
|
||||||
{
|
{
|
||||||
$classname = 'Product'.ucfirst($_POST["canvas"]);
|
$canvas = new Canvas($db,$user);
|
||||||
include_once('canvas/'.$_POST["canvas"].'/product.'.$_POST["canvas"].'.class.php');
|
$product = $canvas->load_canvas('product',$_GET["canvas"]);
|
||||||
$product = new $classname($db);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -221,11 +220,10 @@ if ($_POST["action"] == 'update' && ($user->rights->produit->creer || $user->rig
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!empty($_POST["canvas"]) && file_exists('canvas/'.$_POST["canvas"].'/product.'.$_POST["canvas"].'.class.php'))
|
if (!empty($_POST["canvas"]))
|
||||||
{
|
{
|
||||||
$classname = 'Product'.ucfirst($_POST["canvas"]);
|
$canvas = new Canvas($db,$user);
|
||||||
include_once('canvas/'.$_POST["canvas"].'/product.'.$_POST["canvas"].'.class.php');
|
$product = $canvas->load_canvas('product',$_GET["canvas"]);
|
||||||
$product = new $classname($db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($product->fetch($_POST["id"]))
|
if ($product->fetch($_POST["id"]))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user