Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for release 1.5.0a1 #1

Merged
merged 11 commits into from Sep 1, 2012
File renamed without changes.
3 changes: 3 additions & 0 deletions docbuilder/actions.php
Expand Up @@ -23,6 +23,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @category ToolsAndUtilities
* @package phpDocumentor
* @author Andrew Eddie
* @author Greg Beaver <cellog@php.net>
Expand All @@ -33,8 +34,10 @@
$path = dirname(__FILE__);
if ('@WEB-DIR@' != '@'.'WEB-DIR@')
{
/** @ignore */
include_once( "@WEB-DIR@/PhpDocumentor/docbuilder/includes/utilities.php" );
} else {
/** @ignore */
include_once( "$path/includes/utilities.php" );
}

Expand Down
3 changes: 2 additions & 1 deletion docbuilder/builder.php
Expand Up @@ -26,6 +26,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @category ToolsAndUtilities
* @package phpDocumentor
* @author Andrew Eddie
* @author Greg Beaver <cellog@php.net>
Expand Down Expand Up @@ -125,4 +126,4 @@
} else {
echo "whoops!";
}
?>
?>
1 change: 1 addition & 0 deletions docbuilder/config.php
Expand Up @@ -26,6 +26,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @category ToolsAndUtilities
* @package phpDocumentor
* @author Andrew Eddie
* @author Greg Beaver <cellog@php.net>
Expand Down
2 changes: 2 additions & 0 deletions docbuilder/file_dialog.php
Expand Up @@ -26,6 +26,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @category ToolsAndUtilities
* @package phpDocumentor
* @author Andrew Eddie
* @author Greg Beaver <cellog@php.net>
Expand Down Expand Up @@ -63,6 +64,7 @@
}
} else {

/** @ignore */
define(PHPDOC_WEBROOT_DIR, dirname(dirname(__FILE__)));
/**
* common file information
Expand Down
5 changes: 4 additions & 1 deletion docbuilder/includes/utilities.php
Expand Up @@ -23,6 +23,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @category ToolsAndUtilities
* @package phpDocumentor
* @author Andrew Eddie
* @author Greg Beaver <cellog@php.net>
Expand All @@ -33,8 +34,10 @@

if ('@DATA-DIR@' != '@'.'DATA-DIR@')
{
/** @ignore */
include_once('PhpDocumentor/HTML_TreeMenu-1.1.2/TreeMenu.php');
} else {
/** @ignore */
include_once(dirname(realpath(__FILE__))."/../../HTML_TreeMenu-1.1.2/TreeMenu.php");
}

Expand Down Expand Up @@ -213,4 +216,4 @@ function vdump_par($tree)
}
debug('<br>');
}
?>
?>
3 changes: 3 additions & 0 deletions docbuilder/top.php
Expand Up @@ -26,6 +26,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @category ToolsAndUtilities
* @package phpDocumentor
* @author Andrew Eddie
* @author Greg Beaver <cellog@php.net>
Expand All @@ -37,9 +38,11 @@
*/
if ('@DATA-DIR@' != '@'.'DATA-DIR@')
{
/** @ignore */
include_once( "PhpDocumentor/phpDocumentor/common.inc.php");
} else {
$path = dirname(dirname(__FILE__));
/** @ignore */
include_once( "$path/phpDocumentor/common.inc.php");
}
//
Expand Down
145 changes: 113 additions & 32 deletions package.xml
Expand Up @@ -69,45 +69,31 @@ http://localhost/pear/PhpDocumentor is the web interface</description>
<email>drewish@katherinehouse.com</email>
<active>no</active>
</developer>
<date>2011-12-03</date>
<time>13:00:00</time>
<date>2012-09-01</date>
<version>
<release>1.4.4</release>
<api>1.4.0</api>
<release>1.5.0a1</release>
<api>1.5.0</api>
</version>
<stability>
<release>stable</release>
<release>alpha</release>
<api>stable</api>
</stability>
<license uri="http://www.opensource.org/licenses/lgpl-license.php">LGPL</license>
<notes>
Includes these PEAR items:
* Fix Bug #11543: empty @todo tags/comments shouldn&apos;t be included in TODO list [ashnazg]
* Fix Bug #12704: XML/Beautifier removed comment in XML Docbook peardoc2 converter
template [ashnazg]
* Fix Bug #13606: parameter name and description do not line up in generated docs [ashnazg]
* Fix Bug #13653: Media file copy - copies incorrect file [ashnazg]
* Fix Bug #14201: templatebase not working as intended [ashnazg]
* Fix Bug #14640: class witch extending DOMDocument [ashnazg]
* Fix Bug #16279: Type Hints in Function Signature Cause Loss of @param type [ashnazg]
* Fix Bug #16546: Default parser uses php 4.0 standards [ashnazg]
* Fix Bug #16825: Templates Point to Nonexistent Image Files [ashnazg]
* Fix Bug #16826: Unused media folder and files exist [ashnazg]
* Fix Bug #17395: Fatal Error when trying to run document [ashnazg]
* Fix Bug #18058: Patch: fix some notices (which may cause a crash of other tools) [ashnazg]
* Fix Bug #18100: phpdocu-general@sourceforge.net bounces [ashnazg]
* Fix Bug #18220: Truncated filenames in Converter files [ashnazg]
* Fix Bug #18782: class tree generation mistake [ashnazg]
* Fix Bug #18870: Class tree wont shows implemented interfaces if class has no childs [ashnazg]
* Fix Bug #18871: Class tree wont shows internal PHP interfaces [ashnazg]
* Fix Bug #18872: Class tree puts comma uncorrectly in interfaces list [ashnazg]
* Fix Bug #19017: remove error_reporting (for PEAR QA team) [ashnazg]
* Implement Feature #12211: @inheritdoc not working for child methods &amp; variables [ashnazg]
* Implement Feature #15580: Add link back from api document to pear website or package website [ashnazg]
* Implement Feature #17906: Please, consider realising &apos;Plain.php&apos; file under PHP 3.01 license [ashnazg]
This release includes a new --charset runtime option.

Includes these Sourceforge items:
* [2155014] fatal error when parsing 'myclass extends DOMDocument'
This release will also see and document "RIC" files (Readme/Changelog/Install) in project subdirectories,
rather than only seeing them in the project root.

* Bug #12733: Warning in error.html file with XML:DocBook:peardoc2 [ashnazg]
* Bug #16784: CHM: files are duplicated in the [FILES] section of the project file. [ashnazg]
* Bug #19197: Fatal Error on building documentation [ashnazg]
* Bug #19243: Tutorials are not honoring ordered vs unordered lists [ashnazg|lapistano]
* Bug #19410: Sourcecode Option does not work [ashnazg|rhorber]

* Req #4960: support for different encoding [ashnazg|miau]
* Req #12236: Allow RIC files in all directory [ashnazg|yunosh]
* Req #19242: Allow images in tutorials [ashnazg|lapistano]
</notes>
<contents>
<dir baseinstalldir="PhpDocumentor" name="/">
Expand Down Expand Up @@ -193,6 +179,7 @@ Includes these Sourceforge items:
<file baseinstalldir="PhpDocumentor" name="Release-1.4.0rc2" role="doc" />
<file baseinstalldir="PhpDocumentor" name="Release-1.4.1" role="doc" />
<file baseinstalldir="PhpDocumentor" name="Release-1.4.2" role="doc" />
<file baseinstalldir="PhpDocumentor" name="Release-1.4.3" role="doc" />
</dir> <!-- /Documentation/Release-old -->
<dir name="tests">
<dir name="bug-557861">
Expand Down Expand Up @@ -1230,7 +1217,9 @@ Includes these Sourceforge items:
<file baseinstalldir="PhpDocumentor" name="constants.tpl" role="data" />
<file baseinstalldir="PhpDocumentor" name="docblock.tpl" role="data" />
<file baseinstalldir="PhpDocumentor" name="errors.tpl" role="data" />
<file baseinstalldir="PhpDocumentor" name="footer.tpl" role="data" />
<file baseinstalldir="PhpDocumentor" name="globals.tpl" role="data" />
<file baseinstalldir="PhpDocumentor" name="header.tpl" role="data" />
<file baseinstalldir="PhpDocumentor" name="imethods.tpl" role="data" />
<file baseinstalldir="PhpDocumentor" name="ivars.tpl" role="data" />
<file baseinstalldir="PhpDocumentor" name="method.tpl" role="data" />
Expand Down Expand Up @@ -1580,7 +1569,6 @@ Includes these Sourceforge items:
<tasks:replace from="@VER@" to="version" type="package-info" />
<tasks:replace from="@STABILITY@" to="state" type="package-info" />
</file>
<file baseinstalldir="PhpDocumentor" name="Release-1.4.3" role="doc" />
</dir> <!-- / -->
</contents>
<dependencies>
Expand Down Expand Up @@ -3218,6 +3206,30 @@ Includes these Sourceforge items:
- [1733936] &quot;phpdoc&quot; does not return with error code &quot;0&quot; on success [ashnazg|blueyed]
</notes>
</release>
<release>
<version>
<release>1.4.2</release>
<api>1.4.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2008-03-30</date>
<license uri="http://www.opensource.org/licenses/lgpl-license.php">LGPL</license>
<notes>
Includes these PEAR items:
Bug #12361: missing links to the filesource
Bug #12699: makedocs.sh script needs a better install location
Bug #12929: paramete &apos;ignore&apos; oper mistake
Doc #12764: Update INSTALL for web docbuilder

Includes these Sourceforge items:
- [1829133] Progress display not happening until conversion finished [ashnazg]
- [1779257] ignore=.. option not working correctly on Win | fix attaced [ashnazg|mrasnika]

</notes>
</release>
<release>
<version>
<release>1.4.3</release>
Expand All @@ -3241,5 +3253,74 @@ Includes these Sourceforge items:
- [1779257] ignore=.. option not working correctly on Win | fix attaced [ashnazg|mrasnika]
</notes>
</release>
<release>
<version>
<release>1.4.4</release>
<api>1.4.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2011-12-03</date>
<license uri="http://www.opensource.org/licenses/lgpl-license.php">LGPL</license>
<notes>
Includes these PEAR items:
* Fix Bug #11543: empty @todo tags/comments shouldn&apos;t be included in TODO list [ashnazg]
* Fix Bug #12704: XML/Beautifier removed comment in XML Docbook peardoc2 converter
template [ashnazg]
* Fix Bug #13606: parameter name and description do not line up in generated docs [ashnazg]
* Fix Bug #13653: Media file copy - copies incorrect file [ashnazg]
* Fix Bug #14201: templatebase not working as intended [ashnazg]
* Fix Bug #14640: class witch extending DOMDocument [ashnazg]
* Fix Bug #16279: Type Hints in Function Signature Cause Loss of @param type [ashnazg]
* Fix Bug #16546: Default parser uses php 4.0 standards [ashnazg]
* Fix Bug #16825: Templates Point to Nonexistent Image Files [ashnazg]
* Fix Bug #16826: Unused media folder and files exist [ashnazg]
* Fix Bug #17395: Fatal Error when trying to run document [ashnazg]
* Fix Bug #18058: Patch: fix some notices (which may cause a crash of other tools) [ashnazg]
* Fix Bug #18100: phpdocu-general@sourceforge.net bounces [ashnazg]
* Fix Bug #18220: Truncated filenames in Converter files [ashnazg]
* Fix Bug #18782: class tree generation mistake [ashnazg]
* Fix Bug #18870: Class tree wont shows implemented interfaces if class has no childs [ashnazg]
* Fix Bug #18871: Class tree wont shows internal PHP interfaces [ashnazg]
* Fix Bug #18872: Class tree puts comma uncorrectly in interfaces list [ashnazg]
* Fix Bug #19017: remove error_reporting (for PEAR QA team) [ashnazg]
* Implement Feature #12211: @inheritdoc not working for child methods &amp; variables [ashnazg]
* Implement Feature #15580: Add link back from api document to pear website or package website [ashnazg]
* Implement Feature #17906: Please, consider realising &apos;Plain.php&apos; file under PHP 3.01 license [ashnazg]

Includes these Sourceforge items:
* [2155014] fatal error when parsing 'myclass extends DOMDocument'
</notes>
</release>
<release>
<date>2012-09-01</date>
<version>
<release>1.5.0a1</release>
<api>1.5.0</api>
</version>
<stability>
<release>alpha</release>
<api>stable</api>
</stability>
<license uri="http://www.opensource.org/licenses/lgpl-license.php">LGPL</license>
<notes>
This release includes a new --charset runtime option.

This release will also see and document "RIC" files (Readme/Changelog/Install) in project subdirectories,
rather than only seeing them in the project root.

* Bug #12733: Warning in error.html file with XML:DocBook:peardoc2 [ashnazg]
* Bug #16784: CHM: files are duplicated in the [FILES] section of the project file. [ashnazg]
* Bug #19197: Fatal Error on building documentation [ashnazg]
* Bug #19243: Tutorials are not honoring ordered vs unordered lists [ashnazg|lapistano]
* Bug #19410: Sourcecode Option does not work [ashnazg|rhorber]

* Req #4960: support for different encoding [ashnazg|miau]
* Req #12236: Allow RIC files in all directory [ashnazg|yunosh]
* Req #19242: Allow images in tutorials [ashnazg|lapistano]
</notes>
</release>
</changelog>
</package>
17 changes: 15 additions & 2 deletions phpDocumentor/Converter.inc
Expand Up @@ -391,6 +391,12 @@ class Converter
*/
var $title = 'Generated Documentation';

/**
* @var string
* @see phpDocumentor_IntermediateParser::$charset
*/
var $charset = 'iso-8859-1';

/**
* Options for each template, parsed from the options.ini file in the template base directory
* @tutorial phpDocumentor/tutorials.pkg#conversion.ppage
Expand Down Expand Up @@ -448,8 +454,9 @@ class Converter
* @param string {@link $targetDir} value
* @param string {@link $templateDir} value
* @param string (@link $title} value
* @param string (@link $charset} value
*/
function Converter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $template, $title)
function Converter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $template, $title, $charset)
{
$this->all_packages = $allp;
$this->package_parents = $packp;
Expand All @@ -467,6 +474,7 @@ class Converter
$this->classes = &$classes;
$this->roots = $classes->getRoots($this->processSpecialRoots);
$this->title = $title;
$this->charset = $charset;
$this->setTemplateDir($template);
$this->setTargetdir($targetDir);
}
Expand Down Expand Up @@ -1267,7 +1275,8 @@ class Converter
} else
{ // if close tag is specified, use the open and close as literal
if ($name == 'programlisting' && isset($attr['role']) &&
($attr['role'] == 'php' || $attr['role'] == 'tutorial' || $attr['role'] == 'html'))
($attr['role'] == 'php' || $attr['role'] == 'tutorial' ||
$attr['role'] == 'html' || $attr['role'] == 'xml') )
{ // highlight PHP source
// var_dump($unconvertedcdata, $cdata);exit;
if ($attr['role'] == 'php') {
Expand All @@ -1276,7 +1285,10 @@ class Converter
$cdata = $this->TutorialExample($unconvertedcdata);
} elseif ($attr['role'] == 'html') {
$cdata = $unconvertedcdata;
} elseif ($attr['role'] == 'xml') {
$cdata = '<pre>'.htmlentities($unconvertedcdata).'</pre>';
}
$cdata = $this->template_options['ppage'][$name].$this->AttrToString($name,$attr). $cdata .$this->template_options['ppage']['/'.$name];
} else
{// normal case below
$cdata = $this->template_options['ppage'][$name].$this->AttrToString($name,$attr). $cdata .$this->template_options['ppage']['/'.$name];
Expand Down Expand Up @@ -5087,6 +5099,7 @@ class Converter
$templ->config_dir = realpath($this->smarty_dir . PATH_DELIMITER . 'configs');
$templ->assign("date",date("r",time()));
$templ->assign("maintitle",$this->title);
$templ->assign("charset",$this->charset);
$templ->assign('default_package',$GLOBALS['phpDocumentor_DefaultPackageName']);
$templ->assign("package",$this->package);
$templ->assign("phpdocversion",PHPDOCUMENTOR_VER);
Expand Down
13 changes: 11 additions & 2 deletions phpDocumentor/Converters/CHM/default/CHMdefaultConverter.inc
Expand Up @@ -128,13 +128,18 @@ class CHMdefaultConverter extends Converter
*/
var $KLinks = array();

/**
* track which files have already been parsed
*/
var $_filenames = array();

/**
* sets {@link $base_dir} to $targetDir
* @see Converter()
*/
function CHMdefaultConverter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $templateDir, $title)
function CHMdefaultConverter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $templateDir, $title, $charset)
{
Converter::Converter($allp, $packp, $classes, $procpages,$po, $pp, $qm, $targetDir, $templateDir, $title);
Converter::Converter($allp, $packp, $classes, $procpages,$po, $pp, $qm, $targetDir, $templateDir, $title, $charset);
$this->base_dir = $targetDir;
}

Expand All @@ -159,6 +164,10 @@ class CHMdefaultConverter extends Converter
*/
function writeSource($path, $value)
{
if (in_array($path, $this->_filenames)) {
return; // this file has already been parsed
}
array_push($this->_filenames,$path);
$templ = &$this->newSmarty();
$pathinfo = $this->proceduralpages->getPathInfo($path, $this);
$templ->assign('source',$value);
Expand Down