mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Moving the clear command into the shell dispatcher
This commit is contained in:
parent
b2142df2bc
commit
ae74dca1a5
3 changed files with 18 additions and 2 deletions
|
@ -22,8 +22,6 @@
|
|||
# @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
#
|
||||
################################################################################
|
||||
clear
|
||||
|
||||
LIB=${0/%cake/}
|
||||
APP=`pwd`
|
||||
|
||||
|
|
|
@ -286,6 +286,22 @@ class ShellDispatcher {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the console
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
function clear() {
|
||||
if (empty($this->params['noclear'])) {
|
||||
if ( DS === '/') {
|
||||
passthru('clear');
|
||||
} else {
|
||||
passthru('cls');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatches a CLI request
|
||||
*
|
||||
|
@ -557,6 +573,7 @@ class ShellDispatcher {
|
|||
* @access public
|
||||
*/
|
||||
function help() {
|
||||
$this->clear();
|
||||
$this->stdout("\nWelcome to CakePHP v" . Configure::version() . " Console");
|
||||
$this->stdout("---------------------------------------------------------------");
|
||||
$this->stdout("Current Paths:");
|
||||
|
|
|
@ -204,6 +204,7 @@ class Shell extends Object {
|
|||
* @access protected
|
||||
*/
|
||||
function _welcome() {
|
||||
$this->Dispatcher->clear();
|
||||
$this->out("\nWelcome to CakePHP v" . Configure::version() . " Console");
|
||||
$this->out("---------------------------------------------------------------");
|
||||
$this->out('App : '. $this->params['app']);
|
||||
|
|
Loading…
Reference in a new issue