# WARNING: head commit changed in the meantime
Fix
This commit is contained in:
commit
300889f53a
15
build/README
15
build/README
@ -16,18 +16,20 @@ Note: Prerequisites to build tgz, debian, rpm package
|
||||
> apt-get install tar dpkg dpatch p7zip-full rpm zip
|
||||
|
||||
Note: Prerequisites to build autoexe DoliWamp package:
|
||||
> apt-get install wine q4wine
|
||||
> Launch "wine cmd" to check a drive Z: pointing to / exists.
|
||||
> Install InnoSetup
|
||||
For example by running isetup-5.3.9.exe (http://www.jrsoftware.org)
|
||||
> Install WampServer into "C:\Program Files\Wamp"
|
||||
For example by running wampserver2.2e-php5.4.3-httpd-2.4.2-mysql5.5.24-x64.exe (http://www.wampserver.com)
|
||||
> Install WampServer addon to have versions: Apache2.2.11, Mysql5.0.45, Php5.3.0
|
||||
For example by running WampServer2-APACHE2211.exe (http://www.wampserver.com)
|
||||
For example by running wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe (http://www.wampserver.com)
|
||||
> Install WampServer addon to have versions: Mysql5.0.45
|
||||
For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com)
|
||||
For example by running WampServer2-PHP530.exe (http://www.wampserver.com)
|
||||
> To build from Windows (running from makepack-dolibarr.pl script is however
|
||||
recommanded), open file build/exe/doliwamp.iss and click on button "Compile".
|
||||
The .exe file will be build into directory build.
|
||||
|
||||
> Add path to ISCC into PATH windows var:
|
||||
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
|
||||
|
||||
- To build a theme package, launch the script
|
||||
> perl makepack-dolibarrtheme.pl
|
||||
|
||||
@ -46,9 +48,6 @@ generated packages will not contains this "build" directory.
|
||||
|
||||
We can find in "build", following sub-directories:
|
||||
|
||||
* aps:
|
||||
To build APS package.
|
||||
|
||||
* debian:
|
||||
To build Debian package.
|
||||
|
||||
|
||||
@ -5,4 +5,4 @@ DOLIWAMP Package tools
|
||||
|
||||
This directory contains files used by makepack-dolibarr.pl
|
||||
script to build the all-in-on .EXE package DoliWamp, ready
|
||||
to be distributedt (for Windows).
|
||||
to be distributed (for Windows).
|
||||
@ -32,7 +32,7 @@ AppPublisherURL=https://www.nltechno.com
|
||||
AppSupportURL=https://www.dolibarr.org
|
||||
AppUpdatesURL=https://www.dolibarr.org
|
||||
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
|
||||
AppCopyright=Copyright (C) 2008-2018 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
|
||||
AppCopyright=Copyright (C) 2008-2019 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
|
||||
DefaultDirName=c:\dolibarr
|
||||
DefaultGroupName=Dolibarr
|
||||
;LicenseFile=COPYING
|
||||
|
||||
@ -1058,7 +1058,7 @@ if ($nboftargetok) {
|
||||
$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
|
||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n";
|
||||
$cmd= "ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
print "$cmd\n";
|
||||
$ret= `$cmd`;
|
||||
#print "$ret\n";
|
||||
|
||||
@ -1418,6 +1418,7 @@ class BookKeeping extends CommonObject
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
global $user;
|
||||
|
||||
$error = 0;
|
||||
$object = new BookKeeping($this->db);
|
||||
|
||||
@ -1432,6 +1433,7 @@ class BookKeeping extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result = $object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -1441,6 +1443,8 @@ class BookKeeping extends CommonObject
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error) {
|
||||
$this->db->commit();
|
||||
@ -1449,7 +1453,7 @@ class BookKeeping extends CommonObject
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
|
||||
return - 1;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -238,6 +238,8 @@ class Asset extends CommonObject
|
||||
$this->errors = $object->errors;
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -215,8 +215,7 @@ class Facturation
|
||||
$total_localtax1 = 0;
|
||||
$total_localtax2 = 0;
|
||||
|
||||
$tab=array();
|
||||
$tab = $_SESSION['poscart'];
|
||||
$tab = (! empty($_SESSION['poscart'])?$_SESSION['poscart']:array());
|
||||
|
||||
$tab_size=count($tab);
|
||||
for($i=0;$i < $tab_size;$i++)
|
||||
|
||||
@ -41,6 +41,8 @@ if ( $_SESSION['uid'] > 0 )
|
||||
$usertxt=GETPOST('user','',1);
|
||||
$err=GETPOST("err");
|
||||
|
||||
// Instantiate hooks of thirdparty module only if not already define
|
||||
$hookmanager->initHooks(array('cashdeskloginpage'));
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -51,6 +53,15 @@ $formproduct=new FormProduct($db);
|
||||
|
||||
$arrayofcss=array('/cashdesk/css/style.css');
|
||||
top_htmlhead('','',0,0,'',$arrayofcss);
|
||||
|
||||
// Execute hook getLoginPageOptions (for table)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
if (is_array($hookmanager->resArray) && ! empty($hookmanager->resArray)) {
|
||||
$morelogincontent = $hookmanager->resArray; // (deprecated) For compatibility
|
||||
} else {
|
||||
$morelogincontent = $hookmanager->resPrint;
|
||||
}
|
||||
?>
|
||||
|
||||
<body>
|
||||
@ -92,6 +103,24 @@ else
|
||||
<td><input name="pwdPassword" class="texte_login" type="password" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if (! empty($morelogincontent)) {
|
||||
if (is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
if ($format == 'table') {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $option;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $morelogincontent;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
|
||||
@ -45,8 +45,7 @@ $societe = new Societe($db);
|
||||
$societe->fetch($thirdpartyid);
|
||||
/** end add Ditto */
|
||||
|
||||
$tab=array();
|
||||
$tab = $_SESSION['poscart'];
|
||||
$tab = (! empty($_SESSION['poscart'])?$_SESSION['poscart']:array());
|
||||
|
||||
$tab_size=count($tab);
|
||||
if ($tab_size <= 0) print '<div class="center">'.$langs->trans("NoArticle").'</div><br>';
|
||||
|
||||
@ -490,8 +490,6 @@ class ActionComm extends CommonObject
|
||||
{
|
||||
global $db, $user, $langs, $conf, $hookmanager;
|
||||
|
||||
$this->context['createfromclone']='createfromclone';
|
||||
|
||||
$error=0;
|
||||
$now=dol_now();
|
||||
|
||||
@ -524,7 +522,8 @@ class ActionComm extends CommonObject
|
||||
}
|
||||
|
||||
// Create clone
|
||||
$result=$this->create($fuser);
|
||||
$this->context['createfromclone']='createfromclone';
|
||||
$result=$this->create($fuser);
|
||||
if ($result < 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
|
||||
@ -279,8 +279,6 @@ class Mailing extends CommonObject
|
||||
|
||||
$object=new Mailing($this->db);
|
||||
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -314,6 +312,7 @@ class Mailing extends CommonObject
|
||||
}
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -345,7 +344,6 @@ class Mailing extends CommonObject
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles ";
|
||||
$sql.= " WHERE fk_mailing = ".$fromid;
|
||||
|
||||
dol_syslog(get_class($this)."::createFromClone", LOG_DEBUG);
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
|
||||
@ -1222,31 +1222,30 @@ class Propal extends CommonObject
|
||||
|
||||
dol_include_once('/projet/class/project.class.php');
|
||||
|
||||
$this->context['createfromclone']='createfromclone';
|
||||
|
||||
$error=0;
|
||||
$now=dol_now();
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$object = new self($this->db);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
foreach($this->lines as $line)
|
||||
$line->fetch_optionals();
|
||||
|
||||
// Load dest object
|
||||
$clonedObj = clone $this;
|
||||
// Load source object
|
||||
$object->fetch($this->id);
|
||||
$object->fetch_lines();
|
||||
|
||||
$objsoc=new Societe($this->db);
|
||||
|
||||
// Change socid if needed
|
||||
if (! empty($socid) && $socid != $clonedObj->socid)
|
||||
if (! empty($socid) && $socid != $object->socid)
|
||||
{
|
||||
if ($objsoc->fetch($socid) > 0)
|
||||
{
|
||||
$clonedObj->socid = $objsoc->id;
|
||||
$clonedObj->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
|
||||
$clonedObj->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
|
||||
$clonedObj->fk_delivery_address = '';
|
||||
$object->socid = $objsoc->id;
|
||||
$object->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
|
||||
$object->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
|
||||
$object->fk_delivery_address = '';
|
||||
|
||||
/*if (!empty($conf->projet->enabled))
|
||||
{
|
||||
@ -1258,44 +1257,51 @@ class Propal extends CommonObject
|
||||
$clonedObj->fk_project = '';
|
||||
}
|
||||
}*/
|
||||
$clonedObj->fk_project = ''; // A cloned proposal is set by default to no project.
|
||||
$object->fk_project = ''; // A cloned proposal is set by default to no project.
|
||||
}
|
||||
|
||||
// reset ref_client
|
||||
$clonedObj->ref_client = '';
|
||||
$object->ref_client = '';
|
||||
|
||||
// TODO Change product price if multi-prices
|
||||
}
|
||||
else
|
||||
{
|
||||
$objsoc->fetch($clonedObj->socid);
|
||||
$objsoc->fetch($object->socid);
|
||||
}
|
||||
|
||||
$clonedObj->id=0;
|
||||
$clonedObj->ref='';
|
||||
$clonedObj->statut=self::STATUS_DRAFT;
|
||||
$object->id=0;
|
||||
$object->ref='';
|
||||
$object->statut=self::STATUS_DRAFT;
|
||||
|
||||
// Clear fields
|
||||
$clonedObj->user_author = $user->id;
|
||||
$clonedObj->user_valid = '';
|
||||
$clonedObj->date = $now;
|
||||
$clonedObj->datep = $now; // deprecated
|
||||
$clonedObj->fin_validite = $clonedObj->date + ($clonedObj->duree_validite * 24 * 3600);
|
||||
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $clonedObj->ref_client = '';
|
||||
$object->user_author = $user->id;
|
||||
$object->user_valid = '';
|
||||
$object->date = $now;
|
||||
$object->datep = $now; // deprecated
|
||||
$object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600);
|
||||
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = '';
|
||||
|
||||
// Create clone
|
||||
$result=$clonedObj->create($user);
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
$result=$object->create($user);
|
||||
if ($result < 0) $error++;
|
||||
else
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// copy internal contacts
|
||||
if ($clonedObj->copy_linked_contact($this, 'internal') < 0)
|
||||
if ($object->copy_linked_contact($this, 'internal') < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// copy external contacts if same company
|
||||
elseif ($this->socid == $clonedObj->socid)
|
||||
if ($this->socid == $object->socid)
|
||||
{
|
||||
if ($clonedObj->copy_linked_contact($this, 'external') < 0)
|
||||
if ($object->copy_linked_contact($this, 'external') < 0)
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@ -1312,13 +1318,13 @@ class Propal extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $clonedObj->id;
|
||||
return $object->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1066,8 +1066,6 @@ class Commande extends CommonOrder
|
||||
|
||||
$error=0;
|
||||
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get lines so they will be clone
|
||||
@ -1108,6 +1106,7 @@ class Commande extends CommonOrder
|
||||
$this->ref_client = '';
|
||||
|
||||
// Create clone
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
|
||||
|
||||
@ -280,8 +280,6 @@ class BankCateg // extends CommonObject
|
||||
|
||||
$object = new BankCateg($this->db);
|
||||
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -290,6 +288,7 @@ class BankCateg // extends CommonObject
|
||||
$object->statut = 0;
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result = $object->create($user);
|
||||
|
||||
// Other options
|
||||
|
||||
@ -951,8 +951,6 @@ class Facture extends CommonInvoice
|
||||
|
||||
$error=0;
|
||||
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
@ -962,8 +960,6 @@ class Facture extends CommonInvoice
|
||||
// Load source object
|
||||
$objFrom = clone $this;
|
||||
|
||||
|
||||
|
||||
// Change socid if needed
|
||||
if (! empty($socid) && $socid != $this->socid)
|
||||
{
|
||||
@ -1008,6 +1004,7 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
|
||||
// Create clone
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
else {
|
||||
|
||||
@ -404,8 +404,6 @@ class PaymentTerm // extends CommonObject
|
||||
|
||||
$object=new PaymentTerm($this->db);
|
||||
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -417,6 +415,7 @@ class PaymentTerm // extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -430,7 +429,7 @@ class PaymentTerm // extends CommonObject
|
||||
//{
|
||||
//}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
|
||||
@ -369,6 +369,7 @@ class Cchargesociales
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
$result = $object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -378,6 +379,8 @@ class Cchargesociales
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
@ -386,7 +389,7 @@ class Cchargesociales
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
|
||||
return - 1;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -459,8 +459,6 @@ class PaymentSocialContribution extends CommonObject
|
||||
|
||||
$object=new PaymentSocialContribution($this->db);
|
||||
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -472,6 +470,7 @@ class PaymentSocialContribution extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -488,7 +487,7 @@ class PaymentSocialContribution extends CommonObject
|
||||
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
|
||||
@ -2388,8 +2388,6 @@ class Contrat extends CommonObject
|
||||
|
||||
dol_include_once('/projet/class/project.class.php');
|
||||
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$error = 0;
|
||||
|
||||
$this->fetch($this->id);
|
||||
@ -2440,6 +2438,7 @@ class Contrat extends CommonObject
|
||||
}
|
||||
|
||||
// Create clone
|
||||
$clonedObj->context['createfromclone'] = 'createfromclone';
|
||||
$result = $clonedObj->create($user);
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
@ -2479,7 +2478,7 @@ class Contrat extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
unset($clonedObj->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error) {
|
||||
|
||||
@ -202,7 +202,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ! empty($permissiontoadd)
|
||||
{
|
||||
if ($object->id > 0)
|
||||
{
|
||||
// Because createFromClone modifies the object, we must clone it so that we can restore it later
|
||||
// Because createFromClone modifies the object, we must clone it so that we can restore it later if error
|
||||
$orig = clone $object;
|
||||
|
||||
$result=$object->createFromClone($user, $object->id);
|
||||
|
||||
@ -427,6 +427,7 @@ class Ctyperesource
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result = $object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -436,6 +437,8 @@ class Ctyperesource
|
||||
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
@ -444,7 +447,7 @@ class Ctyperesource
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
|
||||
return - 1;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -207,6 +207,8 @@ class EmailSenderProfile extends CommonObject
|
||||
$this->errors = $object->errors;
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -757,8 +757,6 @@ class Cronjob extends CommonObject
|
||||
|
||||
$object=new Cronjob($this->db);
|
||||
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -770,6 +768,7 @@ class Cronjob extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -782,10 +781,9 @@ class Cronjob extends CommonObject
|
||||
//if (! $error)
|
||||
//{
|
||||
|
||||
|
||||
//}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
|
||||
@ -419,8 +419,6 @@ class PaymentDonation extends CommonObject
|
||||
|
||||
$object=new PaymentDonation($this->db);
|
||||
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -432,6 +430,7 @@ class PaymentDonation extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -444,11 +443,9 @@ class PaymentDonation extends CommonObject
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
|
||||
@ -732,6 +732,7 @@ class EcmFiles extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result = $object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -741,6 +742,8 @@ class EcmFiles extends CommonObject
|
||||
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -247,6 +247,8 @@ class EmailCollectorAction extends CommonObject
|
||||
$this->errors = $object->errors;
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -222,6 +222,8 @@ class EmailCollectorFilter extends CommonObject
|
||||
$this->errors = $object->errors;
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -315,8 +315,6 @@ class ExpenseReport extends CommonObject
|
||||
|
||||
if (empty($fk_user_author)) $fk_user_author = $user->id;
|
||||
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
@ -339,6 +337,7 @@ class ExpenseReport extends CommonObject
|
||||
$this->date_validation = '';
|
||||
|
||||
// Create clone
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
|
||||
|
||||
@ -421,8 +421,6 @@ class PaymentExpenseReport extends CommonObject
|
||||
|
||||
$object=new PaymentExpenseReport($this->db);
|
||||
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -434,6 +432,7 @@ class PaymentExpenseReport extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -446,11 +445,9 @@ class PaymentExpenseReport extends CommonObject
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
|
||||
@ -1118,8 +1118,6 @@ class Fichinter extends CommonObject
|
||||
|
||||
$error=0;
|
||||
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
@ -1158,6 +1156,7 @@ class Fichinter extends CommonObject
|
||||
$this->ref_client = '';
|
||||
|
||||
// Create clone
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
|
||||
|
||||
@ -1417,8 +1417,6 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$error=0;
|
||||
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -1439,6 +1437,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$this->date_approve2 = '';
|
||||
|
||||
// Create clone
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
|
||||
|
||||
@ -496,6 +496,7 @@ class CommandeFournisseurDispatch extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -508,9 +509,10 @@ class CommandeFournisseurDispatch extends CommonObject
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@ -2489,8 +2489,6 @@ class FactureFournisseur extends CommonInvoice
|
||||
|
||||
$object=new FactureFournisseur($this->db);
|
||||
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -2521,6 +2519,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
}
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -2533,8 +2532,6 @@ class FactureFournisseur extends CommonInvoice
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
@ -602,8 +602,6 @@ Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of u
|
||||
Module2800Desc=FTP Client
|
||||
Module2900Name=GeoIPMaxmind
|
||||
Module2900Desc=GeoIP Maxmind conversions capabilities
|
||||
Module3100Name=Skype
|
||||
Module3100Desc=Add a Skype button to cards for users/third parties/contacts/members
|
||||
Module3200Name=Unalterable Archives
|
||||
Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries.
|
||||
Module4000Name=HRM
|
||||
|
||||
@ -289,6 +289,8 @@ class MyObject extends CommonObject
|
||||
$this->errors = $object->errors;
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -338,8 +338,6 @@ class Productbatch extends CommonObject
|
||||
|
||||
$object=new Productbatch($this->db);
|
||||
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -351,6 +349,7 @@ class Productbatch extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -363,7 +362,6 @@ class Productbatch extends CommonObject
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
@ -907,8 +907,6 @@ class Productcustomerprice extends CommonObject
|
||||
|
||||
$object = new Productcustomerprice($this->db);
|
||||
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -920,6 +918,7 @@ class Productcustomerprice extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
$result = $object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -929,6 +928,7 @@ class Productcustomerprice extends CommonObject
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
@ -582,6 +582,7 @@ class Propalmergepdfproduct extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
$result=$object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -594,9 +595,10 @@ class Propalmergepdfproduct extends CommonObject
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@ -247,6 +247,8 @@ class Inventory extends CommonObject
|
||||
$this->errors = $object->errors;
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -454,6 +454,7 @@ class Productlot extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result = $object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -463,6 +464,8 @@ class Productlot extends CommonObject
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -443,6 +443,7 @@ class ProductStockEntrepot extends CommonObject
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result = $object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -452,6 +453,8 @@ class ProductStockEntrepot extends CommonObject
|
||||
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -269,6 +269,8 @@ class CompanyPaymentMode extends CommonObject
|
||||
$this->errors = $object->errors;
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -240,6 +240,8 @@ class SocieteAccount extends CommonObject
|
||||
$this->errors = $object->errors;
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -1176,6 +1176,7 @@ class SupplierProposal extends CommonObject
|
||||
$this->ref = $modSupplierProposal->getNextValue($objsoc,$this);
|
||||
|
||||
// Create clone
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
|
||||
@ -1191,6 +1192,8 @@ class SupplierProposal extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@ -971,6 +971,7 @@ class Ticket extends CommonObject
|
||||
// Clear fields
|
||||
// ...
|
||||
// Create clone
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result = $object->create($user);
|
||||
|
||||
// Other options
|
||||
@ -982,6 +983,8 @@ class Ticket extends CommonObject
|
||||
if (!$error) {
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -593,11 +593,11 @@ class Website extends CommonObject
|
||||
{
|
||||
// Delete old file
|
||||
$filetplold=$pathofwebsitenew.'/page'.$pageid.'.tpl.php';
|
||||
dol_syslog("We regenerate alias page new name=".$filealias.", old name=".$fileoldalias);
|
||||
dol_delete_file($filetplold);
|
||||
|
||||
// Create new file
|
||||
$objectpagenew = $objectpageold->createFromClone($user, $pageid, $objectpageold->pageurl, '', 0, $object->id, 1);
|
||||
|
||||
//print $pageid.' = '.$objectpageold->pageurl.' -> '.$objectpagenew->id.' = '.$objectpagenew->pageurl.'<br>';
|
||||
if (is_object($objectpagenew) && $objectpagenew->pageurl)
|
||||
{
|
||||
@ -632,7 +632,7 @@ class Website extends CommonObject
|
||||
if (! $res > 0)
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($objectpage->error, $objectpage->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
@ -646,6 +646,8 @@ class Website extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
@ -447,6 +447,8 @@ class WebsitePage extends CommonObject
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user