Merge pull request #9894 from librethic-code/patch-1

FIX: keep external module element when adding resource
This commit is contained in:
Laurent Destailleur 2018-10-30 14:06:38 +01:00 committed by GitHub
commit 8ce035fc36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr>
/* Copyright (C) 2013-2018 Jean-François Ferry <hello+jf@librethic.io>
* Copyright (C) 2016 Gilles Poirier <glgpoirier@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
@ -94,7 +94,7 @@ if ($action == 'add_element_resource' && ! $cancel)
else
{
$objstat = fetchObjectByElement($element_id, $element);
$objstat->element = $element; // For externals module, we need to keep @xx
$res = $objstat->add_element_resource($resource_id, $resource_type, $busy, $mandatory);
}
if (! $error && $res > 0)