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

Fix bugs in SQL query restore after session expire #14094

Closed
wants to merge 5 commits into from

Conversation

@shucon
Copy link
Contributor

@shucon shucon commented Mar 18, 2018

Fixes: #14093
Also, the sql query was getting stored in the browser indefinetly even after visiting another page and then coming back. So it had to be cleared from localstorage on page change.

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: #14093
Also, the sql query was getting stored in the browser indefinetly even after visiting another page and then coming back. So it had to be cleared from localstorage on page change.

Signed-off-by: Saksham Gupta <shucon01@gmail.com>
@codecov
Copy link

@codecov codecov bot commented Mar 24, 2018

Codecov Report

Merging #14094 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master   #14094      +/-   ##
============================================
+ Coverage     55.43%   55.43%   +<.01%     
- Complexity    14366    14374       +8     
============================================
  Files           494      494              
  Lines         70550    70612      +62     
============================================
+ Hits          39106    39147      +41     
- Misses        31444    31465      +21
Signed-off-by: Saksham Gupta <shucon01@gmail.com>
@mauriciofauth mauriciofauth requested a review from nijel Mar 26, 2018
@@ -82,6 +82,7 @@ public static function getHtml(
// start output
$html .= '<form method="post" action="import.php" ' . $enctype;
$html .= ' class="ajax lock-page"';
$html .= ' onsubmit=window.localStorage.auto_saved_sql=""';

This comment has been minimized.

@mauriciofauth

mauriciofauth Mar 27, 2018
Member

Why add inline javascript here? See #13270.

This comment has been minimized.

@shucon

shucon Mar 27, 2018
Author Contributor

Most places have inline onsubmit present in forms so maintain the same coding style I preferred inline js.

This comment has been minimized.

@shucon

shucon Mar 27, 2018
Author Contributor

Okay, so all the onsubmit js are inline and needs to be changed, so I'll just fix this one here.

shucon added 2 commits Mar 27, 2018
Signed-off-by: Saksham Gupta <shucon01@gmail.com>
Signed-off-by: Saksham Gupta <shucon01@gmail.com>
Copy link
Member

@mauriciofauth mauriciofauth left a comment

The "Get auto-saved query" button has no more action after these changes.

@shucon
Copy link
Contributor Author

@shucon shucon commented Mar 31, 2018

@mauriciofauth Get auto-saved query is not working on master branch too. I'll check it and try to fix that too.

Signed-off-by: Saksham Gupta <shucon01@gmail.com>
@mauriciofauth
Copy link
Member

@mauriciofauth mauriciofauth commented May 3, 2018

Thanks for your contribution.
Closing this PR in favor of #14166.

@mauriciofauth mauriciofauth self-assigned this May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.