FMCorz / mdk

Moodle Development Kit. A collection of tools meant to make developers' lives easier.
GNU General Public License v3.0
85 stars 47 forks source link

Respect the 'path' config when setting $CFG->sessioncookiepath #85

Closed mudrd8mz closed 10 years ago

mudrd8mz commented 10 years ago

Setups using the path config ended with invalid $CFG->sessioncookiepath set in config.php (always expecting the moodle is in the root). Moodle core itself has checks for this so the value set in config.php was ignored in that case.

FMCorz commented 10 years ago

Thanks for spotting this David, I do not use the path config myself. I'm really glad about the discoveries you make on MDK.

For your information, the followings are identical:

if C.get('path') != '' and C.get('path') != None:
if C.get('path'):

An empty string, or None, or False are all resolved as False.

Cheers, Fred

mudrd8mz commented 10 years ago

Thanks for the coding tip Fred. Haven't touched Python for a while so I copied these checks from your code :-)

FMCorz commented 10 years ago

Ah ah, blame me :D