Fix display of custom header and footer in certain edge cases. #12803

Merged
merged 1 commit into from Dec 19, 2016

Projects

None yet

3 participants

@ibennetch
Contributor

Before submitting pull request, please check that every commit:

  • Has proper Signed-Off-By
  • Has commit message which describes it
  • Is needed on it's own, if you have just minor fixes to previous commits, you can squash them
  • Any new functionality is covered by tests

Fixes issues #12801 and #12802

Signed-off-by: Isaac Bennetch bennetch@gmail.com

@codecov-io
codecov-io commented Dec 12, 2016 edited

Current coverage is 50.15% (diff: 0.00%)

Merging #12803 into QA_4_6 will increase coverage by <.01%

@@             QA_4_6     #12803   diff @@
==========================================
  Files           485        485          
  Lines         81407      81404     -3   
  Methods        2133       2133          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          40829      40828     -1   
+ Misses        40578      40576     -2   
  Partials          0          0          

Powered by Codecov. Last update 96350a7...e3a4bfe

@@ -90,7 +90,7 @@ public function authForm()
$response->addHTML('</h3>');
if (@file_exists(CUSTOM_FOOTER_FILE)) {
- include CUSTOM_FOOTER_FILE;
+ $response->addHTML(file_get_contents(CUSTOM_FOOTER_FILE));
@nijel
nijel Dec 13, 2016 Member

With this change we stop interpreting the footer as PHP, but include it as is in output....

@ibennetch
ibennetch Dec 14, 2016 edited Contributor

It seems to work with my for a config.footer.inc.php like

<h2>Test: <?php echo date('h:i:s');?></h2>

I get the expected interpreted output, not literal PHP code. Do you have a suggestion of an alternative method I should use?

@nijel
nijel Dec 19, 2016 Member

It does not render it in this case (for http auth). I think the ob logic should be reused, I've done this in 7d36180.

@nijel nijel self-assigned this Dec 13, 2016
@ibennetch ibennetch Fix display of custom header and footer in certain edge cases.
Issues #12801 and #12802

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
e3a4bfe
@ibennetch
Contributor

Rebased and force-pushed to fix merge conflicts, I think that conflicts with the merge you pushed earlier so if you pull again, you'll probably have an easier time deleting the local branch and pulling again.

@nijel nijel merged commit e3a4bfe into phpmyadmin:QA_4_6 Dec 19, 2016

3 of 4 checks passed

codecov/patch 0.00% of diff hit (target 50.15%)
Details
codecov/project 50.15% (+<.01%) compared to 96350a7
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.0006%) to 49.745%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment