@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $tz = new DateTimeZone(trim($tzName)); |
| 29 | 29 | |
| 30 | 30 | $date = new DateTime($timesTamp); |
| 31 | - $date->setTimezone($tz); |
|
| 31 | + $date->setTimezone($tz); |
|
| 32 | 32 | $dateTime=$date->format('F jS, Y h:i:s A'); |
| 33 | 33 | return $dateTime; |
| 34 | 34 | |
@@ -38,7 +38,6 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | - |
|
| 42 | 41 | * @function generates a unique ID |
| 43 | 42 | * @return string unique id |
| 44 | 43 | */ |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | $date = new DateTime($timesTamp); |
| 31 | 31 | $date->setTimezone($tz); |
| 32 | - $dateTime=$date->format('F jS, Y h:i:s A'); |
|
| 32 | + $dateTime = $date->format('F jS, Y h:i:s A'); |
|
| 33 | 33 | return $dateTime; |
| 34 | 34 | |
| 35 | 35 | |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | * @return string unique id |
| 44 | 44 | */ |
| 45 | 45 | |
| 46 | -function generateId(){ |
|
| 46 | +function generateId() { |
|
| 47 | 47 | $date = date_create(); |
| 48 | - $id=md5(date_timestamp_get($date)); |
|
| 48 | + $id = md5(date_timestamp_get($date)); |
|
| 49 | 49 | return $id; |
| 50 | 50 | |
| 51 | 51 | } |
| 52 | 52 | \ No newline at end of file |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | return array( |
| 4 | 4 | |
| 5 | - /* |
|
| 5 | + /* |
|
| 6 | 6 | |-------------------------------------------------------------------------- |
| 7 | 7 | | Password Reminder Language Lines |
| 8 | 8 | |-------------------------------------------------------------------------- |
@@ -13,14 +13,14 @@ discard block |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | - "password" => "Passwords must be at least six characters and match the confirmation.", |
|
| 16 | + "password" => "Passwords must be at least six characters and match the confirmation.", |
|
| 17 | 17 | |
| 18 | - "user" => "We can't find a user with that e-mail address.", |
|
| 18 | + "user" => "We can't find a user with that e-mail address.", |
|
| 19 | 19 | |
| 20 | - "token" => "This password reset token is invalid.", |
|
| 20 | + "token" => "This password reset token is invalid.", |
|
| 21 | 21 | |
| 22 | - "sent" => "Password reminder sent!", |
|
| 22 | + "sent" => "Password reminder sent!", |
|
| 23 | 23 | |
| 24 | - "reset" => "Password has been reset!", |
|
| 24 | + "reset" => "Password has been reset!", |
|
| 25 | 25 | |
| 26 | 26 | ); |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | return array( |
| 4 | 4 | |
| 5 | - /* |
|
| 5 | + /* |
|
| 6 | 6 | |-------------------------------------------------------------------------- |
| 7 | 7 | | Pagination Language Lines |
| 8 | 8 | |-------------------------------------------------------------------------- |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | - 'previous' => '« Previous', |
|
| 16 | + 'previous' => '« Previous', |
|
| 17 | 17 | |
| 18 | - 'next' => 'Next »', |
|
| 18 | + 'next' => 'Next »', |
|
| 19 | 19 | |
| 20 | 20 | ); |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | return array( |
| 4 | 4 | |
| 5 | - /* |
|
| 5 | + /* |
|
| 6 | 6 | |-------------------------------------------------------------------------- |
| 7 | 7 | | Validation Language Lines |
| 8 | 8 | |-------------------------------------------------------------------------- |
@@ -13,67 +13,67 @@ discard block |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | - "accepted" => "The :attribute must be accepted.", |
|
| 17 | - "active_url" => "The :attribute is not a valid URL.", |
|
| 18 | - "after" => "The :attribute must be a date after :date.", |
|
| 19 | - "alpha" => "The :attribute may only contain letters.", |
|
| 20 | - "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", |
|
| 21 | - "alpha_num" => "The :attribute may only contain letters and numbers.", |
|
| 22 | - "array" => "The :attribute must be an array.", |
|
| 23 | - "before" => "The :attribute must be a date before :date.", |
|
| 24 | - "between" => array( |
|
| 25 | - "numeric" => "The :attribute must be between :min and :max.", |
|
| 26 | - "file" => "The :attribute must be between :min and :max kilobytes.", |
|
| 27 | - "string" => "The :attribute must be between :min and :max characters.", |
|
| 28 | - "array" => "The :attribute must have between :min and :max items.", |
|
| 29 | - ), |
|
| 30 | - "boolean" => "The :attribute field must be true or false.", |
|
| 31 | - "confirmed" => "The :attribute confirmation does not match.", |
|
| 32 | - "date" => "The :attribute is not a valid date.", |
|
| 33 | - "date_format" => "The :attribute does not match the format :format.", |
|
| 34 | - "different" => "The :attribute and :other must be different.", |
|
| 35 | - "digits" => "The :attribute must be :digits digits.", |
|
| 36 | - "digits_between" => "The :attribute must be between :min and :max digits.", |
|
| 37 | - "email" => "The :attribute must be a valid email address.", |
|
| 38 | - "exists" => "The selected :attribute is invalid.", |
|
| 39 | - "image" => "The :attribute must be an image.", |
|
| 40 | - "in" => "The selected :attribute is invalid.", |
|
| 41 | - "integer" => "The :attribute must be an integer.", |
|
| 42 | - "ip" => "The :attribute must be a valid IP address.", |
|
| 43 | - "max" => array( |
|
| 44 | - "numeric" => "The :attribute may not be greater than :max.", |
|
| 45 | - "file" => "The :attribute may not be greater than :max kilobytes.", |
|
| 46 | - "string" => "The :attribute may not be greater than :max characters.", |
|
| 47 | - "array" => "The :attribute may not have more than :max items.", |
|
| 48 | - ), |
|
| 49 | - "mimes" => "The :attribute must be a file of type: :values.", |
|
| 50 | - "min" => array( |
|
| 51 | - "numeric" => "The :attribute must be at least :min.", |
|
| 52 | - "file" => "The :attribute must be at least :min kilobytes.", |
|
| 53 | - "string" => "The :attribute must be at least :min characters.", |
|
| 54 | - "array" => "The :attribute must have at least :min items.", |
|
| 55 | - ), |
|
| 56 | - "not_in" => "The selected :attribute is invalid.", |
|
| 57 | - "numeric" => "The :attribute must be a number.", |
|
| 58 | - "regex" => "The :attribute format is invalid.", |
|
| 59 | - "required" => "The :attribute field is required.", |
|
| 60 | - "required_if" => "The :attribute field is required when :other is :value.", |
|
| 61 | - "required_with" => "The :attribute field is required when :values is present.", |
|
| 62 | - "required_with_all" => "The :attribute field is required when :values is present.", |
|
| 63 | - "required_without" => "The :attribute field is required when :values is not present.", |
|
| 64 | - "required_without_all" => "The :attribute field is required when none of :values are present.", |
|
| 65 | - "same" => "The :attribute and :other must match.", |
|
| 66 | - "size" => array( |
|
| 67 | - "numeric" => "The :attribute must be :size.", |
|
| 68 | - "file" => "The :attribute must be :size kilobytes.", |
|
| 69 | - "string" => "The :attribute must be :size characters.", |
|
| 70 | - "array" => "The :attribute must contain :size items.", |
|
| 71 | - ), |
|
| 72 | - "unique" => "The :attribute has already been taken.", |
|
| 73 | - "url" => "The :attribute format is invalid.", |
|
| 74 | - "timezone" => "The :attribute must be a valid zone.", |
|
| 16 | + "accepted" => "The :attribute must be accepted.", |
|
| 17 | + "active_url" => "The :attribute is not a valid URL.", |
|
| 18 | + "after" => "The :attribute must be a date after :date.", |
|
| 19 | + "alpha" => "The :attribute may only contain letters.", |
|
| 20 | + "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", |
|
| 21 | + "alpha_num" => "The :attribute may only contain letters and numbers.", |
|
| 22 | + "array" => "The :attribute must be an array.", |
|
| 23 | + "before" => "The :attribute must be a date before :date.", |
|
| 24 | + "between" => array( |
|
| 25 | + "numeric" => "The :attribute must be between :min and :max.", |
|
| 26 | + "file" => "The :attribute must be between :min and :max kilobytes.", |
|
| 27 | + "string" => "The :attribute must be between :min and :max characters.", |
|
| 28 | + "array" => "The :attribute must have between :min and :max items.", |
|
| 29 | + ), |
|
| 30 | + "boolean" => "The :attribute field must be true or false.", |
|
| 31 | + "confirmed" => "The :attribute confirmation does not match.", |
|
| 32 | + "date" => "The :attribute is not a valid date.", |
|
| 33 | + "date_format" => "The :attribute does not match the format :format.", |
|
| 34 | + "different" => "The :attribute and :other must be different.", |
|
| 35 | + "digits" => "The :attribute must be :digits digits.", |
|
| 36 | + "digits_between" => "The :attribute must be between :min and :max digits.", |
|
| 37 | + "email" => "The :attribute must be a valid email address.", |
|
| 38 | + "exists" => "The selected :attribute is invalid.", |
|
| 39 | + "image" => "The :attribute must be an image.", |
|
| 40 | + "in" => "The selected :attribute is invalid.", |
|
| 41 | + "integer" => "The :attribute must be an integer.", |
|
| 42 | + "ip" => "The :attribute must be a valid IP address.", |
|
| 43 | + "max" => array( |
|
| 44 | + "numeric" => "The :attribute may not be greater than :max.", |
|
| 45 | + "file" => "The :attribute may not be greater than :max kilobytes.", |
|
| 46 | + "string" => "The :attribute may not be greater than :max characters.", |
|
| 47 | + "array" => "The :attribute may not have more than :max items.", |
|
| 48 | + ), |
|
| 49 | + "mimes" => "The :attribute must be a file of type: :values.", |
|
| 50 | + "min" => array( |
|
| 51 | + "numeric" => "The :attribute must be at least :min.", |
|
| 52 | + "file" => "The :attribute must be at least :min kilobytes.", |
|
| 53 | + "string" => "The :attribute must be at least :min characters.", |
|
| 54 | + "array" => "The :attribute must have at least :min items.", |
|
| 55 | + ), |
|
| 56 | + "not_in" => "The selected :attribute is invalid.", |
|
| 57 | + "numeric" => "The :attribute must be a number.", |
|
| 58 | + "regex" => "The :attribute format is invalid.", |
|
| 59 | + "required" => "The :attribute field is required.", |
|
| 60 | + "required_if" => "The :attribute field is required when :other is :value.", |
|
| 61 | + "required_with" => "The :attribute field is required when :values is present.", |
|
| 62 | + "required_with_all" => "The :attribute field is required when :values is present.", |
|
| 63 | + "required_without" => "The :attribute field is required when :values is not present.", |
|
| 64 | + "required_without_all" => "The :attribute field is required when none of :values are present.", |
|
| 65 | + "same" => "The :attribute and :other must match.", |
|
| 66 | + "size" => array( |
|
| 67 | + "numeric" => "The :attribute must be :size.", |
|
| 68 | + "file" => "The :attribute must be :size kilobytes.", |
|
| 69 | + "string" => "The :attribute must be :size characters.", |
|
| 70 | + "array" => "The :attribute must contain :size items.", |
|
| 71 | + ), |
|
| 72 | + "unique" => "The :attribute has already been taken.", |
|
| 73 | + "url" => "The :attribute format is invalid.", |
|
| 74 | + "timezone" => "The :attribute must be a valid zone.", |
|
| 75 | 75 | |
| 76 | - /* |
|
| 76 | + /* |
|
| 77 | 77 | |-------------------------------------------------------------------------- |
| 78 | 78 | | Custom Validation Language Lines |
| 79 | 79 | |-------------------------------------------------------------------------- |
@@ -84,13 +84,13 @@ discard block |
||
| 84 | 84 | | |
| 85 | 85 | */ |
| 86 | 86 | |
| 87 | - 'custom' => array( |
|
| 88 | - 'attribute-name' => array( |
|
| 89 | - 'rule-name' => 'custom-message', |
|
| 90 | - ), |
|
| 91 | - ), |
|
| 87 | + 'custom' => array( |
|
| 88 | + 'attribute-name' => array( |
|
| 89 | + 'rule-name' => 'custom-message', |
|
| 90 | + ), |
|
| 91 | + ), |
|
| 92 | 92 | |
| 93 | - /* |
|
| 93 | + /* |
|
| 94 | 94 | |-------------------------------------------------------------------------- |
| 95 | 95 | | Custom Validation Attributes |
| 96 | 96 | |-------------------------------------------------------------------------- |
@@ -101,6 +101,6 @@ discard block |
||
| 101 | 101 | | |
| 102 | 102 | */ |
| 103 | 103 | |
| 104 | - 'attributes' => array(), |
|
| 104 | + 'attributes' => array(), |
|
| 105 | 105 | |
| 106 | 106 | ); |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | case "create_project":$check = SecurityHelper::authorizeWrite("create_project"); |
| 90 | 90 | if ($check == "notAllowed") |
| 91 | 91 | return Response::json(array( |
| 92 | - 'errors' => "You are not authorized to perform this operation!", |
|
| 93 | - 400 |
|
| 92 | + 'errors' => "You are not authorized to perform this operation!", |
|
| 93 | + 400 |
|
| 94 | 94 | )); |
| 95 | 95 | break; |
| 96 | 96 | |
@@ -98,11 +98,11 @@ discard block |
||
| 98 | 98 | if ($check == "notAllowed") |
| 99 | 99 | return json_encode (array('success' => false)); |
| 100 | 100 | if(\Request::segment(2)=='validate_create_task' && $check=="allowed") |
| 101 | - return Response::json(array( |
|
| 102 | - 'success' => true, |
|
| 103 | - 200 |
|
| 101 | + return Response::json(array( |
|
| 102 | + 'success' => true, |
|
| 103 | + 200 |
|
| 104 | 104 | )); |
| 105 | - break; |
|
| 105 | + break; |
|
| 106 | 106 | |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -96,8 +96,8 @@ |
||
| 96 | 96 | |
| 97 | 97 | case "create_task":$check = SecurityHelper::authorizeWrite("create_task"); |
| 98 | 98 | if ($check == "notAllowed") |
| 99 | - return json_encode (array('success' => false)); |
|
| 100 | - if(\Request::segment(2)=='validate_create_task' && $check=="allowed") |
|
| 99 | + return json_encode(array('success' => false)); |
|
| 100 | + if (\Request::segment(2) == 'validate_create_task' && $check == "allowed") |
|
| 101 | 101 | return Response::json(array( |
| 102 | 102 | 'success' => true, |
| 103 | 103 | 200 |
@@ -36,8 +36,7 @@ discard block |
||
| 36 | 36 | if (Auth::guest()) { |
| 37 | 37 | if (Request::ajax()) { |
| 38 | 38 | return Response::make('Unauthorized', 401); |
| 39 | - } |
|
| 40 | - else { |
|
| 39 | + } else { |
|
| 41 | 40 | return Redirect::to('/'); |
| 42 | 41 | } |
| 43 | 42 | } |
@@ -60,9 +59,10 @@ discard block |
||
| 60 | 59 | */ |
| 61 | 60 | |
| 62 | 61 | Route::filter('guest', function() { |
| 63 | - if (Auth::check()) |
|
| 64 | - return Redirect::to('/'); |
|
| 65 | -}); |
|
| 62 | + if (Auth::check()) { |
|
| 63 | + return Redirect::to('/'); |
|
| 64 | + } |
|
| 65 | + }); |
|
| 66 | 66 | |
| 67 | 67 | /* |
| 68 | 68 | |-------------------------------------------------------------------------- |
@@ -87,21 +87,24 @@ discard block |
||
| 87 | 87 | if ($check_type == "write") { |
| 88 | 88 | switch ($check_name) { |
| 89 | 89 | case "create_project":$check = SecurityHelper::authorizeWrite("create_project"); |
| 90 | - if ($check == "notAllowed") |
|
| 91 | - return Response::json(array( |
|
| 90 | + if ($check == "notAllowed") { |
|
| 91 | + return Response::json(array( |
|
| 92 | 92 | 'errors' => "You are not authorized to perform this operation!", |
| 93 | 93 | 400 |
| 94 | 94 | )); |
| 95 | + } |
|
| 95 | 96 | break; |
| 96 | 97 | |
| 97 | 98 | case "create_task":$check = SecurityHelper::authorizeWrite("create_task"); |
| 98 | - if ($check == "notAllowed") |
|
| 99 | - return json_encode (array('success' => false)); |
|
| 100 | - if(\Request::segment(2)=='validate_create_task' && $check=="allowed") |
|
| 101 | - return Response::json(array( |
|
| 99 | + if ($check == "notAllowed") { |
|
| 100 | + return json_encode (array('success' => false)); |
|
| 101 | + } |
|
| 102 | + if(\Request::segment(2)=='validate_create_task' && $check=="allowed") { |
|
| 103 | + return Response::json(array( |
|
| 102 | 104 | 'success' => true, |
| 103 | 105 | 200 |
| 104 | - )); |
|
| 106 | + )); |
|
| 107 | + } |
|
| 105 | 108 | break; |
| 106 | 109 | |
| 107 | 110 | } |
@@ -13,10 +13,10 @@ discard block |
||
| 13 | 13 | App::bind('\\LaravelRealtimeChat\\Repositories\\Team\\TeamRepository', '\\LaravelRealtimeChat\\Repositories\\Team\\DbTeamRepository'); |
| 14 | 14 | ClassLoader::addDirectories(array( |
| 15 | 15 | |
| 16 | - app_path().'/commands', |
|
| 17 | - app_path().'/controllers', |
|
| 18 | - app_path().'/models', |
|
| 19 | - app_path().'/database/seeds', |
|
| 16 | + app_path().'/commands', |
|
| 17 | + app_path().'/controllers', |
|
| 18 | + app_path().'/models', |
|
| 19 | + app_path().'/database/seeds', |
|
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | )); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | App::error(function(Exception $exception, $code) |
| 51 | 51 | { |
| 52 | - Log::error($exception); |
|
| 52 | + Log::error($exception); |
|
| 53 | 53 | }); |
| 54 | 54 | |
| 55 | 55 | /* |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | App::down(function() |
| 67 | 67 | { |
| 68 | - return Response::make("Be right back!", 503); |
|
| 68 | + return Response::make("Be right back!", 503); |
|
| 69 | 69 | }); |
| 70 | 70 | |
| 71 | 71 | /* |