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

Jump to login after timeout and fix alert #310

Merged
merged 11 commits into from
Feb 16, 2016

Conversation

dschwen
Copy link

@dschwen dschwen commented Feb 10, 2016

First of all: sorry this commit is muddied by whitespace changes, but I and my editor are total whitespace-nazis...

Anyhow the changes are a header('Location: Default.php?timeout=1'); in Functions.php, and a fix here

Closes #309

@dschwen
Copy link
Author

dschwen commented Feb 10, 2016

I see that a basic timeout functionality already exists, but time out can happen due to php sessions expiring. In that case the ugly "Fatal" error message was displayed withe the PHP die() command.

@DawoudIO
Copy link
Contributor

we should know what the URL via the config.php settings... why not use them vs all that stuff in the code

@DawoudIO DawoudIO added this to the 2.0.0 milestone Feb 11, 2016
@dschwen
Copy link
Author

dschwen commented Feb 11, 2016

Hm, I'm still trying to figure out the vagrant Config.php. It sets $sRootPath = '/churchinfo' but the login page is at /Default.php. What's up with that @crossan007 ?

@dschwen
Copy link
Author

dschwen commented Feb 11, 2016

Not to self empty is not the same as !isset :-)

@dschwen
Copy link
Author

dschwen commented Feb 11, 2016

Ok, This seems to work on the Vagrant box and makes $sRootPath do the important work now (be sure to set it correctly, it is set wrong in the Vagrant box). I'll have to review this thoroughly again though as this touches a whole bunch of files.

@dschwen
Copy link
Author

dschwen commented Feb 11, 2016

There is more stuff to do here. Just looking at the error logs I see Undefined index errors. Right now (after restoring the db) the login hangs for me.

Looks like I broke database restore. I'll probably try to break down this last commit into smaller parts.

@@ -291,7 +291,7 @@ function VancoErrorString (errNo)
case 67: return "Transaction must have at least one transaction fund.";
case 68: return "User is Inactive";
case 69: return "Expiration Date Invalid";
case 70: return "Account Type must be �C�, �S' for ACH and must be blank for Credit Card";
case 70: return "Account Type must be �C�, �S' for ACH and must be blank for Credit Card";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm is that expected the ?

@dschwen dschwen force-pushed the timeout_309 branch 5 times, most recently from aa3c2ac to a5084d6 Compare February 14, 2016 05:53
<link rel="stylesheet" type="text/css" href="<?= $sURLPath; ?>/vendor/almasaeed2010/adminlte/plugins/datatables/dataTables.bootstrap.css">
<script type="text/javascript" language="javascript" src="<?= $sURLPath; ?>/vendor/almasaeed2010/adminlte/plugins/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="<?= $sURLPath; ?>/vendor/almasaeed2010/adminlte/plugins/datatables/dataTables.bootstrap.js"></script>
<link rel="stylesheet" type="text/css" href="<?= $sRootPath >/vendor/almasaeed2010/adminlte/plugins/datatables/dataTables.bootstrap.css">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need the last ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I guess it was too late last night

On Sun, Feb 14, 2016, 12:01 AM George Dawoud notifications@github.com
wrote:

In churchinfo/AddEvent.php
#310 (comment):

@@ -44,9 +44,9 @@

require "Include/Header.php";
?>
-
-<script type="text/javascript" language="javascript" src="/vendor/almasaeed2010/adminlte/plugins/datatables/jquery.dataTables.min.js"></script>
-<script type="text/javascript" language="javascript" src="/vendor/almasaeed2010/adminlte/plugins/datatables/dataTables.bootstrap.js"></script>
+

don't we need the last ?


Reply to this email directly or view it on GitHub
https://github.com/ChurchCRM/CRM/pull/310/files#r52838348.

@dschwen
Copy link
Author

dschwen commented Feb 14, 2016

Ok, I went through this with a fine toothed comb. Let's see what Travis says. If it passes it is ready for a final review.

@DawoudIO
Copy link
Contributor

Starting to do a quick test with the changes now

@DawoudIO DawoudIO self-assigned this Feb 15, 2016
@@ -97,7 +96,7 @@
$usQueryResultSet = mysql_fetch_array($usQueryResult);
if ($usQueryResultSet == Null){
// Set the error text
$sErrorText = '&nbsp;' . gettext('Invalid login or password');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you remove the space?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a reason that some error messages should start with a non-breaking space. Use of &nbsp; for layout purposes is almost always a bad idea. It is better to fix the CSS to increase the margin if you want leading whitespace. But again this was handled inconsistently so I opted to remove the nbsps.

@dschwen
Copy link
Author

dschwen commented Feb 16, 2016

I rebased this after you merged a bunch of PRs earlier

DawoudIO added a commit that referenced this pull request Feb 16, 2016
Jump to login after timeout and fix alert
@DawoudIO DawoudIO merged commit 4476275 into ChurchCRM:develop Feb 16, 2016
@DawoudIO
Copy link
Contributor

OK, this has been open for a long time... time for the merge... we will file bugs if it break things that we did not notice.

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

Successfully merging this pull request may close these issues.

2 participants