Fix: category type is missing after add or delete photo
This commit is contained in:
parent
f4eadf715c
commit
c9affcb8a2
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2005 <EFBFBD>ric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
@ -71,7 +71,7 @@ print '</tr>';
|
||||
print '<tr '.$bc[0].'><td>';
|
||||
print $langs->trans("Name").':</td><td><input class="flat" type="text" size="20" name="catname" value="' . $_POST['catname'] . '"/></td><td><input type="submit" class="button" value="'.$langs->trans ("Search").'"></td></tr>';
|
||||
/*
|
||||
// faire une rech dans une sous cat<EFBFBD>gorie uniquement
|
||||
// faire une rech dans une sous categorie uniquement
|
||||
print '<tr '.$bc[0].'><td>';
|
||||
print $langs->trans("SubCatOf").':</td><td>';
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -121,7 +121,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
*/
|
||||
if ($_GET['action'] == 'delete')
|
||||
{
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$c->id.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$c->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
@ -207,12 +207,12 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
if (! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/categories/photos.php?action=ajout_photo&id='.$c->id.'">';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/categories/photos.php?action=ajout_photo&id='.$c->id.'&type='.$type.'">';
|
||||
print $langs->trans("AddPhoto").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#">e';
|
||||
print '<a class="butActionRefused" href="#">';
|
||||
print $langs->trans("AddPhoto").'</a>';
|
||||
}
|
||||
}
|
||||
@ -226,10 +226,9 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
// Affiche formulaire upload
|
||||
$formfile=new FormFile($db);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/categories/photos.php?id='.$c->id,$langs->trans("AddPhoto"),1);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/categories/photos.php?id='.$c->id.'&type='.$type,$langs->trans("AddPhoto"),1);
|
||||
}
|
||||
|
||||
// Affiche photos
|
||||
// Affiche photos
|
||||
if ($_GET["action"] != 'ajout_photo')
|
||||
{
|
||||
@ -282,11 +281,11 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
// On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites
|
||||
if (!$obj['photo_vignette'] && eregi('(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$',$obj['photo']) && ($c->imgWidth > $maxWidth || $c->imgHeight > $maxHeight))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&action=addthumb&file='.urlencode($pdir.$viewfilename).'">'.img_refresh($langs->trans('GenerateThumb')).' </a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&action=addthumb&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">'.img_refresh($langs->trans('GenerateThumb')).' </a>';
|
||||
}
|
||||
if ($user->rights->categorie->creer)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&action=delete&file='.urlencode($pdir.$viewfilename).'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&action=delete&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">';
|
||||
print img_delete().'</a>';
|
||||
}
|
||||
if ($nbbyrow) print '</td>';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
Loading…
Reference in New Issue
Block a user