Here is how I modified DokuWiki to allow me to use any mixture of uppercase and lowercase for page identifiers or titles.
--- fresh-dokuwiki/inc/HTTPClient.php 2006-03-09 14:32:34.000000000 -0600
+++ wiki/inc/HTTPClient.php 2006-03-18 12:35:04.000000000 -0600
@@ -351,11 +351,12 @@
function _parseHeaders($string){
$headers = array();
$lines = explode("\n",$string);
foreach($lines as $line){
list($key,$val) = explode(':',$line,2);
- $key = strtolower(trim($key));
+ //$key = strtolower(trim($key));
+ $key = trim($key);
$val = trim($val);
if(empty($val)) continue;
if(isset($headers[$key])){
if(is_array($headers[$key])){
$headers[$key][] = $val;
diff -r -U 5 fresh-dokuwiki/inc/pageutils.php wiki/inc/pageutils.php
--- fresh-dokuwiki/inc/pageutils.php 2006-03-09 14:32:34.000000000 -0600
+++ wiki/inc/pageutils.php 2006-03-18 13:00:25.000000000 -0600
@@ -76,11 +76,11 @@
$sepchar = $conf['sepchar'];
if($sepcharpat == null) // build string only once to save clock cycles
$sepcharpat = '#\\'.$sepchar.'+#';
$id = trim($id);
- $id = utf8_strtolower($id);
+ //$id = utf8_strtolower($id);
//alternative namespace seperator
$id = strtr($id,';',':');
if($conf['useslash']){
$id = strtr($id,'/',':');
Another approach would be to make it a config option. Then you can share out your code without imposing your way of doing it. ;)
The function act_clean in actions.php may present a problem. It does a lower case on the $act parameter. I haven't figured out what is affected by that.
--- dokuwiki.php 2006-11-11 18:02:32.000000000 -0800
+++ dokuwiki.php.case 2006-11-11 18:04:24.000000000 -0800
@@ -40,4 +40,5 @@
$conf['maxseclevel'] = 3; //Up to which level create editable sections (max. 5)
$conf['camelcase'] = 0; //Use CamelCase for linking? (I don't like it) 0|1
+$conf['uselower'] = 1; //Convert all titles to lowercase? (Not if you like CamelCase) 0|1
$conf['deaccent'] = 1; //deaccented chars in pagenames (1) or romanize (2) or keep (0)?
$conf['useheading'] = 0; //use the first heading in a page as its name
--- pageutils.php 2006-11-11 17:58:21.458801031 -0800
+++ pageutils.php.case 2006-11-11 18:25:26.000000000 -0800
@@ -87,5 +87,7 @@
$id = trim($raw_id);
- $id = utf8_strtolower($id);
+ if($conf[$uselower]) {
+ $id = utf8_strtolower($id);
+ }
//alternative namespace seperator
--- HTTPClient.php 2006-11-11 17:58:03.000000000 -0800
+++ HTTPClient.php.case 2006-11-11 18:25:10.000000000 -0800
@@ -373,5 +373,9 @@
foreach($lines as $line){
list($key,$val) = explode(':',$line,2);
- $key = strtolower(trim($key));
+ if($conf[$uselower]) {
+ $key = strtolower(trim($key));
+ }else{
+ $key = trim($key);
+ }
$val = trim($val);
if(empty($val)) continue;