Req #51654 [Csd]: Add --ext command line option to specify filename extension
| From: | bjori@php.net | Date: | Sun, 25 Apr 2010 21:08:31 +0000 |
| Subject: | Req #51654 [Csd]: Add --ext command line option to specify filename extension | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-4235@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51654&edit=1
ID: 51654
Updated by: bjori@php.net
Reported by: pmjones88 at gmail dot com
Summary: Add --ext command line option to specify filename
extension
Status: Closed
Type: Feature/Change Request
Package: Doc Build problem
Operating System: Mac OS X 10.6.3
PHP Version: 5.3.2
Assigned To: bjori
New Comment:
Is there really a usecase for not having a file extension at all?
I don't mind expanding it again, it just felt wrong...
Previous Comments:
------------------------------------------------------------------------
[2010-04-25 22:21:47] pmjones88 at gmail dot com
Bjori -- thanks for applying the patch, I appreciate it. We're almost
there.
The problem with using the short-ternary is that null/false/empty-string
has some significance. You can't, for example, pass --ext=false for "no
extension".
Please see the upcoming patch that makes such a thing possible (it has
the expanded ternaries in it, it all).
Thanks again!
------------------------------------------------------------------------
[2010-04-25 16:10:26] bjori@php.net
This bug has been fixed in SVN. Since the websites are not directly
updated from the SVN server, the fix might need some time to spread
across the globe to all mirror sites, including PHP.net itself.
Thank you for the report, and for helping us make PHP.net better.
Changed it to use short-ternary.
Kudos!
------------------------------------------------------------------------
[2010-04-25 16:09:52] bjori@php.net
Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=298508
Log: Fixed bug#51654 (Add --ext command line option to specify filename
extension)
# Patch by Paul m Jones
------------------------------------------------------------------------
[2010-04-24 17:55:28] pmjones88 at gmail dot com
Description:
------------
Patch Narrative
===============
This patch allows the user to pass a
--ext option at the command line
to specify an alternative file extension. This mimics the XSL param
html.ext available when using xsltproc.
The user can specify that no extension be used by passing with
--ext=false, or the alternative extension to be used with
--ext=".foo". (Note that the dot is part of the value.) Not passing
--ext, or passing --ext=true, results in using the default
extension.
I have successfully built Chunked XHTML with this patch in place.
Patch Summary
=============
- Changed all variations of '.' . $this->ext to
$this->ext.
- Changed all variations of '.' . $this->getExt() to
$this->getExt().
- Added --ext and -e as options, with requisite functions in
BuildOptionsParser and array element in Config.
- Changed all $this->setExt("ext") calls to use a ternary; it sets the
alternative extension when --ext is specified, and sets the default
package extension otherwise.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51654&edit=1