diff --git a/admin/tool/xmldb/actions/main_view/main_view.class.php b/admin/tool/xmldb/actions/main_view/main_view.class.php index f0ecc7edd9a..9d4e00222e0 100644 --- a/admin/tool/xmldb/actions/main_view/main_view.class.php +++ b/admin/tool/xmldb/actions/main_view/main_view.class.php @@ -58,6 +58,7 @@ class main_view extends XMLDBAction { 'checkbigints' => 'tool_xmldb', 'checkoraclesemantics' => 'tool_xmldb', 'doc' => 'tool_xmldb', + 'filemodifiedoutfromeditor' => 'tool_xmldb', 'viewxml' => 'tool_xmldb', 'pendingchangescannotbesavedreload' => 'tool_xmldb' )); @@ -194,10 +195,8 @@ class main_view extends XMLDBAction { $b .= '[' . $this->str['save'] . ']'; // Check if the file has been manually edited while being modified in the editor if ($dbdir->filemtime != filemtime($key . '/install.xml')) { - // File manually modified. Add to errors. - if ($structure = $dbdir->xml_file->getStructure()) { - $structure->errormsg = 'Warning: File locally modified while using the XMLDB Editor. Saving will overwrite local changes'; - } + // File manually modified. Add to action error, will be displayed inline. + $this->errormsg = $this->str['filemodifiedoutfromeditor']; } } else { $b .= '[' . $this->str['save'] . ']'; @@ -266,7 +265,12 @@ class main_view extends XMLDBAction { // show errors if they exist if (isset($dbdir->xml_file)) { if ($structure = $dbdir->xml_file->getStructure()) { - if ($errors = $structure->getAllErrors()) { + $errors = !empty($this->errormsg) ? array($this->errormsg) : array(); + $structureerrors = $structure->getAllErrors(); + if ($structureerrors) { + $errors = array_merge($errors, $structureerrors); + } + if (!empty($errors)) { if ($hithis) { $o .= '