Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
Yeray Santana Hualde
syncEnrollments
Commits
205cc486
Commit
205cc486
authored
Oct 25, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1356 from helmut/patch-1
Update laravel/file.php
parents
0a0eb377
1d725b27
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
file.php
laravel/file.php
+7
-1
No files found.
laravel/file.php
View file @
205cc486
...
@@ -331,6 +331,8 @@ class File {
...
@@ -331,6 +331,8 @@ class File {
*/
*/
public
static
function
latest
(
$directory
,
$options
=
fIterator
::
SKIP_DOTS
)
public
static
function
latest
(
$directory
,
$options
=
fIterator
::
SKIP_DOTS
)
{
{
$latest
=
null
;
$time
=
0
;
$time
=
0
;
$items
=
new
fIterator
(
$directory
,
$options
);
$items
=
new
fIterator
(
$directory
,
$options
);
...
@@ -340,7 +342,11 @@ class File {
...
@@ -340,7 +342,11 @@ class File {
// with a UNIX timestamp greater than the latest one.
// with a UNIX timestamp greater than the latest one.
foreach
(
$items
as
$item
)
foreach
(
$items
as
$item
)
{
{
if
(
$item
->
getMTime
()
>
$time
)
$latest
=
$item
;
if
(
$item
->
getMTime
()
>
$time
)
{
$latest
=
$item
;
$time
=
$item
->
getMTime
();
}
}
}
return
$latest
;
return
$latest
;
...
...
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