Merge remote-tracking branch 'origin/3.6' into develop
Conflicts: htdocs/core/modules/societe/doc/doc_generic_odt.modules.php
This commit is contained in:
commit
e5d5a25433
@ -302,7 +302,6 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||||
$sql .= " WHERE p.fk_soc = ".$object->id;
|
$sql .= " WHERE p.fk_soc = ".$object->id;
|
||||||
|
|
||||||
dol_syslog('doc_generic_odt ::', LOG_DEBUG);
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
$num = $this->db->num_rows($result);
|
$num = $this->db->num_rows($result);
|
||||||
|
|
||||||
@ -355,10 +354,15 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make substitutions into odt of thirdparty + external modules
|
||||||
|
$tmparray=$this->get_substitutionarray_thirdparty($object,$outputlangs);
|
||||||
|
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||||
|
|
||||||
// Call the ODTSubstitution hook
|
// Call the ODTSubstitution hook
|
||||||
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);
|
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);
|
||||||
$reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
//var_dump($object->id); exit;
|
|
||||||
|
// Replace variables into document
|
||||||
foreach($tmparray as $key=>$value)
|
foreach($tmparray as $key=>$value)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@ -390,11 +394,6 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Make substitutions into odt of thirdparty + external modules
|
|
||||||
$tmparray=$this->get_substitutionarray_thirdparty($object,$outputlangs);
|
|
||||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
|
||||||
|
|
||||||
// Call the beforeODTSave hook
|
// Call the beforeODTSave hook
|
||||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
$reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|||||||
@ -82,6 +82,7 @@ print "Press a key to confirm...\n";
|
|||||||
$input = trim(fgets(STDIN));
|
$input = trim(fgets(STDIN));
|
||||||
print "Warning, this operation may result in data loss if it failed.\n";
|
print "Warning, this operation may result in data loss if it failed.\n";
|
||||||
print "Be sure to have a backup of your LDAP database (With OpenLDAP: slapcat > save.ldif).\n";
|
print "Be sure to have a backup of your LDAP database (With OpenLDAP: slapcat > save.ldif).\n";
|
||||||
|
|
||||||
print "Hit Enter to continue or CTRL+C to stop...\n";
|
print "Hit Enter to continue or CTRL+C to stop...\n";
|
||||||
$input = trim(fgets(STDIN));
|
$input = trim(fgets(STDIN));
|
||||||
|
|
||||||
|
|||||||
@ -95,8 +95,6 @@ $required_fields=array_unique(array_values(array_filter($required_fields, "dolVa
|
|||||||
|
|
||||||
if ($argv[3]) $conf->global->LDAP_SERVER_HOST=$argv[2];
|
if ($argv[3]) $conf->global->LDAP_SERVER_HOST=$argv[2];
|
||||||
|
|
||||||
print "***** $script_file ($version) *****\n";
|
|
||||||
|
|
||||||
if (! isset($argv[2]) || ! is_numeric($argv[2])) {
|
if (! isset($argv[2]) || ! is_numeric($argv[2])) {
|
||||||
print "Usage: $script_file (nocommitiferror|commitiferror) id_member_type [ldapserverhost]\n";
|
print "Usage: $script_file (nocommitiferror|commitiferror) id_member_type [ldapserverhost]\n";
|
||||||
exit(-1);
|
exit(-1);
|
||||||
@ -138,8 +136,6 @@ if ($typeid <= 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print "Press a key to confirm...";
|
|
||||||
$input = trim(fgets(STDIN));
|
|
||||||
print "Hit Enter to continue or CTRL+C to stop...\n";
|
print "Hit Enter to continue or CTRL+C to stop...\n";
|
||||||
$input = trim(fgets(STDIN));
|
$input = trim(fgets(STDIN));
|
||||||
|
|
||||||
|
|||||||
@ -72,8 +72,6 @@ $required_fields=array_unique(array_values(array_filter($required_fields, "dolVa
|
|||||||
|
|
||||||
if ($argv[2]) $conf->global->LDAP_SERVER_HOST=$argv[2];
|
if ($argv[2]) $conf->global->LDAP_SERVER_HOST=$argv[2];
|
||||||
|
|
||||||
print "***** $script_file ($version) *****\n";
|
|
||||||
|
|
||||||
if (! isset($argv[1])) {
|
if (! isset($argv[1])) {
|
||||||
//print "Usage: $script_file (nocommitiferror|commitiferror) [id_group]\n";
|
//print "Usage: $script_file (nocommitiferror|commitiferror) [id_group]\n";
|
||||||
print "Usage: $script_file (nocommitiferror|commitiferror) [ldapserverhost]\n";
|
print "Usage: $script_file (nocommitiferror|commitiferror) [ldapserverhost]\n";
|
||||||
@ -103,8 +101,7 @@ print "----- Options:\n";
|
|||||||
print "commitiferror=".$forcecommit."\n";
|
print "commitiferror=".$forcecommit."\n";
|
||||||
print "Mapped LDAP fields=".join(',',$required_fields)."\n";
|
print "Mapped LDAP fields=".join(',',$required_fields)."\n";
|
||||||
print "\n";
|
print "\n";
|
||||||
print "Press a key to confirm...";
|
|
||||||
$input = trim(fgets(STDIN));
|
|
||||||
print "Hit Enter to continue or CTRL+C to stop...\n";
|
print "Hit Enter to continue or CTRL+C to stop...\n";
|
||||||
$input = trim(fgets(STDIN));
|
$input = trim(fgets(STDIN));
|
||||||
|
|
||||||
|
|||||||
@ -85,14 +85,12 @@ $required_fields=array_unique(array_values(array_filter($required_fields, "dolVa
|
|||||||
|
|
||||||
if ($argv[2]) $conf->global->LDAP_SERVER_HOST=$argv[2];
|
if ($argv[2]) $conf->global->LDAP_SERVER_HOST=$argv[2];
|
||||||
|
|
||||||
print "***** $script_file ($version) *****\n";
|
|
||||||
|
|
||||||
if (! isset($argv[1])) {
|
if (! isset($argv[1])) {
|
||||||
//print "Usage: $script_file (nocommitiferror|commitiferror) [id_group]\n";
|
//print "Usage: $script_file (nocommitiferror|commitiferror) [id_group]\n";
|
||||||
print "Usage: $script_file (nocommitiferror|commitiferror) [ldapserverhost]\n";
|
print "Usage: $script_file (nocommitiferror|commitiferror) [ldapserverhost]\n";
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
$groupid=$argv[3];
|
|
||||||
if ($argv[1] == 'commitiferror') $forcecommit=1;
|
if ($argv[1] == 'commitiferror') $forcecommit=1;
|
||||||
|
|
||||||
|
|
||||||
@ -116,8 +114,7 @@ print "----- Options:\n";
|
|||||||
print "commitiferror=".$forcecommit."\n";
|
print "commitiferror=".$forcecommit."\n";
|
||||||
print "Mapped LDAP fields=".join(',',$required_fields)."\n";
|
print "Mapped LDAP fields=".join(',',$required_fields)."\n";
|
||||||
print "\n";
|
print "\n";
|
||||||
print "Press a key to confirm...";
|
|
||||||
$input = trim(fgets(STDIN));
|
|
||||||
print "Hit Enter to continue or CTRL+C to stop...\n";
|
print "Hit Enter to continue or CTRL+C to stop...\n";
|
||||||
$input = trim(fgets(STDIN));
|
$input = trim(fgets(STDIN));
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user