This commit is contained in:
Laurent Destailleur 2012-03-31 15:42:33 +02:00
parent ea7e4c6f8a
commit c77bc5adf5
3 changed files with 11 additions and 10 deletions

View File

@ -424,6 +424,7 @@ else if ($id || $ref)
* @param DoliDb $db Database handler * @param DoliDb $db Database handler
* @param Object $object Object we want to see categories it can be classified into * @param Object $object Object we want to see categories it can be classified into
* @param int $typeid Type of category (0, 1, 2, 3) * @param int $typeid Type of category (0, 1, 2, 3)
* @param int $socid Id thirdparty
* @return int 0 * @return int 0
*/ */
function formCategory($db,$object,$typeid,$socid=0) function formCategory($db,$object,$typeid,$socid=0)

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 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 * This program is free software; you can redistribute it and/or modify
@ -20,15 +20,14 @@
/** /**
* \file htdocs/comm/mailing/class/mailing.class.php * \file htdocs/comm/mailing/class/mailing.class.php
* \ingroup mailing * \ingroup mailing
* \brief Fichier de la classe de gestion des mailings * \brief File of class to manage emailings module
*/ */
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php"); require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
/** /**
* \class Mailing * Class to manage emailings module
* \brief Classe permettant la gestion des mailings
*/ */
class Mailing extends CommonObject class Mailing extends CommonObject
{ {
@ -233,6 +232,8 @@ class Mailing extends CommonObject
* Load an object from its id and create a new one in database * Load an object from its id and create a new one in database
* *
* @param int $fromid Id of object to clone * @param int $fromid Id of object to clone
* @param int $option1 1=Copy content, 0=Forget content
* @param int $option2 Not used
* @return int New id of clone * @return int New id of clone
*/ */
function createFromClone($fromid,$option1,$option2) function createFromClone($fromid,$option1,$option2)
@ -251,14 +252,13 @@ class Mailing extends CommonObject
$object->statut=0; $object->statut=0;
// Clear fields // Clear fields
$object->titre=$langs->trans("CopyOf").' '.$object->titre; $object->titre=$langs->trans("CopyOf").' '.$object->titre.' '.dol_print_date(dol_now());
// If no option copy content // If no option copy content
if (empty($option1)) if (empty($option1))
{ {
// Clear values // Clear values
$object->nbemail = 0; $object->nbemail = 0;
$object->titre = $langs->trans("Draft").' '.mktime();
$object->sujet = ''; $object->sujet = '';
$object->body = ''; $object->body = '';
$object->bgcolor = ''; $object->bgcolor = '';

View File

@ -1,13 +1,13 @@
<?php <?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
** *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or