When a case is referred to the liberty and custody judge by the foreign national for the purpose of contesting the decision to place him/her in detention pursuant to article L. 741-10 and by the administrative authority for the purpose of extending detention pursuant to article L. 742-1, the hearing shall be common to both proceedings, which shall be decided by a single order.