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

Fixes Import Fail #14085

Merged
merged 2 commits into from Mar 23, 2018

Conversation

Projects
None yet
3 participants
@shucon
Contributor

shucon commented Mar 14, 2018

Fixes: #14072

Signed-off-by: Saksham Gupta shucon01@gmail.com

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 Import Fail
Fixes: #14072

Signed-off-by: Saksham Gupta <shucon01@gmail.com>
@shucon

This comment has been minimized.

Contributor

shucon commented Mar 15, 2018

Travis CI build failed and seems to be somewhat related, any ideas?

@primarytech

This comment has been minimized.

primarytech commented on d243728 Mar 19, 2018

That fixed my issues. Thanks!

if (function_exists("uploadprogress_get_info")) {
$status = uploadprogress_get_info($id);
} else {
$status = getallheaders();

This comment has been minimized.

@mauriciofauth

mauriciofauth Mar 22, 2018

Member

Hi @shucon. Why did you choose getallheaders?

This comment has been minimized.

@shucon

shucon Mar 22, 2018

Contributor

Line 59 used ImportAjax::progressCheck() , which checked whether getallheaders or uploadprogress_get_info function exists. So getallheaders was important as it was getting checked.

This comment has been minimized.

@mauriciofauth

mauriciofauth Mar 23, 2018

Member

But the return of getallheaders() does not make much sense to the code just below it.

Maybe the problem is in ImportAjax::progressCheck().

public static function progressCheck()
{
return function_exists("uploadprogress_get_info")
|| function_exists('getallheaders');
}

I think it should be an && instead of an ||. What do you think?

This comment has been minimized.

@shucon

shucon Mar 23, 2018

Contributor

Yes, you were correct. Sorry for the confusion.

@shucon

This comment has been minimized.

Contributor

shucon commented Mar 23, 2018

I read a bit about getallheaders before using it here and I was convinced that both functions are similar and upload_progress_get_info is not used anymore.

@shucon

This comment has been minimized.

Contributor

shucon commented Mar 23, 2018

Also changing or to and would render progress bar useless for most of the cases.

@shucon

This comment has been minimized.

Contributor

shucon commented Mar 23, 2018

Okay, I think you are right , I'll check it once when I get time.

@codecov

This comment has been minimized.

codecov bot commented Mar 23, 2018

Codecov Report

Merging #14085 into master will increase coverage by <.01%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master   #14085      +/-   ##
============================================
+ Coverage     55.42%   55.43%   +<.01%     
- Complexity    14365    14366       +1     
============================================
  Files           494      494              
  Lines         70547    70550       +3     
============================================
+ Hits          39104    39106       +2     
- Misses        31443    31444       +1
Fix Import Fail
Signed-off-by: Saksham Gupta <shucon01@gmail.com>

@mauriciofauth mauriciofauth merged commit 1f70ea3 into phpmyadmin:master Mar 23, 2018

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
Codacy/PR Quality Review Good work! A positive pull request.
Details
DCO All commits have a DCO sign-off from the author
Scrutinizer No new issues
Details

@mauriciofauth mauriciofauth self-assigned this Mar 23, 2018

@mauriciofauth mauriciofauth added this to the 4.8.0 milestone Mar 23, 2018

@mauriciofauth

This comment has been minimized.

Member

mauriciofauth commented Mar 23, 2018

Merged, thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment