Merge pull request #225 from ladybirdweb/country-code-bug-fix-patch
bug-fix patch1
This commit is contained in:
@@ -88,7 +88,7 @@ class AgentController extends Controller
|
|||||||
$departments = $department->get();
|
$departments = $department->get();
|
||||||
// list all the teams in a single variable
|
// list all the teams in a single variable
|
||||||
$teams = $team->lists('id', 'name')->toArray();
|
$teams = $team->lists('id', 'name')->toArray();
|
||||||
$location = GeoIP::getLocation('');
|
$location = GeoIP::getLocation();
|
||||||
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
||||||
// returns to the page with all the variables and their datas
|
// 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);
|
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)
|
public function edit($id, User $user, Assign_team_agent $team_assign_agent, Timezones $timezone, Groups $group, Department $department, Teams $team, CountryCode $code)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$location = GeoIP::getLocation('');
|
$location = GeoIP::getLocation();
|
||||||
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
||||||
$user = $user->whereId($id)->first();
|
$user = $user->whereId($id)->first();
|
||||||
$team = $team->get();
|
$team = $team->get();
|
||||||
|
@@ -285,7 +285,7 @@ class TicketWorkflowController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function checkStarts($statement, $to_check)
|
public function checkStarts($statement, $to_check)
|
||||||
{
|
{
|
||||||
if (substr($to_check, 0, strlen($statement)) == $statement) {
|
if (substr($to_check, 0, strlen($statement)) == $statement) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -303,7 +303,7 @@ class TicketWorkflowController extends Controller
|
|||||||
public function checkEnds($statement, $to_check)
|
public function checkEnds($statement, $to_check)
|
||||||
{
|
{
|
||||||
$to_check = strip_tags($to_check);
|
$to_check = strip_tags($to_check);
|
||||||
if (substr($to_check, -strlen($statement)) == $statement) {
|
if (substr($to_check, -strlen($statement)) == $statement) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@@ -159,7 +159,7 @@ class UserController extends Controller
|
|||||||
public function create(CountryCode $code)
|
public function create(CountryCode $code)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$location = GeoIP::getLocation('');
|
$location = GeoIP::getLocation();
|
||||||
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.user.create')->with('phonecode', $phonecode->phonecode);
|
return view('themes.default1.agent.helpdesk.user.create')->with('phonecode', $phonecode->phonecode);
|
||||||
@@ -263,7 +263,7 @@ class UserController extends Controller
|
|||||||
$user = new User();
|
$user = new User();
|
||||||
/* select the field where id = $id(request Id) */
|
/* select the field where id = $id(request Id) */
|
||||||
$users = $user->whereId($id)->first();
|
$users = $user->whereId($id)->first();
|
||||||
$location = GeoIP::getLocation('');
|
$location = GeoIP::getLocation();
|
||||||
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.user.edit', compact('users'))->with('phonecode', $phonecode->phonecode);
|
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)
|
public function getProfileedit(CountryCode $code)
|
||||||
{
|
{
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$location = GeoIP::getLocation('');
|
$location = GeoIP::getLocation();
|
||||||
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
||||||
try {
|
try {
|
||||||
return view('themes.default1.agent.helpdesk.user.profile-edit', compact('user'))->with('phonecode', $phonecode->phonecode);
|
return view('themes.default1.agent.helpdesk.user.profile-edit', compact('user'))->with('phonecode', $phonecode->phonecode);
|
||||||
|
@@ -83,10 +83,11 @@ class ClientTicketController extends Controller
|
|||||||
$team_assign = null;
|
$team_assign = null;
|
||||||
$ticket_status = null;
|
$ticket_status = null;
|
||||||
$auto_response = 0;
|
$auto_response = 0;
|
||||||
|
|
||||||
$inline_attachment = null;
|
$inline_attachment = null;
|
||||||
|
|
||||||
$this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $inline_attachment);
|
$this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $inline_attachment);
|
||||||
|
|
||||||
return \Redirect::back()->with('success1', Lang::get('lang.successfully_replied'));
|
return \Redirect::back()->with('success1', Lang::get('lang.successfully_replied'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,8 +4,8 @@ namespace App\Http\Controllers\Client\helpdesk;
|
|||||||
|
|
||||||
// controllers
|
// controllers
|
||||||
use App\Http\Controllers\Agent\helpdesk\TicketWorkflowController;
|
use App\Http\Controllers\Agent\helpdesk\TicketWorkflowController;
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use App\Http\Controllers\Common\FileuploadController;
|
use App\Http\Controllers\Common\FileuploadController;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
// requests
|
// requests
|
||||||
use App\Http\Requests\helpdesk\ClientRequest;
|
use App\Http\Requests\helpdesk\ClientRequest;
|
||||||
use App\Model\helpdesk\Agent\Department;
|
use App\Model\helpdesk\Agent\Department;
|
||||||
@@ -61,7 +61,7 @@ class FormController extends Controller
|
|||||||
if (\Config::get('database.install') == '%0%') {
|
if (\Config::get('database.install') == '%0%') {
|
||||||
return \Redirect::route('licence');
|
return \Redirect::route('licence');
|
||||||
}
|
}
|
||||||
$location = GeoIP::getLocation('');
|
$location = GeoIP::getLocation();
|
||||||
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
||||||
if (System::first()->status == 1) {
|
if (System::first()->status == 1) {
|
||||||
$topics = $topic->get();
|
$topics = $topic->get();
|
||||||
@@ -75,6 +75,7 @@ class FormController extends Controller
|
|||||||
$fileupload = $fileupload->file_upload_max_size();
|
$fileupload = $fileupload->file_upload_max_size();
|
||||||
$max_size_in_bytes = $fileupload[0];
|
$max_size_in_bytes = $fileupload[0];
|
||||||
$max_size_in_actual = $fileupload[1];
|
$max_size_in_actual = $fileupload[1];
|
||||||
|
|
||||||
return view('themes.default1.client.helpdesk.form', compact('topics', 'codes', 'max_size_in_bytes', 'max_size_in_actual'))->with('phonecode', $phonecode);
|
return view('themes.default1.client.helpdesk.form', compact('topics', 'codes', 'max_size_in_bytes', 'max_size_in_actual'))->with('phonecode', $phonecode);
|
||||||
} else {
|
} else {
|
||||||
return \Redirect::route('home');
|
return \Redirect::route('home');
|
||||||
@@ -194,7 +195,7 @@ class FormController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// this param is used for inline attachments via email
|
// this param is used for inline attachments via email
|
||||||
if(empty($attachments)) {
|
if (empty($attachments)) {
|
||||||
$inline_attachment = $attachments;
|
$inline_attachment = $attachments;
|
||||||
} else {
|
} else {
|
||||||
$inline_attachment = null;
|
$inline_attachment = null;
|
||||||
|
@@ -55,7 +55,7 @@ class GuestController extends Controller
|
|||||||
public function getProfile(CountryCode $code)
|
public function getProfile(CountryCode $code)
|
||||||
{
|
{
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$location = GeoIP::getLocation('');
|
$location = GeoIP::getLocation();
|
||||||
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
|
||||||
|
|
||||||
return view('themes.default1.client.helpdesk.profile', compact('user'))->with('phonecode', $phonecode->phonecode);
|
return view('themes.default1.client.helpdesk.profile', compact('user'))->with('phonecode', $phonecode->phonecode);
|
||||||
|
@@ -90,7 +90,7 @@ class PhpMailController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$add_embedded_images = null;
|
$add_embedded_images = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// template variables
|
// template variables
|
||||||
if (Auth::user()) {
|
if (Auth::user()) {
|
||||||
$agent = Auth::user()->user_name;
|
$agent = Auth::user()->user_name;
|
||||||
@@ -272,31 +272,31 @@ class PhpMailController extends Controller
|
|||||||
$mail->addAttachment($file_path, $file_name);
|
$mail->addAttachment($file_path, $file_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// inline images embedded as attachments
|
// inline images embedded as attachments
|
||||||
if ($add_embedded_images != null) {
|
if ($add_embedded_images != null) {
|
||||||
// dd($add_embedded_images);
|
// dd($add_embedded_images);
|
||||||
foreach ($add_embedded_images as $add_embedded_image) {
|
foreach ($add_embedded_images as $add_embedded_image) {
|
||||||
if(isset($add_embedded_image->id)) {
|
if (isset($add_embedded_image->id)) {
|
||||||
$cid = $add_embedded_image->id;
|
$cid = $add_embedded_image->id;
|
||||||
} else {
|
} else {
|
||||||
$cid = null;
|
$cid = null;
|
||||||
}
|
}
|
||||||
if(isset($add_embedded_image->name)) {
|
if (isset($add_embedded_image->name)) {
|
||||||
$file_name = $add_embedded_image->name;
|
$file_name = $add_embedded_image->name;
|
||||||
} else {
|
} else {
|
||||||
$file_name = null;
|
$file_name = null;
|
||||||
}
|
}
|
||||||
if(isset($add_embedded_image->filePath)) {
|
if (isset($add_embedded_image->filePath)) {
|
||||||
$file_path = $add_embedded_image->filePath;
|
$file_path = $add_embedded_image->filePath;
|
||||||
} else {
|
} else {
|
||||||
$file_path = null;
|
$file_path = null;
|
||||||
}
|
}
|
||||||
if(isset($add_embedded_image->disposition)) {
|
if (isset($add_embedded_image->disposition)) {
|
||||||
if($add_embedded_image->disposition == 'INLINE') {
|
if ($add_embedded_image->disposition == 'INLINE') {
|
||||||
$mail->AddEmbeddedImage($file_path, $cid, $file_name);
|
$mail->AddEmbeddedImage($file_path, $cid, $file_name);
|
||||||
} else {
|
} else {
|
||||||
$mail->addAttachment($file_path, $file_name);
|
$mail->addAttachment($file_path, $file_name);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$file_path = $add_embedded_image->getRealPath();
|
$file_path = $add_embedded_image->getRealPath();
|
||||||
@@ -305,7 +305,7 @@ class PhpMailController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$mail->CharSet = 'utf8';
|
$mail->CharSet = 'utf8';
|
||||||
$mail->Subject = $subject;
|
$mail->Subject = $subject;
|
||||||
if ($template == 'ticket-reply-agent') {
|
if ($template == 'ticket-reply-agent') {
|
||||||
|
@@ -1394,12 +1394,12 @@ return [
|
|||||||
'use_subject' => 'Use Subject',
|
'use_subject' => 'Use Subject',
|
||||||
'reopen' => 'Reopen',
|
'reopen' => 'Reopen',
|
||||||
'invalid_attempt' => 'Invalid Attempt',
|
'invalid_attempt' => 'Invalid Attempt',
|
||||||
|
|
||||||
/**--------------------------------------------------------------------------------------------
|
/**--------------------------------------------------------------------------------------------
|
||||||
* Attachment Updated
|
* Attachment Updated
|
||||||
* --------------------------------------------------------------------------------------------
|
* --------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
'unable_to_load_file_type' => 'Unable to load file type',
|
'unable_to_load_file_type' => 'Unable to load file type',
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user