Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion conf/default.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

$conf['runas'] = '';
$conf['maxEmailAttachmentSize'] = 3*1024*1024; //3MB
$conf['maxEmailAttachmentSize'] = 3*1024*1024; //3MB
$conf['pageoverwrite'] = 0;
2 changes: 1 addition & 1 deletion conf/metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

$meta['runas'] = array('string');
$meta['maxEmailAttachmentSize'] = array('numeric');

$meta['pageoverwrite'] = array('onoff');
3 changes: 2 additions & 1 deletion helper/actiontemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function getAdditionalTargetpages($fields) {

//target
$relativetargetpage = $field->getParam('page_tgt');
$relativetargetpage = $this->replace($relativetargetpage);
resolve_pageid($ns, $relativeTargetPageid, $ignored);
$targetpage = "$this->pagename:$relativetargetpage";

Expand Down Expand Up @@ -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)));
}

Expand Down
1 change: 1 addition & 0 deletions lang/de/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.';

2 changes: 1 addition & 1 deletion lang/en/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.';