fix: hack but saves editing the tcppdf files in vendor folder #5307 #5343

Merged
merged 1 commit into from Jan 8, 2017

Projects

None yet

4 participants

@laf
Member
laf commented Jan 8, 2017

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Fixes: #5307

@laf laf fix: hack but saves editing the tcppdf files in vendor folder
56752bc
@scrutinizer-notifier

The inspection completed: No new issues

@@ -48,7 +48,7 @@
if (isset($_GET['report']) && !empty($_GET['report'])) {
$report = mres($_GET['report']);
- $pdf->SetHeaderData('../../'.$config['title_image'], 40, ucfirst($report), $config['project_name'], array(0, 0, 0), array(0, 64, 128));
+ $pdf->SetHeaderData('../../../../../html/'.$config['title_image'], 40, ucfirst($report), $config['project_name'], array(0, 0, 0), array(0, 64, 128));
@murrant
murrant Jan 8, 2017 edited Contributor

Why not use $config['install_dir']? That way you aren't using a relative directory.

@laf
laf Jan 8, 2017 Member

Because the pdf library already has it's path set so it ends up being /opt/librenms/vendor/phppdf/dasa/dasdas/dasdas/opt/librenms/html/

@murrant
murrant Jan 8, 2017 Contributor

That's pretty annoying...

@laf
laf Jan 8, 2017 Member

Yeah, we can override it in the config file of the pdf library but if we update it will potentially revert that anyway

@murrant murrant merged commit bf64f93 into librenms:master Jan 8, 2017

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@laf laf deleted the laf:issue-5307 branch Jan 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment