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
efef0e52
Commit
efef0e52
authored
Sep 28, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed beforeCopy option.
parent
ba1496cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
BaseFileHelper.php
framework/yii/helpers/BaseFileHelper.php
+3
-4
No files found.
framework/yii/helpers/BaseFileHelper.php
View file @
efef0e52
...
...
@@ -156,8 +156,7 @@ class BaseFileHelper
* both '/' and '\' in the paths.
* - recursive: boolean, whether the files under the subdirectories should also be copied. Defaults to true.
* - beforeCopy: callback, a PHP callback that is called before copying each sub-directory or file.
* This option is used only when publishing a directory. If the callback returns false, the copy
* operation for the sub-directory or file will be cancelled.
* If the callback returns false, the copy operation for the sub-directory or file will be cancelled.
* The signature of the callback should be: `function ($from, $to)`, where `$from` is the sub-directory or
* file to be copied from, while `$to` is the copy target.
* - afterCopy: callback, a PHP callback that is called after each sub-directory or file is successfully copied.
...
...
@@ -178,8 +177,8 @@ class BaseFileHelper
$from
=
$src
.
DIRECTORY_SEPARATOR
.
$file
;
$to
=
$dst
.
DIRECTORY_SEPARATOR
.
$file
;
if
(
static
::
filterPath
(
$from
,
$options
))
{
if
(
isset
(
$options
[
'beforeCopy'
]
))
{
c
all_user_func
(
$options
[
'beforeCopy'
],
$from
,
$to
)
;
if
(
!
isset
(
$options
[
'beforeCopy'
])
||
!
call_user_func
(
$options
[
'beforeCopy'
],
$from
,
$to
))
{
c
ontinue
;
}
if
(
is_file
(
$from
))
{
copy
(
$from
,
$to
);
...
...
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