From a75d10d7548e69fb6fd3b9dcf14d357febcc72f4 Mon Sep 17 00:00:00 2001
From: pedro_morgan <pedro_morgan@ispconfig3>
Date: Tue, 21 Aug 2007 19:32:35 -0400
Subject: [PATCH] Removed globals and created private vars
---
install/lib/install.lib.php | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index 326067f..f705d2b 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -57,14 +57,15 @@
$FILE = realpath('../install.php');
function get_distname() {
+ global $conf; // TODO wtf ?
$distname = $conf['distname'];
return $distname;
}
function sread() {
- $fp=fopen('/dev/stdin', 'r');
- $input=fgets($fp, 255);
- fclose($fp);
+ $f = fopen('/dev/stdin', 'r');
+ $input = fgets($f, 255);
+ fclose($f);
return rtrim($input);
}
@@ -77,8 +78,7 @@
}
function ilog($msg){
- $logfile = '/var/log/ispconfig_install.log';
- exec("echo `date` \"- [ISPConfig] - \"".$msg." >> ".$logfile);
+ exec("echo `date` \"- [ISPConfig] - \"".$msg." >> ".ISPC_LOG_FILE);
}
function error($msg){
@@ -118,7 +118,7 @@
}
function mkdirs($strPath, $mode = '0755'){
- if(isset($strPath) && $strPath != ""){
+ if(isset($strPath) && $strPath != ''){
//* Verzeichnisse rekursiv erzeugen
if(is_dir($strPath)){
return true;
@@ -235,17 +235,17 @@
$lines = explode("\n", $inhalt);
if(!empty($lines)){
foreach($lines as $line){
- if(stristr($line, "include ")){
- $include_file = str_replace("\n", "", trim(shell_exec("echo \"$line\" | awk '{print \$2}'")));
- if(substr($include_file,0,1) != "/"){
- $include_file = $httpd_root."/".$include_file;
+ if(stristr($line, 'include ')){
+ $include_file = str_replace("\n", '', trim(shell_exec("echo \"$line\" | awk '{print \$2}'")));
+ if(substr($include_file,0,1) != '/'){
+ $include_file = $httpd_root.'/'.$include_file;
}
if(is_file($include_file)){
if($further_includes = find_includes($include_file)){
$includes = array_merge($includes, $further_includes);
}
} else {
- if(strstr($include_file, "*")){
+ if(strstr($include_file, '*')){
$more_files = explode("\n", shell_exec("ls -l $include_file | awk '{print \$9}'"));
if(!empty($more_files)){
foreach($more_files as $more_file){
--
Gitblit v1.9.1