Fix: Var not defined

This commit is contained in:
Laurent Destailleur 2014-12-04 01:42:23 +01:00
parent b5d74372de
commit 0bc9ae25f0

View File

@ -44,6 +44,8 @@ $userid=GETPOST("userid","int");
$position=GETPOST("position","int"); $position=GETPOST("position","int");
$backtopage=GETPOST('backtopage','alpha'); $backtopage=GETPOST('backtopage','alpha');
$bookmark=new Bookmark($db);
/* /*
* Actions * Actions
@ -60,7 +62,6 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
exit; exit;
} }
$bookmark=new Bookmark($db);
if ($action == 'update') $bookmark->fetch($_POST["id"]); if ($action == 'update') $bookmark->fetch($_POST["id"]);
$bookmark->fk_user=$userid; $bookmark->fk_user=$userid;
$bookmark->title=$title; $bookmark->title=$title;
@ -120,6 +121,17 @@ llxHeader();
$form=new Form($db); $form=new Form($db);
$head = array();
$h=1;
$head[$h][0] = $_SERVER["PHP_SELF"].($bookmark->id?'id='.$bookmark->id:'');
$head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'card';
$h++;
$hselected='card';
if ($action == 'create') if ($action == 'create')
{ {
/* /*
@ -172,7 +184,6 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
/* /*
* Fact bookmark mode or visually edition * Fact bookmark mode or visually edition
*/ */
$bookmark=new Bookmark($db);
$bookmark->fetch($id); $bookmark->fetch($id);