Created
October 6, 2015 17:02
-
-
Save kevana/4a2261dddff934e85bc7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Case 1: If user is going to credit app from desktop prevent them from being redirected | |
# - User has cookie set | |
# - url is in active list. | |
# THEN prevent moovweb redirect | |
# Case 2: User is already on moovweb and goes to credit app page | |
# - Via header is set | |
# - User has cookie set | |
# - url is in active list | |
# Issues: no short circuit evaluation, | |
# AND | |
set compoundcond 1; | |
if (!cond1) { | |
set compoundcond 0; | |
} | |
if (!cond2) { | |
set compoundcond 0; | |
} | |
if (compoundcond) { # equivalent to if (cond1 && cond2) | |
do something useful | |
} | |
# OR | |
set compoundcond 0; | |
if (cond1) { | |
set compoundcond 1; | |
} | |
if (cond2) { | |
set compoundcond 1; | |
} | |
if (compoundcond) { # equivalent to if (cond1 || cond2) | |
do something useful | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment