$file = $topdir."/".$list."/control/".$name;
$value = "";
- if(!is_file($file))
- $lines = array("");
- else
+ if(is_file($file)) {
$lines = file($file);
-
- $value = $lines[0];
+ $value = $lines[0];
+ }
$tpl->assign(array("NAME" => htmlentities($name),
"NICENAME" => htmlentities($nicename),
$file = "$topdir/$list/control/$name";
$value = "";
- if(!is_file($file))
- $lines = array();
- else
- $lines = file($file);
-
- foreach ($lines as $line)
- {
- $value .= $line;
- }
+ if(is_file($file))
+ $value = file_get_contents($file);
$tpl->assign(array("NAME" => htmlentities($name),
"NICENAME" => htmlentities($nicename),