cvs: phd /include buildoptions.php

From: Date: Sat, 24 May 2008 14:37:08 +0000
Subject: cvs: phd /include buildoptions.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-1677@lists.php.net to get a copy of this message
gwynne Sat May 24 14:37:08 2008 UTC Modified files: /phd/include buildoptions.php Log: it's glob(), not global() http://cvs.php.net/viewvc.cgi/phd/include/buildoptions.php?r1=1.1&r2=1.2&diff_format=u Index: phd/include/buildoptions.php diff -u phd/include/buildoptions.php:1.1 phd/include/buildoptions.php:1.2 --- phd/include/buildoptions.php:1.1 Sat May 24 14:30:00 2008 +++ phd/include/buildoptions.php Sat May 24 14:37:08 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: buildoptions.php,v 1.1 2008/05/24 14:30:00 gwynne Exp $ */ +/* $Id: buildoptions.php,v 1.2 2008/05/24 14:37:08 gwynne Exp $ */ class BuildOptionsParser extends OptionParser { @@ -202,7 +202,7 @@ if (is_null($formatList)) { $formatList = array(); - foreach (global($GLOBALS['ROOT'] . "/formats/*.php") as $item) { + foreach (glob($GLOBALS['ROOT'] . "/formats/*.php") as $item) { $formatList[] = substr($item, 0, -4); } } @@ -212,10 +212,8 @@ if (!in_array($item, array('CVS', '.', '..'))) { $maintheme = $item; $subthemes = array(); - foreach (scandir($GLOBALS['ROOT'] . "/themes/" . $item) as $subitem) { - if (substr($subitem, -4) === '.php') { - $subthemes[] = substr($subitem, 0, -4); - } + foreach (glob($GLOBALS['ROOT'] . "/themes/" . $item . "/*.php") as $subitem) { + $subthemes[] = substr($subitem, 0, -4); } $themeList[$maintheme] = $subthemes; }

« previous php.doc.cvs (#1677) next »