summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2010-10-10 14:26:22 +0200
committerMichael Hamann <michael@content-space.de>2010-10-10 14:26:22 +0200
commit762b4c44c691f69d521413d7016314e7f547c102 (patch)
tree95ab294b1df2f8c7a5efb56762a0f284bec3754e /inc/common.php
parenteae17177de8f3f3580af5ea66d126aee0f23227f (diff)
parent4ea48b361401e136dbfd3339af368ceeb5b27480 (diff)
downloadrpg-762b4c44c691f69d521413d7016314e7f547c102.tar.gz
rpg-762b4c44c691f69d521413d7016314e7f547c102.tar.bz2
Merge remote branch 'origin/master' into sitemap
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/inc/common.php b/inc/common.php
index 0816d9fbb..09b1345b9 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -97,7 +97,6 @@ function pageinfo(){
global $REV;
global $RANGE;
global $USERINFO;
- global $conf;
global $lang;
// include ID & REV not redundant, as some parts of DokuWiki may temporarily change $ID, e.g. p_wiki_xhtml
@@ -988,9 +987,10 @@ function saveWikiText($id,$text,$summary,$minor=false){
$mfiles = metaFiles($id);
$changelog = metaFN($id, '.changes');
$metadata = metaFN($id, '.meta');
+ $subscribers = metaFN($id, '.mlist');
foreach ($mfiles as $mfile) {
- // but keep per-page changelog to preserve page history and keep meta data
- if (@file_exists($mfile) && $mfile!==$changelog && $mfile!==$metadata) { @unlink($mfile); }
+ // but keep per-page changelog to preserve page history, keep subscriber list and keep meta data
+ if (@file_exists($mfile) && $mfile!==$changelog && $mfile!==$metadata && $mfile!==$subscribers) { @unlink($mfile); }
}
// purge meta data
p_purge_metadata($id);
@@ -1128,7 +1128,11 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){
$diff = rawWiki($id);
}
$text = str_replace('@DIFF@',$diff,$text);
- $subject = '['.$conf['title'].'] '.$subject;
+ if(utf8_strlen($conf['title']) < 20) {
+ $subject = '['.$conf['title'].'] '.$subject;
+ }else{
+ $subject = '['.utf8_substr($conf['title'], 0, 20).'...] '.$subject;
+ }
$from = $conf['mailfrom'];
$from = str_replace('@USER@',$_SERVER['REMOTE_USER'],$from);