Changeset View
Changeset View
Standalone View
Standalone View
src/utils/utils.php
Show First 20 Lines • Show All 1,921 Lines • ▼ Show 20 Lines | |||||
function phutil_is_noninteractive() { | function phutil_is_noninteractive() { | ||||
if (function_exists('posix_isatty') && !posix_isatty(STDIN)) { | if (function_exists('posix_isatty') && !posix_isatty(STDIN)) { | ||||
return true; | return true; | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
function phutil_is_interactive() { | |||||
if (function_exists('posix_isatty') && posix_isatty(STDIN)) { | |||||
return true; | |||||
} | |||||
return false; | |||||
} | |||||
function phutil_encode_log($message) { | function phutil_encode_log($message) { | ||||
return addcslashes($message, "\0..\37\\\177..\377"); | return addcslashes($message, "\0..\37\\\177..\377"); | ||||
} | } | ||||
/** | /** | ||||
* Insert a value in between each pair of elements in a list. | * Insert a value in between each pair of elements in a list. | ||||
* | * | ||||
* Keys in the input list are preserved. | * Keys in the input list are preserved. | ||||
Show All 23 Lines |