Apply fixes from StyleCI
This commit is contained in:

committed by
StyleCI Bot

parent
ea4314a339
commit
b2a1b7ec55
@@ -276,7 +276,6 @@ class AgentController extends Controller
|
||||
$user->id;
|
||||
$user->delete();
|
||||
throw new \Exception($error);
|
||||
|
||||
return redirect('agents')->with('success', Lang::get('lang.agent_deleted_sucessfully'));
|
||||
} catch (\Exception $e) {
|
||||
return redirect('agents')->with('fails', $error);
|
||||
|
@@ -639,7 +639,8 @@ class EmailsController extends Controller
|
||||
$controller->fetch($email);
|
||||
}
|
||||
|
||||
public function checkMail($request) {
|
||||
public function checkMail($request)
|
||||
{
|
||||
$mailservice_id = $request->input('sending_protocol');
|
||||
$driver = $this->getDriver($mailservice_id);
|
||||
$username = $request->input('email_address');
|
||||
@@ -657,6 +658,7 @@ class EmailsController extends Controller
|
||||
$transport->setPassword($password);
|
||||
$mailer = \Swift_Mailer::newInstance($transport);
|
||||
$mailer->getTransport()->start();
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@@ -997,7 +997,6 @@ class SettingsController extends Controller
|
||||
$number .= '0';
|
||||
}
|
||||
|
||||
|
||||
if ($array_format[$i] !== '$' && $array_format[$i] !== '#') {
|
||||
$number .= $array_format[$i];
|
||||
}
|
||||
|
@@ -153,7 +153,6 @@ $users = DB::table('team_assign_agent')->select('team_assign_agent.id', 'team_as
|
||||
return $full_name;
|
||||
})
|
||||
|
||||
|
||||
->addColumn('active', function ($model) {
|
||||
if ($model->active == '1') {
|
||||
$role = "<a class='btn btn-success btn-xs'>".'Active'.'</a>';
|
||||
@@ -164,7 +163,6 @@ $users = DB::table('team_assign_agent')->select('team_assign_agent.id', 'team_as
|
||||
return $role;
|
||||
})
|
||||
|
||||
|
||||
->addColumn('assign_group', function ($model) {
|
||||
$group = Groups::whereId($model->assign_group)->first();
|
||||
|
||||
|
@@ -88,7 +88,6 @@ class ReportController extends Controller
|
||||
// $help_topic = Help_topic::where('status', '=', '1')->min('id');
|
||||
}
|
||||
|
||||
|
||||
$return = '';
|
||||
$last = '';
|
||||
$j = 0;
|
||||
|
@@ -516,7 +516,6 @@ class TicketController extends Controller
|
||||
}
|
||||
$ticket_id = $request->input('ticket_ID');
|
||||
|
||||
|
||||
$tickets = Tickets::where('id', '=', $ticket_id)->first();
|
||||
$tickets->isanswered = '1';
|
||||
$tickets->save();
|
||||
@@ -598,7 +597,6 @@ class TicketController extends Controller
|
||||
// sending attachments via php mail function
|
||||
$message = '';
|
||||
|
||||
|
||||
$collaborators = Ticket_Collaborator::where('ticket_id', '=', $ticket_id)->get();
|
||||
|
||||
$emails = Emails::where('department', '=', $tickets->dept_id)->first();
|
||||
@@ -2145,7 +2143,6 @@ class TicketController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return redirect()->back()->with('Success', 'Thank you for your rating!');
|
||||
}
|
||||
|
||||
|
@@ -459,7 +459,6 @@ class UserController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($users->role == 'agent') {
|
||||
if ($delete_all == null) {
|
||||
$UserEmail = Input::get('assign_to');
|
||||
|
@@ -150,7 +150,7 @@ class AuthController extends Controller
|
||||
*/
|
||||
public function postRegister(User $user, RegisterRequest $request)
|
||||
{
|
||||
try{
|
||||
try {
|
||||
$request_array = $request->input();
|
||||
$password = Hash::make($request->input('password'));
|
||||
$user->password = $password;
|
||||
@@ -162,7 +162,7 @@ class AuthController extends Controller
|
||||
$user->email = $request->input('email');
|
||||
}
|
||||
if ($request_array['mobile'] == '') {
|
||||
$user->mobile = null;
|
||||
$user->mobile = null;
|
||||
} else {
|
||||
$user->mobile = $request->input('mobile');
|
||||
}
|
||||
@@ -188,19 +188,20 @@ class AuthController extends Controller
|
||||
if ($request_array['email'] != '') {
|
||||
$var = $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $request->input('email')], $message = ['subject' => null, 'scenario' => 'registration'], $template_variables = ['user' => $name, 'email_address' => $request->input('email'), 'password_reset_link' => url('account/activate/'.$code)]);
|
||||
}
|
||||
if ($settings->status == 1 || $settings->status == '1') {
|
||||
if (count($sms) > 0) {
|
||||
if ($sms->status == 1 || $sms->status == '1') {
|
||||
$message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail_and_moble');
|
||||
} else {
|
||||
$message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail_sms_plugin_inactive_or_not_setup');
|
||||
}
|
||||
if ($settings->status == 1 || $settings->status == '1') {
|
||||
if (count($sms) > 0) {
|
||||
if ($sms->status == 1 || $sms->status == '1') {
|
||||
$message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail_and_moble');
|
||||
} else {
|
||||
$message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail_sms_plugin_inactive_or_not_setup');
|
||||
}
|
||||
} else {
|
||||
$message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail');
|
||||
$message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail_sms_plugin_inactive_or_not_setup');
|
||||
}
|
||||
} else {
|
||||
$message12 = Lang::get('lang.activate_your_account_click_on_Link_that_send_to_your_mail');
|
||||
}
|
||||
|
||||
return redirect('home')->with('success', $message12);
|
||||
} catch (\Exception $e) {
|
||||
return redirect()->back()->with('fails', $e->getMessage());
|
||||
|
@@ -11,8 +11,8 @@ use App\Model\helpdesk\Settings\Email;
|
||||
use App\User;
|
||||
use Auth;
|
||||
use Exception;
|
||||
use Mail;
|
||||
use Lang;
|
||||
use Mail;
|
||||
|
||||
class PhpMailController extends Controller
|
||||
{
|
||||
@@ -121,7 +121,6 @@ class PhpMailController extends Controller
|
||||
$email_address = $this->checkElement('email_address', $template_variables);
|
||||
$user = $this->checkElement('user', $template_variables);
|
||||
|
||||
|
||||
$status = \DB::table('settings_email')->first();
|
||||
|
||||
$template = TemplateType::where('name', '=', $template_type)->first();
|
||||
@@ -148,7 +147,6 @@ class PhpMailController extends Controller
|
||||
$subject = null;
|
||||
}
|
||||
|
||||
|
||||
$variables = ['{!!$user!!}', '{!!$agent!!}', '{!!$ticket_number!!}', '{!!$content!!}', '{!!$from!!}', '{!!$ticket_agent_name!!}', '{!!$ticket_client_name!!}', '{!!$ticket_client_email!!}', '{!!$ticket_body!!}', '{!!$ticket_assigner!!}', '{!!$ticket_link_with_number!!}', '{!!$system_error!!}', '{!!$agent_sign!!}', '{!!$department_sign!!}', '{!!$password_reset_link!!}', '{!!$email_address!!}', '{!!$user_password!!}', '{!!$system_from!!}', '{!!$system_link!!}', '{!!$ticket_link!!}'];
|
||||
|
||||
$data = [$user, $agent, $ticket_number, $content, $from, $ticket_agent_name, $ticket_client_name, $ticket_client_email, $ticket_body, $ticket_assigner, $ticket_link_with_number, $system_error, $agent_sign, $department_sign, $password_reset_link, $email_address, $user_password, $system_from, $system_link, $ticket_link];
|
||||
@@ -158,7 +156,6 @@ class PhpMailController extends Controller
|
||||
$contents = $messagebody;
|
||||
}
|
||||
|
||||
|
||||
if ($template_type == 'ticket-reply-agent') {
|
||||
$line = '---Reply above this line--- <br/><br/>';
|
||||
$content = $line.$messagebody;
|
||||
|
@@ -137,7 +137,6 @@ class UpgradeController extends Controller
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
//Make the directory if we need to...
|
||||
if (!is_dir($update.'/'.$thisFileDir.'/')) {
|
||||
\File::makeDirectory($update.'/'.$thisFileDir, 0775, true, true);
|
||||
@@ -252,7 +251,6 @@ class UpgradeController extends Controller
|
||||
|
||||
return redirect('dashboard')->with('fails', 'Could not find latest realeases from repository.');
|
||||
|
||||
|
||||
// else {
|
||||
// return redirect()->back();
|
||||
// }
|
||||
|
Reference in New Issue
Block a user