moodlelib MDL-20110 - allow remoteip_in_list to return true for cli access

Previously it always failed and restricted access for users blocking ips and
running cron from cli
This commit is contained in:
Dan Poltawski
2010-03-21 15:03:26 +00:00
parent f8df83f357
commit ed28d08878
+6
View File
@@ -8432,6 +8432,12 @@ function cleardoubleslashes ($path) {
function remoteip_in_list($list){
$inlist = false;
$client_ip = getremoteaddr();
if(!$client_ip){
// ensure access on cli
return true;
}
$list = explode("\n", $list);
foreach($list as $subnet) {
$subnet = trim($subnet);