com web/php: anchor quickref.php regex: quickref.php

From: Date: Sun, 19 Aug 2012 11:38:44 +0000
Subject: com web/php: anchor quickref.php regex: quickref.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-14540@lists.php.net to get a copy of this message
Commit: 5551124c2c9792636b8ba3a472cf31c57be55f4f Author: Peter Cowburn <petercowburn@gmail.com> Sun, 19 Aug 2012 12:35:48 +0100 Parents: 5ecba0453441da701b0ab963daba4a36ca30af20 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=5551124c2c9792636b8ba3a472cf31c57be55f4f Log: anchor quickref.php regex The previous regex stumbled on some pages. For example, reflectionfunction..construct.php was included in the list since it matches function.<something>.php Changed paths: M quickref.php Diff: diff --git a/quickref.php b/quickref.php index 90d89e8..d1e04a2 100644 --- a/quickref.php +++ b/quickref.php @@ -73,7 +73,7 @@ while (($entry = readdir($dirh)) !== FALSE) { if (substr($entry, 0, 1) == ".") { continue; } // For function and class pages, get the name out - if (preg_match('!(function|class)\.(.+)\.php!', $entry, $parts)) { + if (preg_match('!^(function|class)\.(.+)\.php$!', $entry, $parts)) { $funcname = str_replace('-', '_', $parts[2]); $functions[$entry] = $funcname;

« previous php.webmaster (#14540) next »