Skip to content
Snippets Groups Projects
Verified Commit de29a5a8 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #12852 TIME 0:40 rm outgoing_mail from entreprise.xml

parent b843b4c4
No related branches found
No related tags found
No related merge requests found
......@@ -20,11 +20,6 @@
<label>_SIGNED_RESPONSE</label>
<process_mode/>
</type>
<type show="true" with_chrono="true" icon="DS" sign="true" select_in_reconciliation="true">
<id>outgoing_mail_signed</id>
<label>_OUTGOING_MAIL_SIGNED</label>
<process_mode/>
</type>
<type show="true" with_chrono="false" icon="PJ" sign="false" select_in_reconciliation="true">
<id>simple_attachment</id>
<label>_A_PJ</label>
......@@ -44,11 +39,6 @@
<id>routing</id>
<label>_ROUTING</label>
<process_mode/>
</type>
<type show="true" with_chrono="true" icon="DS" sign="true">
<id>outgoing_mail</id>
<label>_OUTGOING_MAIL</label>
<process_mode/>
</type>
<type show="false" with_chrono="false" icon="" sign="false">
<id>converted_pdf</id>
......
No preview for this file type
No preview for this file type
......@@ -364,5 +364,39 @@ foreach ($customs as $custom) {
}
}
$path = "custom/{$custom}/apps/maarch_entreprise/xml/entreprise.xml";
if (file_exists($path)) {
if (!is_readable($path) || !is_writable($path)) {
printf("The file $path it is not readable or not writable.\n");
continue;
}
$loadedXml = simplexml_load_file($path);
if ($loadedXml) {
for ($i=count($loadedXml->attachment_types->type); $i >= 0; $i--) {
if (in_array($loadedXml->attachment_types->type[$i]->id, ['outgoing_mail', 'outgoing_mail_signed'])) {
unset($loadedXml->attachment_types->type[$i]);
}
}
$res = formatXml($loadedXml);
$fp = fopen($path, "w+");
if ($fp) {
fwrite($fp, $res);
}
$migrated++;
}
}
printf("Migration de Modèles de document départ spontannée (CUSTOM {$custom}) : " . $migrated . " Modèle(s) migré(s), $nonMigrated non migré(s).\n");
}
function formatXml($simpleXMLElement)
{
$xmlDocument = new DOMDocument('1.0');
$xmlDocument->preserveWhiteSpace = false;
$xmlDocument->formatOutput = true;
$xmlDocument->loadXML($simpleXMLElement->asXML());
return $xmlDocument->saveXML();
}
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment