summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2010-10-07 09:44:02 +0200
committerAdrian Lang <mail@adrianlang.de>2010-10-07 09:44:02 +0200
commitd9c8ae6b7379d7b64d4817dbd5cca276b45a9dd5 (patch)
tree39c26d5412170ca4fa176962e60e9962dc643667 /inc/common.php
parent2c053ed58376c6709596ab48fc40dceb90d4e89d (diff)
parent85dd53ceb1c2d9a7abe01b5ec50d155dcb142c59 (diff)
downloadrpg-d9c8ae6b7379d7b64d4817dbd5cca276b45a9dd5.tar.gz
rpg-d9c8ae6b7379d7b64d4817dbd5cca276b45a9dd5.tar.bz2
Merge branch 'master' into stable
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 bf5987c28..6af7f49de 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);