TASK-290 Add new new command for Auth Sources Cron
This commit is contained in:
@@ -103,6 +103,7 @@ class CLI
|
||||
public static function help ($args, $opts = null)
|
||||
{
|
||||
global $argv;
|
||||
|
||||
$scriptName = $argv[0];
|
||||
if (is_array($args) && count($args) > 0 ) {
|
||||
$taskName = $args[0];
|
||||
@@ -202,10 +203,12 @@ EOT;
|
||||
CLI::taskName( "help" );
|
||||
CLI::taskRun( array ('self','help'
|
||||
) );
|
||||
|
||||
global $argv;
|
||||
$args = $argv;
|
||||
$cliname = array_shift( $args );
|
||||
$taskName = array_shift( $args );
|
||||
|
||||
if (isset($taskName[0])) {
|
||||
while ($taskName[0] == '-') {
|
||||
$taskName = array_shift( $args );
|
||||
@@ -345,7 +348,7 @@ EOT;
|
||||
* @param string $message the message to display
|
||||
* @param string $filename the log file to write messages
|
||||
*/
|
||||
public static function logging ($message, $filename = null)
|
||||
public static function logging($message, $filename = null, $color = null)
|
||||
{
|
||||
static $log_file = null;
|
||||
if (isset( $filename )) {
|
||||
@@ -355,7 +358,7 @@ EOT;
|
||||
if (isset( $log_file )) {
|
||||
fwrite( $log_file, $message );
|
||||
}
|
||||
echo $message;
|
||||
eprintln($message, $color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user