From 70b0df589127460eea4ea966cceffdfd032dd70d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Wed, 17 Feb 2021 20:59:19 +0100 Subject: [PATCH] MDL-70931 xmldb: Generate install.xml files with EOL and EOF As discussed in MDLSITE-6397, all Moodle code files should end with single Unix-style end of line character. Files created and edited through the XMLDB editor should follow this rule, too. --- .../xmldb/actions/create_xml_file/create_xml_file.class.php | 2 +- lib/xmldb/xmldb_structure.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/tool/xmldb/actions/create_xml_file/create_xml_file.class.php b/admin/tool/xmldb/actions/create_xml_file/create_xml_file.class.php index 1f76c1b8859..4b7461386cc 100644 --- a/admin/tool/xmldb/actions/create_xml_file/create_xml_file.class.php +++ b/admin/tool/xmldb/actions/create_xml_file/create_xml_file.class.php @@ -93,7 +93,7 @@ class create_xml_file extends XMLDBAction { $c.= ' ' . "\n"; $c.= ' ' . "\n"; $c.= ' ' . "\n"; - $c.= ' '; + $c.= ' ' . "\n"; if (!file_put_contents($file, $c)) { $errormsg = 'Error creando fichero ' . $file; diff --git a/lib/xmldb/xmldb_structure.php b/lib/xmldb/xmldb_structure.php index ad681efcd79..22793fafc42 100644 --- a/lib/xmldb/xmldb_structure.php +++ b/lib/xmldb/xmldb_structure.php @@ -359,7 +359,7 @@ class xmldb_structure extends xmldb_object { } $o.= ' ' . "\n"; } - $o.= ''; + $o.= '' . "\n"; return $o; }