diff --git a/conf/default.php b/conf/default.php index ed0463f..5a09005 100644 --- a/conf/default.php +++ b/conf/default.php @@ -1,4 +1,5 @@ getParam('page_tgt'); + $relativetargetpage = $this->replace($relativetargetpage); resolve_pageid($ns, $relativeTargetPageid, $ignored); $targetpage = "$this->pagename:$relativetargetpage"; @@ -189,7 +190,7 @@ protected function getActionTargetpages($tpl) { protected function checkTargetPageNames() { foreach (array_keys($this->targetpages) as $pname) { // prevent overriding already existing pages - if (page_exists($pname)) { + if ( (page_exists($pname)) && (!$this->getConf('pageoverwrite')) ) { throw new Exception(sprintf($this->getLang('e_pageexists'), html_wikilink($pname))); } diff --git a/lang/de/settings.php b/lang/de/settings.php index 4f8c39f..f114b92 100644 --- a/lang/de/settings.php +++ b/lang/de/settings.php @@ -2,4 +2,5 @@ $lang['runas'] = 'Affects the template mode. Use this (virtual) user\'s permissions when checking ACLs for reading templates and creating pages.'; $lang['maxEmailAttachmentSize'] = 'Maximale größe eines Mail-Anhangs in Bytes (pro Datei).'; +$lang['pageoverwrite'] = 'Eine vorhandene Seite im Wiki ohne Warnung überschreiben.'; diff --git a/lang/en/settings.php b/lang/en/settings.php index 9c8f365..64e1f85 100644 --- a/lang/en/settings.php +++ b/lang/en/settings.php @@ -2,4 +2,4 @@ $lang['runas'] = 'Affects the template mode. Use this (virtual) user\'s permissions when checking ACLs for reading templates and creating pages.'; $lang['maxEmailAttachmentSize'] = 'Max size of mail attachments in Bytes. (per File)'; - +$lang['pageoverwrite'] = 'Overwrite an already existing page without warning.';