cvs: phd / build.php package.xml /themes/php phpweb.php
| From: | Hannes Magnusson | Date: | Sun, 21 Oct 2007 11:50:28 +0000 |
| Subject: | cvs: phd / build.php package.xml /themes/php phpweb.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-250@lists.php.net to get a copy of this message | ||
bjori Sun Oct 21 11:50:28 2007 UTC
Modified files:
/phd build.php package.xml
/phd/themes/php phpweb.php
Log:
Remove dead code
http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.33&r2=1.34&diff_format=u
Index: phd/build.php
diff -u phd/build.php:1.33 phd/build.php:1.34
--- phd/build.php:1.33 Sun Oct 21 11:42:32 2007
+++ phd/build.php Sun Oct 21 11:50:27 2007
@@ -1,6 +1,6 @@
#!@php_bin@
<?php
-/* $Id: build.php,v 1.33 2007/10/21 11:42:32 bjori Exp $ */
+/* $Id: build.php,v 1.34 2007/10/21 11:50:27 bjori Exp $ */
function err($no, $str, $file, $line) {
global $notify;
@@ -58,9 +58,6 @@
/* FIXME: Load from sqlite db? */
}
-$rf = new ReflectionFunction("in_array");
-define("HAS_ARRAY_SEEK", $rf->getNumberOfParameters() == 4);
-
foreach($OPTIONS["output_format"] as $output_format) {
switch($output_format) {
case "xhtml":
http://cvs.php.net/viewvc.cgi/phd/package.xml?r1=1.7&r2=1.8&diff_format=u
Index: phd/package.xml
diff -u phd/package.xml:1.7 phd/package.xml:1.8
--- phd/package.xml:1.7 Sun Oct 21 11:42:32 2007
+++ phd/package.xml Sun Oct 21 11:50:27 2007
@@ -78,9 +78,6 @@
<extension>
<name>dom</name>
</extension>
- <extension>
- <name>reflection</name>
- </extension>
</required>
</dependencies>
<phprelease>
http://cvs.php.net/viewvc.cgi/phd/themes/php/phpweb.php?r1=1.15&r2=1.16&diff_format=u
Index: phd/themes/php/phpweb.php
diff -u phd/themes/php/phpweb.php:1.15 phd/themes/php/phpweb.php:1.16
--- phd/themes/php/phpweb.php:1.15 Sun Oct 21 11:42:33 2007
+++ phd/themes/php/phpweb.php Sun Oct 21 11:50:27 2007
@@ -1,5 +1,5 @@
<?php
-/* $Id: phpweb.php,v 1.15 2007/10/21 11:42:33 bjori Exp $ */
+/* $Id: phpweb.php,v 1.16 2007/10/21 11:50:27 bjori Exp $ */
class phpweb extends phpdotnet implements PhDTheme {
protected $streams = array();
@@ -114,16 +114,11 @@
}
// Seek to $id
- if (HAS_ARRAY_SEEK) {
- in_array($siblings[$id], $siblings, false, true);
- } else {
- /* Workaround PHPs incapability of seeking into array */
- while(list($tmp,) = each($siblings)) {
- if ($tmp == $id) {
- // Set the internal pointer back to $id
- prev($siblings);
- break;
- }
+ while(list($tmp,) = each($siblings)) {
+ if ($tmp == $id) {
+ // Set the internal pointer back to $id
+ prev($siblings);
+ break;
}
}
$tmp = prev($siblings);
@@ -151,20 +146,13 @@
}
// Seek to $id
- if (HAS_ARRAY_SEEK) {
- in_array($siblings[$id], $siblings, false, true) or die(var_export(debug_backtrace(),
true) ."\n$id\n$parent"); // This should *never* happen
- } else {
- /* Workaround PHPs incapability of seeking into array */
- while(list($tmp,) = each($siblings)) {
- if ($tmp == $id) {
- // Set the internal pointer back to $id
- prev($siblings);
- break;
- }
+ while(list($tmp,) = each($siblings)) {
+ if ($tmp == $id) {
+ break;
}
}
- $tmp = next($siblings);
+ $tmp = current($siblings);
prev($siblings); // Reset the internal pointer to previous pos
if ($tmp) {
$next = array($tmp["filename"].$ext, (empty($tmp["sdesc"]) ?
$tmp["ldesc"] : $tmp["sdesc"]));