PMC-1213 Set missing values, previous changes are reverted.

This commit is contained in:
Roly Rudy Gutierrez Pinto
2019-09-19 10:32:48 -04:00
parent 9e1431ce8e
commit 25d432b0c6
3 changed files with 9 additions and 23 deletions

View File

@@ -1682,21 +1682,4 @@ class System
}
return (object) $result;
}
/**
* This read the server information file and set the missing values to $_SERVER.
* @param string $workspace
*/
public static function readServerInfoFile(string $workspace)
{
$path = PATH_DATA . "sites" . DIRECTORY_SEPARATOR . $workspace . DIRECTORY_SEPARATOR;
if (is_file($path . '.server_info')) {
$string = file_get_contents($path . '.server_info');
$result = unserialize($string);
$_SERVER['SERVER_NAME'] = $result['SERVER_NAME'];
$_SERVER['SERVER_PORT'] = $result['SERVER_PORT'];
} else {
eprintln('WARNING! No server info found!', 'red');
}
}
}