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
0e4f7268
Commit
0e4f7268
authored
Feb 16, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up code before release.
parent
bb0967cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
19 deletions
+34
-19
hash.php
laravel/hash.php
+12
-12
lang.php
laravel/lang.php
+22
-7
No files found.
laravel/hash.php
View file @
0e4f7268
...
...
@@ -2,18 +2,6 @@
class
Hash
{
/**
* Determine if an unhashed value matches a given Bcrypt hash.
*
* @param string $value
* @param string $hash
* @return bool
*/
public
static
function
check
(
$value
,
$hash
)
{
return
crypt
(
$value
,
$hash
)
===
$hash
;
}
/**
* Hash a password using the Bcrypt hashing scheme.
*
...
...
@@ -51,4 +39,16 @@ class Hash {
return
crypt
(
$value
,
'$2a$'
.
$work
.
'$'
.
$salt
);
}
/**
* Determine if an unhashed value matches a Bcrypt hash.
*
* @param string $value
* @param string $hash
* @return bool
*/
public
static
function
check
(
$value
,
$hash
)
{
return
crypt
(
$value
,
$hash
)
===
$hash
;
}
}
\ No newline at end of file
laravel/lang.php
View file @
0e4f7268
...
...
@@ -183,20 +183,35 @@ class Lang {
// Language files can belongs to the application or to any bundle
// that is installed for the application. So, we'll need to use
// the bundle's path when checking for the file.
//
// This is similar to the loading method for configuration files,
// but we do not need to cascade across directories since most
// likely language files are static across environments.
$path
=
Bundle
::
path
(
$bundle
)
.
"language/
{
$language
}
/
{
$file
}
"
.
EXT
;
// the bundle's path when looking for the file.
$path
=
static
::
path
(
$bundle
,
$language
,
$file
);
if
(
file_exists
(
$path
))
$lines
=
require
$path
;
if
(
file_exists
(
$path
))
{
$lines
=
require
$path
;
}
// All of the language lines are cached in an array so we can
// quickly look them up on subsequent reqwuests for the line.
// This keeps us from loading files each time.
static
::
$lines
[
$bundle
][
$language
][
$file
]
=
$lines
;
return
count
(
$lines
)
>
0
;
}
/**
* Get the path to a bundle's language file.
*
* @param string $bundle
* @param string $language
* @param string $file
* @return string
*/
protected
static
function
path
(
$bundle
,
$language
,
$file
)
{
return
Bundle
::
path
(
$bundle
)
.
"language/
{
$language
}
/
{
$file
}
"
.
EXT
;
}
/**
* Get the string content of the language line.
*
...
...
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