function cpyEditor() { if ($_SESSION["OBJ_user"]->allow_access("xwysiwyg", "settings")) { //Administrativ condition if (isset($_GET['cpyEditor'])) { $editor = PHPWS_Text::parseInput($_GET['cpyEditor']); } else { return FALSE; } if (is_file(PHPWS_SOURCE_DIR . "files/xwysiwyg/editors/" . $editor . ".php")) { PHPWS_File::recursiveFileCopy(PHPWS_SOURCE_DIR . "files/xwysiwyg/editors/{$editor}/", PHPWS_HOME_DIR . "files/xwysiwyg/editors/{$editor}/"); PHPWS_File::fileCopy(PHPWS_SOURCE_DIR . "files/xwysiwyg/editors/{$editor}.php", PHPWS_HOME_DIR . "files/xwysiwyg/editors/", "{$editor}.php", TRUE, TRUE); PHPWS_File::fileCopy(PHPWS_SOURCE_DIR . "files/xwysiwyg/editors/{$editor}.conf", PHPWS_HOME_DIR . "files/xwysiwyg/editors/", "{$editor}.conf", TRUE, TRUE); } } else { $this->content .= $_SESSION['translate']->it("Access was denied due to lack of proper permissions."); } // End of ADMINISTRATOR condition }