diff options
author | Ben Coburn <btcoburn@silicodon.net> | 2006-12-07 08:49:06 +0100 |
---|---|---|
committer | Ben Coburn <btcoburn@silicodon.net> | 2006-12-07 08:49:06 +0100 |
commit | ebf1501f6d253ef906c44bae278a2f80ffcb9f54 (patch) | |
tree | 433bac6de834b9584a965e87d39793fee0a846ac /lib/plugins/importoldchangelog/action.php | |
parent | 5aa52fafe8be8e728c0d2c9ff12c999e80766127 (diff) | |
download | rpg-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 'lib/plugins/importoldchangelog/action.php')
-rw-r--r-- | lib/plugins/importoldchangelog/action.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/plugins/importoldchangelog/action.php b/lib/plugins/importoldchangelog/action.php index 0c2601e16..8effe4ec9 100644 --- a/lib/plugins/importoldchangelog/action.php +++ b/lib/plugins/importoldchangelog/action.php @@ -47,10 +47,10 @@ class action_plugin_importoldchangelog extends DokuWiki_Action_Plugin { $sum = rtrim($oldline[4], "\n"); } // guess line type - $type = 'E'; - if ($wasMinor) { $type = 'e'; } - if ($sum===$lang['created']) { $type = 'C'; } - if ($sum===$lang['deleted']) { $type = 'D'; } + $type = DOKU_CHANGE_TYPE_EDIT; + if ($wasMinor) { $type = DOKU_CHANGE_TYPE_MINOR_EDIT; } + if ($sum===$lang['created']) { $type = DOKU_CHANGE_TYPE_CREATE; } + if ($sum===$lang['deleted']) { $type = DOKU_CHANGE_TYPE_DELETE; } // build new log line $tmp = array(); $tmp['date'] = (int)$oldline[0]; @@ -88,7 +88,7 @@ class action_plugin_importoldchangelog extends DokuWiki_Action_Plugin { $tmp = array(); $tmp['date'] = (int)$date; $tmp['ip'] = '127.0.0.1'; // original ip lost - $tmp['type'] = 'E'; + $tmp['type'] = DOKU_CHANGE_TYPE_EDIT; $tmp['id'] = $id; $tmp['user'] = ''; // original user lost $tmp['sum'] = '('.$lang['restored'].')'; // original summary lost |