BUG 8626 Problema con backup IMPROVEMENT

- The function no exist in boostrap.
- was add the function.
This commit is contained in:
Marco Antonio Nina
2013-01-03 12:55:15 -04:00
parent d1194c5112
commit 9a812e9a7f
2 changed files with 30 additions and 3 deletions

View File

@@ -2917,5 +2917,32 @@ class Bootstrap
return $url;
}
}
/**
* isWinOs
*
* @return true if the 3 first letters of PHP_OS got 'WIN', otherwise false.
*/
function isWinOs()
{
return strtoupper(substr(PHP_OS, 0, 3)) == "WIN";
}
/**
* isNTOs
*
* @return true if PHP_OS is 'WINNT', otherwise false.
*/
function isNTOs()
{
return PHP_OS == "WINNT";
}
/**
* isLinuxOs
*
* @return true if PHP_OS (upper text) got 'LINUX', otherwise false.
*/
function isLinuxOs()
{
return strtoupper(PHP_OS) == "LINUX";
}
}

View File

@@ -384,7 +384,7 @@ function run_workspace_backup($args, $opts) {
$filesize = array_key_exists("filesize", $opts) ? $opts['filesize'] : -1;
if($filesize >= 0)
{
if(!G::isLinuxOs()){
if(!Bootstrap::isLinuxOs()){
CLI::error("This is not a Linux enviroment, cannot use this filesize [-s] feature.\n");
return;
}
@@ -429,7 +429,7 @@ function run_workspace_restore($args, $opts) {
$multiple = array_key_exists("multiple", $opts);
$dstWorkspace = $args[1];
if(!empty($multiple)){
if(!G::isLinuxOs()){
if(!Bootstrap::isLinuxOs()){
CLI::error("This is not a Linux enviroment, cannot use this multiple [-m] feature.\n");
return;
}