iliaa Wed Aug 18 16:24:20 2004 EDT
Modified files:
/livedocs style_mapping.php
Log:
Added patch to allow handling of params passed by reference properly.
Based on patch by: Curt Zirzow
http://cvs.php.net/diff.php/livedocs/style_mapping.php?r1=1.20&r2=1.21&ty=u
Index: livedocs/style_mapping.php
diff -u livedocs/style_mapping.php:1.20 livedocs/style_mapping.php:1.21
--- livedocs/style_mapping.php:1.20 Sat Aug 14 17:34:05 2004
+++ livedocs/style_mapping.php Wed Aug 18 16:24:20 2004
@@ -18,7 +18,7 @@
// | Helper functions for formatting elements |
// +----------------------------------------------------------------------+
//
-// $Id: style_mapping.php,v 1.20 2004/08/14 21:34:05 iliaa Exp $
+// $Id: style_mapping.php,v 1.21 2004/08/18 20:24:20 iliaa Exp $
// almost XPATH.. ;-)
$map = array(
@@ -398,17 +398,21 @@
} else {
$name = '';
}
- switch ($role) {
- case 'c':
- break;
- default:
- if ($name && $name{0} == '&') {
- $name = '&$' . substr($name, 1);
- } elseif(trim($name) != '') {
- $name = '$' . $name;
+
+ if ($role != 'c' && $name) {
+ if ($name{0} == '&') {
+ $name{0} = '$';
+ $name = '&' . $name;
+ } else if (trim($name)) {
+ if (isset($k->children[1]->attributes['role']) &&
+ $k->children[1]->attributes['role'] ==
'reference') {
+ $name = '&$' . $name;
} else {
- $name = '';
+ $name = '$' . $name;
}
+ } else {
+ $name = '';
+ }
}
$p .= ' <span class="varname">' . $name . '</span></span>';