You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$records = $this->db->queryAllRecords("SELECT `source` FROM ?? WHERE `type` = 'client' AND `access` = 'OK' AND `active` = 'y' AND `server_id` = ? ORDER BY `source` ASC", $conf['mysql']['database'] . '.mail_access', $conf['server_id']);
1942
+
if (count($records) > 0) {
1943
+
if ($fp = fopen($filename, 'w')) {
1944
+
fwrite($fp, "# ISPConfig whitelisted ip addresses\n\n");
1945
+
foreach($recordsas$record) {
1946
+
fwrite($fp, $record['source'] . "\n");
1947
+
}
1948
+
fclose($fp);
1949
+
} else {
1950
+
$this->error("Error: cannot open $filename for writing");
$records = $app->db->queryAllRecords("SELECT `source` FROM ?? WHERE `type` = 'client' AND `access` = 'OK' AND `active` = 'y' AND `server_id` = ? ORDER BY `source` ASC", $conf['mysql']['database'] . '.mail_access', $conf['server_id']);
517
+
if (count($records) > 0) {
518
+
if ($fp = fopen($filename, 'w')) {
519
+
fwrite($fp, "# ISPConfig whitelisted ip addresses\n\n");
520
+
foreach($recordsas$record) {
521
+
fwrite($fp, $record['source'] . "\n");
522
+
}
523
+
fclose($fp);
524
+
} else {
525
+
$app->log("Error: cannot open $filename for writing", LOGLEVEL_WARN);
0 commit comments