A court in Germany has banned a German comedian from re-publishing a section of a satirical poem that mocked Turkish President Recep Tayyip Erdogan.