Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Bug #13653 Media file copy - copies incorrect file
Submitted: 2008-04-11 15:19 UTC
From: alexlittle Assigned: ashnazg
Status: Closed Package: PhpDocumentor (version 1.4.2)
PHP Version: 5.2.3 OS: Windows
Roadmaps: 1.4.4    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 32 - 25 = ?

 
 [2008-04-11 15:19 UTC] alexlittle (Alex Little)
Description: ------------ I'm using the following command to generate the docs: phpdoc -f d:\websites\cohere-web\phplib\apilib.php -t d:\websites\cohere-web\help\code-doc\ -tb d:\websites\cohere-web\_util\phpdoctemplates Most of which is working fine, but the only problem being that it's copying the media (css) files from: D:\utilities\PhpDocumentor\phpDocumentor\Converters\HTML\frames\templates\default\templates\media (where my PhpDoc install is) rather than: D:\websites\cohere-web\_util\phpdoctemplates\Converters\HTML\frames\templates\default\templates\media (which is where my custom stylesheet is) So looks like the copier needs to get the correct file if someone is using a custom template. More info here: http://sourceforge.net/forum/forum.php?thread_id=2004248&forum_id=35065

Comments

 [2008-12-30 19:30 UTC] stevehsu2 (Steven Hsu)
This problem occurs when the Converters are instantiated (IntermediateParser.inc, line ~1867). The Converter constructor calls $this->setTemplateDir($template) which causes the template base directory to get set to the PHPDoc installation directory. If the user has specified a different template name than one that already exists, PHPDoc dies due to the folder not existing (Converter.inc, line ~5133). As a dirty workaround, I've made the following changes, which seem to work (but would love to have an official fix): Change Converter::setTemplateDir() to have: if(isset($GLOBALS['_phpDocumentor_template_base'])) { $templateBase = str_replace('\\', '/', $GLOBALS['_phpDocumentor_template_base']); } else if ('@DATA-DIR@' != '@'.'DATA-DIR@') { $templateBase = str_replace('\\', '/', '@DATA-DIR@/PhpDocumentor/phpDocumentor'); } else { $templateBase = str_replace('\\','/',$GLOBALS['_phpDocumentor_install_dir']) . '/phpDocumentor'; In Setup.inc.php line 371: // Setup the different classes if (isset($_phpDocumentor_setting['templatebase'])) { $this->render->setTemplateBase(trim($_phpDocumentor_setting['templatebase'])); $GLOBALS['_phpDocumentor_template_base'] = trim($_phpDocumentor_setting['templatebase']); }
 [2009-10-12 01:34 UTC] ashnazg (Chuck Burgess)
-Status: Open +Status: Closed -Assigned To: +Assigned To: ashnazg
Committed fix to SVN... thanks for the hints, Steven.