From 6f1831e58b99eb060ce465a17d04234b63881ce5 Mon Sep 17 00:00:00 2001 From: Manish Verma Date: Wed, 28 Sep 2016 13:27:37 +0530 Subject: [PATCH] bug-fix patch1 --- app/Http/Controllers/Admin/helpdesk/AgentController.php | 4 ++-- app/Http/Controllers/Agent/helpdesk/UserController.php | 6 +++--- app/Http/Controllers/Client/helpdesk/FormController.php | 2 +- app/Http/Controllers/Client/helpdesk/GuestController.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Admin/helpdesk/AgentController.php b/app/Http/Controllers/Admin/helpdesk/AgentController.php index 67c5a086a..ba98b4bdd 100644 --- a/app/Http/Controllers/Admin/helpdesk/AgentController.php +++ b/app/Http/Controllers/Admin/helpdesk/AgentController.php @@ -88,7 +88,7 @@ class AgentController extends Controller $departments = $department->get(); // list all the teams in a single variable $teams = $team->lists('id', 'name')->toArray(); - $location = GeoIP::getLocation(''); + $location = GeoIP::getLocation(); $phonecode = $code->where('iso', '=', $location['isoCode'])->first(); // returns to the page with all the variables and their datas return view('themes.default1.admin.helpdesk.agent.agents.create', compact('assign', 'teams', 'agents', 'timezones', 'groups', 'departments', 'team'))->with('phonecode', $phonecode->phonecode); @@ -172,7 +172,7 @@ class AgentController extends Controller public function edit($id, User $user, Assign_team_agent $team_assign_agent, Timezones $timezone, Groups $group, Department $department, Teams $team, CountryCode $code) { try { - $location = GeoIP::getLocation(''); + $location = GeoIP::getLocation(); $phonecode = $code->where('iso', '=', $location['isoCode'])->first(); $user = $user->whereId($id)->first(); $team = $team->get(); diff --git a/app/Http/Controllers/Agent/helpdesk/UserController.php b/app/Http/Controllers/Agent/helpdesk/UserController.php index d10ccb119..037c5cd1e 100644 --- a/app/Http/Controllers/Agent/helpdesk/UserController.php +++ b/app/Http/Controllers/Agent/helpdesk/UserController.php @@ -159,7 +159,7 @@ class UserController extends Controller public function create(CountryCode $code) { try { - $location = GeoIP::getLocation(''); + $location = GeoIP::getLocation(); $phonecode = $code->where('iso', '=', $location['isoCode'])->first(); return view('themes.default1.agent.helpdesk.user.create')->with('phonecode', $phonecode->phonecode); @@ -263,7 +263,7 @@ class UserController extends Controller $user = new User(); /* select the field where id = $id(request Id) */ $users = $user->whereId($id)->first(); - $location = GeoIP::getLocation(''); + $location = GeoIP::getLocation(); $phonecode = $code->where('iso', '=', $location['isoCode'])->first(); return view('themes.default1.agent.helpdesk.user.edit', compact('users'))->with('phonecode', $phonecode->phonecode); @@ -333,7 +333,7 @@ class UserController extends Controller public function getProfileedit(CountryCode $code) { $user = Auth::user(); - $location = GeoIP::getLocation(''); + $location = GeoIP::getLocation(); $phonecode = $code->where('iso', '=', $location['isoCode'])->first(); try { return view('themes.default1.agent.helpdesk.user.profile-edit', compact('user'))->with('phonecode', $phonecode->phonecode); diff --git a/app/Http/Controllers/Client/helpdesk/FormController.php b/app/Http/Controllers/Client/helpdesk/FormController.php index 107618dd5..8fe498598 100644 --- a/app/Http/Controllers/Client/helpdesk/FormController.php +++ b/app/Http/Controllers/Client/helpdesk/FormController.php @@ -61,7 +61,7 @@ class FormController extends Controller if (\Config::get('database.install') == '%0%') { return \Redirect::route('licence'); } - $location = GeoIP::getLocation(''); + $location = GeoIP::getLocation(); $phonecode = $code->where('iso', '=', $location['isoCode'])->first(); if (System::first()->status == 1) { $topics = $topic->get(); diff --git a/app/Http/Controllers/Client/helpdesk/GuestController.php b/app/Http/Controllers/Client/helpdesk/GuestController.php index 79f0521e7..001cbeed2 100644 --- a/app/Http/Controllers/Client/helpdesk/GuestController.php +++ b/app/Http/Controllers/Client/helpdesk/GuestController.php @@ -55,7 +55,7 @@ class GuestController extends Controller public function getProfile(CountryCode $code) { $user = Auth::user(); - $location = GeoIP::getLocation(''); + $location = GeoIP::getLocation(); $phonecode = $code->where('iso', '=', $location['isoCode'])->first(); return view('themes.default1.client.helpdesk.profile', compact('user'))->with('phonecode', $phonecode->phonecode);