BUG 8626 Problema con backup IMPROVEMENT
- The function no exist in boostrap. - was add the function.
This commit is contained in:
@@ -2917,5 +2917,32 @@ class Bootstrap
|
|||||||
return $url;
|
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";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ function run_workspace_backup($args, $opts) {
|
|||||||
$filesize = array_key_exists("filesize", $opts) ? $opts['filesize'] : -1;
|
$filesize = array_key_exists("filesize", $opts) ? $opts['filesize'] : -1;
|
||||||
if($filesize >= 0)
|
if($filesize >= 0)
|
||||||
{
|
{
|
||||||
if(!G::isLinuxOs()){
|
if(!Bootstrap::isLinuxOs()){
|
||||||
CLI::error("This is not a Linux enviroment, cannot use this filesize [-s] feature.\n");
|
CLI::error("This is not a Linux enviroment, cannot use this filesize [-s] feature.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -429,7 +429,7 @@ function run_workspace_restore($args, $opts) {
|
|||||||
$multiple = array_key_exists("multiple", $opts);
|
$multiple = array_key_exists("multiple", $opts);
|
||||||
$dstWorkspace = $args[1];
|
$dstWorkspace = $args[1];
|
||||||
if(!empty($multiple)){
|
if(!empty($multiple)){
|
||||||
if(!G::isLinuxOs()){
|
if(!Bootstrap::isLinuxOs()){
|
||||||
CLI::error("This is not a Linux enviroment, cannot use this multiple [-m] feature.\n");
|
CLI::error("This is not a Linux enviroment, cannot use this multiple [-m] feature.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user