summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorBen Coburn <btcoburn@silicodon.net>2006-12-07 08:49:06 +0100
committerBen Coburn <btcoburn@silicodon.net>2006-12-07 08:49:06 +0100
commitebf1501f6d253ef906c44bae278a2f80ffcb9f54 (patch)
tree433bac6de834b9584a965e87d39793fee0a846ac /inc/common.php
parent5aa52fafe8be8e728c0d2c9ff12c999e80766127 (diff)
downloadrpg-ebf1501f6d253ef906c44bae278a2f80ffcb9f54.tar.gz
rpg-ebf1501f6d253ef906c44bae278a2f80ffcb9f54.tar.bz2
changelog type strings replaced with constants
Using more verbose constant names in the place of single character strings should make the code much more readable. This does not change the behavior of the changelog. darcs-hash:20061207074906-05dcb-0bdc35e7241bf14063b2b43a6ff26d8a3c307cb9.gz
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/inc/common.php b/inc/common.php
index 93e2df34f..60bec57a2 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -150,7 +150,7 @@ function pageinfo(){
$info['user'] = $revinfo['user'];
$info['sum'] = $revinfo['sum'];
// See also $INFO['meta']['last_change'] which is the most recent log line for page $ID.
- // Use $INFO['meta']['last_change']['type']==='e' in place of $info['minor'].
+ // Use $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT in place of $info['minor'].
if($revinfo['user']){
$info['editor'] = $revinfo['user'];
@@ -736,7 +736,7 @@ function saveWikiText($id,$text,$summary,$minor=false){
saveOldRevision($id);
// add a changelog entry if this edit came from outside dokuwiki
if ($old>$oldRev) {
- addLogEntry($old, $id, 'E', $lang['external_edit'], '', array('ExternalEdit'=>true));
+ addLogEntry($old, $id, DOKU_CHANGE_TYPE_EDIT, $lang['external_edit'], '', array('ExternalEdit'=>true));
// remove soon to be stale instructions
$cache = new cache_instructions($id, $file);
$cache->removeCache();
@@ -773,14 +773,14 @@ function saveWikiText($id,$text,$summary,$minor=false){
// select changelog line type
$extra = '';
- $type = 'E';
+ $type = DOKU_CHANGE_TYPE_EDIT;
if ($wasReverted) {
- $type = 'R';
+ $type = DOKU_CHANGE_TYPE_REVERT;
$extra = $REV;
}
- else if ($wasCreated) { $type = 'C'; }
- else if ($wasRemoved) { $type = 'D'; }
- else if ($minor && $conf['useacl'] && $_SERVER['REMOTE_USER']) { $type = 'e'; } //minor edits only for logged in users
+ else if ($wasCreated) { $type = DOKU_CHANGE_TYPE_CREATE; }
+ else if ($wasRemoved) { $type = DOKU_CHANGE_TYPE_DELETE; }
+ else if ($minor && $conf['useacl'] && $_SERVER['REMOTE_USER']) { $type = DOKU_CHANGE_TYPE_MINOR_EDIT; } //minor edits only for logged in users
addLogEntry($newRev, $id, $type, $summary, $extra);
// send notify mails