diff --git a/doc/inlinedocparser.php b/doc/inlinedocparser.php
index 6912da5bcb..31acae67ca 100755
--- a/doc/inlinedocparser.php
+++ b/doc/inlinedocparser.php
@@ -12,107 +12,107 @@
/* $Id$ */
- $types = array('abstract','param','example','syntax','result','description','discussion','author','copyright','package','access');
+ $types = array('abstract','param','example','syntax','result','description','discussion','author','copyright','package','access');
- if($app)
+ if($app)
+ {
+ if (!preg_match("/^[a-zA-Z0-9-_]+$/i",$app))
{
- if (!preg_match("/^[a-zA-Z0-9-_]+$/i",$app))
- {
- echo 'Invalid application
';
- exit;
- }
+ echo 'Invalid application
';
+ exit;
+ }
+ }
+ else
+ {
+ $app = 'phpgwapi';
+ }
+
+ if ($fn)
+ {
+ if (preg_match("/^class\.([a-zA-Z0-9-_]*)\.inc\.php+$/",$fn) || preg_match("/^functions\.inc\.php+$/",$fn) || preg_match("/^xml_functions\.inc\.php+$/",$fn))
+ {
+ $files[] = $fn;
}
else
{
- $app = 'phpgwapi';
+ echo 'No valid file selected';
+ exit;
}
-
- if ($fn)
- {
- if (preg_match("/^class\.([a-zA-Z0-9-_]*)\.inc\.php+$/",$fn) || preg_match("/^functions\.inc\.php+$/",$fn) || preg_match("/^xml_functions\.inc\.php+$/",$fn))
- {
- $files[] = $fn;
- }
- else
- {
- echo 'No valid file selected';
- exit;
- }
- }
- else
- {
- $d = dir('../'.$app.'/inc/');
- while ($x = $d->read())
- {
- if (preg_match("/^class\.([a-zA-Z0-9-_]*)\.inc\.php+$/",$x) || preg_match("/^functions\.inc\.php+$/",$x))
- {
- $files[] = $x;
- }
- }
- $d->close;
-
- reset($files);
+ }
+ else
+ {
+ $d = dir('../'.$app.'/inc/');
+ while ($x = $d->read())
+ {
+ if (preg_match("/^class\.([a-zA-Z0-9-_]*)\.inc\.php+$/",$x) || preg_match("/^functions\.inc\.php+$/",$x))
+ {
+ $files[] = $x;
+ }
}
+ $d->close;
- while (list($p,$fn) = each($files))
- {
- $matches = $elements = $data = array();
- $string = $t = $out = $class = $xkey = $new = '';
- $file = '../'.$app.'/inc/' . $fn;
- echo '
Looking at: ' . $file . "\n";
+ reset($files);
+ }
- $f = fopen($file,'r');
- while (!feof($f))
- {
- $string .= fgets($f,8000);
- }
- fclose($f);
+ while (list($p,$fn) = each($files))
+ {
+ $matches = $elements = $data = array();
+ $string = $t = $out = $class = $xkey = $new = '';
+ $file = '../'.$app.'/inc/' . $fn;
+ echo '
Looking at: ' . $file . "\n";
- preg_match_all("#\*\!(.*)\*/#sUi",$string,$matches,PREG_SET_ORDER);
+ $f = fopen($file,'r');
+ while (!feof($f))
+ {
+ $string .= fgets($f,8000);
+ }
+ fclose($f);
- while (list($key,$val) = each($matches))
- {
- preg_match_all("#@(.*)$#sUi",$val[1],$data);
- $new = explode("@",$data[1][0]);
- while (list($x,$y) = each($new))
- {
- if (!isset($object) || trim($new[0]) == $object)
- //if (trim($new[0]) == $object)
- {
- $t = trim($new[0]);
- if(!$key)
- {
- $class = $t;
- }
- $t = trim(ereg_replace('function','',$t));
+ preg_match_all("#\*\!(.*)\*/#sUi",$string,$matches,PREG_SET_ORDER);
- reset($types);
- while(list($z,$type) = each($types))
- {
- if(ereg($type,$y))
- {
- $xkey = $type;
- $out = $y;
- $out = ereg_replace($type,'',$out);
- break;
- }
- else
- {
- $xkey = 'unknown';
- $out = $y;
- }
- }
+ while (list($key,$val) = each($matches))
+ {
+ preg_match_all("#@(.*)$#sUi",$val[1],$data);
+ $new = explode("@",$data[1][0]);
+ while (list($x,$y) = each($new))
+ {
+ if (!isset($object) || trim($new[0]) == $object)
+ //if (trim($new[0]) == $object)
+ {
+ $t = trim($new[0]);
+ if(!$key)
+ {
+ $class = $t;
+ }
+ $t = trim(ereg_replace('function','',$t));
- if($out != $new[0])
- {
- $elements[$class][$t][$xkey][] = $out;
- }
- }
+ reset($types);
+ while(list($z,$type) = each($types))
+ {
+ if(ereg($type,$y))
+ {
+ $xkey = $type;
+ $out = $y;
+ $out = ereg_replace($type,'',$out);
+ break;
}
- }
- echo '
'; - print_r($elements); -// var_dump($elements); - echo '' . "\n"; - } + else + { + $xkey = 'unknown'; + $out = $y; + } + } + + if($out != $new[0]) + { + $elements[$class][$t][$xkey][] = $out; + } + } + } + } + echo '
'; + print_r($elements); + // var_dump($elements); + echo '' . "\n"; + } ?>