I hope this isn't considered petty as it really is a tiny, tiny bug which has little or no impact, but nonetheless doesn't mean it shouldn't be corrected...
I've spotted an unnecessary call to uc_ssl_switch_to_non_ssl() inside some flow where it has already been determined (boolean).On a very busy site it could have a small performance impact.
If we enter the else{} branch at line 238 then uc_ssl_switch_to_non_ssl() must have evaluated to TRUE in the if{} at line 230. So at line 250 there is no need to test uc_ssl_switch_to_non_ssl() as has to be TRUE to reach this point in the logic.
FILE: modules/uc_ssl/uc_ssl.module
228 //Switch to SSL no matter what the link is if Switch isnt on.
229 if (!uc_ssl_switch_to_non_ssl())
230 {
...
235 }
236 else
237 {
...
239 if (uc_ssl_page_is_in_https_mode())
240 {
...
247 if (!uc_ssl_path_match($current_path, $include_secured_urls) && uc_ssl_switch_to_non_ssl())
248 {
...
250 }251 }
252 }
N.B Yeah I know I've blockquoted it, but the <code> tags are literal and stop me emboldening the two main points I'm talking about.
Comments
Comment #1
crystaldawn commentedSeems logical enough, it has already returned true, no need to have it lingering around again. I'll remove that one.
Comment #2
crystaldawn commented