Changed files:
rpm-php-requires.php -> 1.17
}
foreach (file($f) as $line) {
}
foreach (file($f) as $line) {
+ // skip comments -- not perfect, matches "*" at start of line (very rare altho)
if (preg_match('/^\s*(#|\/\/|\*|\/\*)/', $line)) {
continue;
}
if (preg_match('/^\s*(#|\/\/|\*|\/\*)/', $line)) {
continue;
}
(\"([^\"]*)\"|'([^']*)')
\s* \)? \s* ;/x", $line, $m)) {
(\"([^\"]*)\"|'([^']*)')
\s* \)? \s* ;/x", $line, $m)) {
- } else if ($m[6] != "") {
$x = $m[6];
} else {
continue 2;
}
$x = $m[6];
} else {
continue 2;
}
- if (substr($x, 0, 2) == './' || substr($x, -1) == '$') {
+ if (substr($x, 0, 2) == './' || substr($x, -1) == '$') { # XXX must be: CONTAINS DOLLAR
(\"([^\"]*)\"|'([^']*)')
\s* \)? \s* ;/x", $line, $m)) {
(\"([^\"]*)\"|'([^']*)')
\s* \)? \s* ;/x", $line, $m)) {
- } else if ($m[6] != "") {
$x = $m[6];
} else {
continue 2;
}
$x = $m[6];
} else {
continue 2;
}
- if (substr($x, -1) == '$') {
+ if (substr($x, -1) == '$') { # XXX must be: CONTAINS DOLLAR
continue 2;
}
if (substr($x, -4) != '.php') {
continue 2;
}
if (substr($x, -4) != '.php') {
+ // remove double slashes
+ // TODO: resolve simpletest/test/../socket.php -> simpletest/socket.php
+ $x = str_replace("//", "/", $x);
$req[$x] = 1;
continue;
}
$req[$x] = 1;
continue;
}