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
007863a6
Commit
007863a6
authored
Feb 07, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up various codes.
parent
78dc4529
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
18 deletions
+9
-18
auth.php
laravel/auth.php
+0
-3
core.php
laravel/core.php
+3
-1
error.php
laravel/error.php
+2
-3
hash.php
laravel/hash.php
+1
-1
controller.php
laravel/routing/controller.php
+3
-10
No files found.
laravel/auth.php
View file @
007863a6
...
@@ -134,9 +134,6 @@ class Auth {
...
@@ -134,9 +134,6 @@ class Auth {
// or authentication provider they wish.
// or authentication provider they wish.
$user
=
call_user_func
(
$config
[
'attempt'
],
$username
,
$password
);
$user
=
call_user_func
(
$config
[
'attempt'
],
$username
,
$password
);
// If the user credentials were authenticated by the closure, we will
// log the user into the application, which will store their user ID
// in the session for subsequent requests.
if
(
is_null
(
$user
))
return
false
;
if
(
is_null
(
$user
))
return
false
;
static
::
login
(
$user
,
$remember
);
static
::
login
(
$user
,
$remember
);
...
...
laravel/core.php
View file @
007863a6
...
@@ -64,4 +64,6 @@ foreach ($bundles as $bundle => $value)
...
@@ -64,4 +64,6 @@ foreach ($bundles as $bundle => $value)
* be the default timezone used by all date functions through
* be the default timezone used by all date functions through
* throughout the entire application.
* throughout the entire application.
*/
*/
date_default_timezone_set
(
Config
::
get
(
'application.timezone'
));
$timezone
=
Config
::
get
(
'application.timezone'
);
\ No newline at end of file
date_default_timezone_set
(
$timezone
);
\ No newline at end of file
laravel/error.php
View file @
007863a6
...
@@ -14,8 +14,7 @@ class Error {
...
@@ -14,8 +14,7 @@ class Error {
// If detailed errors are enabled, we'll just format the exception into
// If detailed errors are enabled, we'll just format the exception into
// a simple error message and display it on the screen. We don't use a
// a simple error message and display it on the screen. We don't use a
// View in case the problem is in the View class itself so we can not
// View in case the problem is in the View class.
// run into a white screen of death situation.
if
(
Config
::
get
(
'error.detail'
))
if
(
Config
::
get
(
'error.detail'
))
{
{
echo
"<html><h2>Unhandled Exception</h2>
echo
"<html><h2>Unhandled Exception</h2>
...
@@ -50,7 +49,7 @@ class Error {
...
@@ -50,7 +49,7 @@ class Error {
// For a PHP error, we'll create an ErrorExcepetion and then feed that
// For a PHP error, we'll create an ErrorExcepetion and then feed that
// exception to the exception method, which will create a simple view
// exception to the exception method, which will create a simple view
// of the exception details. The ErrorException class is built-in to
// of the exception details. The ErrorException class is built-in to
// PHP for converting native errors
to Exceptions
.
// PHP for converting native errors.
$exception
=
new
\ErrorException
(
$error
,
$code
,
0
,
$file
,
$line
);
$exception
=
new
\ErrorException
(
$error
,
$code
,
0
,
$file
,
$line
);
if
(
in_array
(
$code
,
Config
::
get
(
'error.ignore'
)))
if
(
in_array
(
$code
,
Config
::
get
(
'error.ignore'
)))
...
...
laravel/hash.php
View file @
007863a6
...
@@ -36,7 +36,7 @@ class Hash {
...
@@ -36,7 +36,7 @@ class Hash {
// Bcrypt expects the salt to be 22 base64 encoded characters including
// Bcrypt expects the salt to be 22 base64 encoded characters including
// dots and slashes. We will get rid of the plus signs included in the
// dots and slashes. We will get rid of the plus signs included in the
// base64 data and replace them with dots. OpenSSL will be used if it
// base64 data and replace them with dots. OpenSSL will be used if it
// is available
, otherwise we will use the Str::random method
.
// is available
on the server
.
if
(
function_exists
(
'openssl_random_pseudo_bytes'
))
if
(
function_exists
(
'openssl_random_pseudo_bytes'
))
{
{
$salt
=
openssl_random_pseudo_bytes
(
16
);
$salt
=
openssl_random_pseudo_bytes
(
16
);
...
...
laravel/routing/controller.php
View file @
007863a6
...
@@ -79,9 +79,8 @@ abstract class Controller {
...
@@ -79,9 +79,8 @@ abstract class Controller {
protected
static
function
backreference
(
$method
,
$parameters
)
protected
static
function
backreference
(
$method
,
$parameters
)
{
{
// Controller delegates may use back-references to the action parameters,
// Controller delegates may use back-references to the action parameters,
// which allows the developer to setup more flexible rouets to their
// which allows the developer to setup more flexible routes to various
// controllers with less code. We will replace the back-references
// controllers with much less code than usual.
// with their corresponding parameter value.
foreach
(
$parameters
as
$key
=>
$value
)
foreach
(
$parameters
as
$key
=>
$value
)
{
{
$method
=
str_replace
(
'(:'
.
(
$key
+
1
)
.
')'
,
$value
,
$method
,
$count
);
$method
=
str_replace
(
'(:'
.
(
$key
+
1
)
.
')'
,
$value
,
$method
,
$count
);
...
@@ -158,13 +157,7 @@ abstract class Controller {
...
@@ -158,13 +157,7 @@ abstract class Controller {
*/
*/
protected
static
function
format
(
$bundle
,
$controller
)
protected
static
function
format
(
$bundle
,
$controller
)
{
{
// If the controller's bundle is not the application bundle, we will
return
Bundle
::
class_prefix
(
$bundle
)
.
Str
::
classify
(
$controller
)
.
'_Controller'
;
// prepend the bundle to the identifier so the bundle is prefixed to
// the class name when it is formatted. Bundle controllers are
// always prefixed with the bundle name.
if
(
$bundle
!==
DEFAULT_BUNDLE
)
$controller
=
$bundle
.
'.'
.
$controller
;
return
Str
::
classify
(
$controller
)
.
'_Controller'
;
}
}
/**
/**
...
...
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