Project

General

Profile

Bug #2720 » tinydns.patch

Replace file_put_contents() with glob() - Yonas Yanfa, 12/16/2012 08:14 PM

View differences:

tinydns.inc 2012-12-16 21:13:56.638263689 -0500 → tinydns.inc 2012-12-16 21:15:17.982260666 -0500
1134 1134
		exec("rm -R {$g['varetc_path']}/dnscache/root/servers/");
1135 1135
	exec("/bin/mkdir -p {$g['varetc_path']}/dnscache{$index}/root/servers/");
1136 1136
	if (intval($config['version']) >= 6)
1137
		if (file_exists("{$g['varetc_path']}/nameserver_*")) {
1137
		if (!empty(glob("{$g['varetc_path']}/nameserver_*"))) {
1138 1138
			exec("/bin/cat {$g['varetc_path']}/nameserver_* > {$g['varetc_path']}/dnscache{$index}/root/servers/@");
1139 1139
		} else {
1140 1140
			$fw = fopen("{$g['varetc_path']}/dnscache{$index}/root/servers/@", "w");
    (1-1/1)