Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
49961c48
Commit
49961c48
authored
Oct 22, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change Console::confirm() output to use stdout
parent
95afdceb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
BaseConsole.php
framework/helpers/BaseConsole.php
+2
-2
No files found.
framework/CHANGELOG.md
View file @
49961c48
...
...
@@ -21,6 +21,7 @@ Yii Framework 2 Change Log
-
Enh #5600: Allow configuring debug panels in
`yii\debug\Module::panels`
as panel class name strings (qiangxue)
-
Enh #5613: Added
`--overwrite`
option to Gii console command to support overwriting all files (motin, qiangxue)
-
Enh #5646: Call
`yii\base\ErrorHandler::unregister()`
instead of
`restore_*_handlers`
directly (aivus)
-
Enh:
`Console::confirm()`
now uses
`Console::stdout()`
instead of
`echo`
to be consistent with all other functions (cebe)
2.
0.0 October 12, 2014
----------------------
...
...
framework/helpers/BaseConsole.php
View file @
49961c48
...
...
@@ -763,13 +763,13 @@ class BaseConsole
/**
* Asks user to confirm by typing y or n.
*
* @param string $message to
echo
out before waiting for user input
* @param string $message to
print
out before waiting for user input
* @param boolean $default this value is returned if no selection is made.
* @return boolean whether user confirmed
*/
public
static
function
confirm
(
$message
,
$default
=
false
)
{
echo
$message
.
' (yes|no) ['
.
(
$default
?
'yes'
:
'no'
)
.
']:'
;
static
::
stdout
(
$message
.
' (yes|no) ['
.
(
$default
?
'yes'
:
'no'
)
.
']:'
)
;
$input
=
trim
(
static
::
stdin
());
return
empty
(
$input
)
?
$default
:
!
strncasecmp
(
$input
,
'y'
,
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment