svn: /phpdoc/doc-base/trunk/scripts/ entities.php

From: Date: Mon, 08 Feb 2016 07:48:56 +0000
Subject: svn: /phpdoc/doc-base/trunk/scripts/ entities.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-14021@lists.php.net to get a copy of this message
sobak Mon, 08 Feb 2016 07:48:56 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=338576 Log: Updates for entities.php - removed notice - introduced SVN support Changed paths: U phpdoc/doc-base/trunk/scripts/entities.php Modified: phpdoc/doc-base/trunk/scripts/entities.php =================================================================== --- phpdoc/doc-base/trunk/scripts/entities.php 2016-02-08 01:51:28 UTC (rev 338575) +++ phpdoc/doc-base/trunk/scripts/entities.php 2016-02-08 07:48:56 UTC (rev 338576) @@ -20,7 +20,7 @@ $Id$ */ -if ($argc > 3 || in_array($argv[1], array('--help', '-help', '-h', '-?'))) { +if ($argc > 3 || (isset($argv[1]) && in_array($argv[1], array('--help', '-help', '-h', '-?')))) { ?> Find entity usage in phpdoc xml files and @@ -31,7 +31,7 @@ <entity-file> must be a file name (with relative path from the phpdoc root) to a file containing - <!ENTITY...> definitions. Defaults to entities/global.ent. + <!ENTITY...> definitions. Defaults to doc-base/entities/global.ent. <language-code> must be a valid language code used in the repository, or 'all' for all languages. Defaults to en. @@ -45,8 +45,8 @@ } // CONFIG SECTION -// Main directory of the PHP documentation (one dir up in cvs) -$docdir = dirname(realpath(__FILE__)) ."/../"; +// Main directory of the PHP documentation (two directories up in the structure) +$docdir = realpath(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..') . DIRECTORY_SEPARATOR; /*********************************************************************/ /* Nothing to modify below this line */ @@ -60,7 +60,7 @@ // Default values $langcodes = array("en"); -$filename = "entities/global.ent"; +$filename = "doc-base/entities/global.ent"; // Parameter value copying if ($argc == 3) { @@ -111,19 +111,12 @@ $directories = array(); $files = array(); - // Skip old and unused functions directories (theoretically - // it should only be in the English tree, but we are smart - // and check for other language trees too...) - if (preg_match("!/([a-z]{2}|pt_BR)/functions!", $dir)) { - return; - } - // Open and traverse the directory $handle = @opendir($dir); while ($file = @readdir($handle)) { // Collect directories and XML files - if ($file != 'CVS' && $file != '.' && + if ($file != '.svn' && $file != '.' && $file != '..' && is_dir($dir.$file)) { $directories[] = $file; } @@ -223,5 +216,3 @@ fclose($fp); echo "Done!\n"; - -?>

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