summaryrefslogtreecommitdiff
path: root/inc/changelog.php
diff options
context:
space:
mode:
authorBen Coburn <btcoburn@silicodon.net>2006-10-23 07:21:33 +0200
committerBen Coburn <btcoburn@silicodon.net>2006-10-23 07:21:33 +0200
commit468441561df674f9df04e53a21d29dd4f1f0c017 (patch)
treeb9acad6b95c993050b74167d13e74886fc29da47 /inc/changelog.php
parent173f278305be97fd6d51f90472add11514b5aa29 (diff)
downloadrpg-468441561df674f9df04e53a21d29dd4f1f0c017.tar.gz
rpg-468441561df674f9df04e53a21d29dd4f1f0c017.tar.bz2
synchronize changelog, attic, and external edits
The changelog list and the attic now are kept in sync. This allows a changelog entry to be automatically constructed for a page that was manually edited from outside dokuwiki. darcs-hash:20061023052133-05dcb-11b8dbaee1da07fb1875bbe530e88d94871ed65d.gz
Diffstat (limited to 'inc/changelog.php')
-rw-r--r--inc/changelog.php34
1 files changed, 0 insertions, 34 deletions
diff --git a/inc/changelog.php b/inc/changelog.php
index 570c48740..85de8e2aa 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -271,11 +271,7 @@ function getRevisionInfo($id, $rev, $chunk_size=8192) {
* backwards in chunks untill the requested number of changelog
* lines are recieved.
*
- * Because there may exist revisions not listed in the changelog
- * the found revisions are merged with the ones found in the attic
- *
* @author Ben Coburn <btcoburn@silicodon.net>
- * @see getRevisionsFromAttic()
*/
function getRevisions($id, $first, $num, $chunk_size=8192) {
global $cache_revinfo;
@@ -358,37 +354,7 @@ function getRevisions($id, $first, $num, $chunk_size=8192) {
}
}
- // merge with attic file info
- $revs = array_merge($revs,getRevisionsFromAttic($id,false));
- $revs = array_unique($revs);
- rsort($revs);
-
return $revs;
}
-/**
- * Return a list of available and existing page revisons from the attic
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @see getRevisions()
- */
-function getRevisionsFromAttic($id,$sorted=true){
- $revd = dirname(wikiFN($id,'foo'));
- $revs = array();
- $clid = cleanID($id);
- if(strrpos($clid,':')) $clid = substr($clid,strrpos($clid,':')+1); //remove path
- $clid = utf8_encodeFN($clid);
-
- if (is_dir($revd) && $dh = opendir($revd)) {
- while (($file = readdir($dh)) !== false) {
- if (is_dir($revd.'/'.$file)) continue;
- if (preg_match('/^'.$clid.'\.(\d+)\.txt(\.gz)?$/',$file,$match)){
- $revs[]=$match[1];
- }
- }
- closedir($dh);
- }
- if($sorted) rsort($revs);
- return $revs;
-}