mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 11:24:52 +00:00
Remove redundant (default) arguments
This commit is contained in:
@@ -63,7 +63,7 @@ if ($emails) {
|
|||||||
foreach($emails as $email) {
|
foreach($emails as $email) {
|
||||||
|
|
||||||
// Get message details
|
// Get message details
|
||||||
$metadata = imap_fetch_overview($imap, $email,0); // Date, Subject, Size
|
$metadata = imap_fetch_overview($imap, $email); // Date, Subject, Size
|
||||||
$header = imap_headerinfo($imap, $email); // To get the From as an email, not a contact name
|
$header = imap_headerinfo($imap, $email); // To get the From as an email, not a contact name
|
||||||
$message = imap_fetchbody($imap, $email, 1); // Body
|
$message = imap_fetchbody($imap, $email, 1); // Body
|
||||||
|
|
||||||
|
|||||||
@@ -525,7 +525,6 @@ function sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_
|
|||||||
$mail->addAddress("$to_email", "$to_name"); // Add a recipient
|
$mail->addAddress("$to_email", "$to_name"); // Add a recipient
|
||||||
|
|
||||||
// Content
|
// Content
|
||||||
$mail->isHTML(true); // Set email format to HTML
|
|
||||||
$mail->Subject = "$subject"; // Subject
|
$mail->Subject = "$subject"; // Subject
|
||||||
$mail->Body = "$body"; // Content
|
$mail->Body = "$body"; // Content
|
||||||
|
|
||||||
|
|||||||
24
post.php
24
post.php
@@ -4225,7 +4225,7 @@ if (isset($_POST["import_client_contacts_csv"])) {
|
|||||||
|
|
||||||
//(Else)Check column count
|
//(Else)Check column count
|
||||||
$f = fopen($file_name, "r");
|
$f = fopen($file_name, "r");
|
||||||
$f_columns = fgetcsv($f, 1000, ",");
|
$f_columns = fgetcsv($f, 1000);
|
||||||
if (!$error & count($f_columns) != 8) {
|
if (!$error & count($f_columns) != 8) {
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
$_SESSION['alert_message'] = "Bad column count.";
|
$_SESSION['alert_message'] = "Bad column count.";
|
||||||
@@ -4234,10 +4234,10 @@ if (isset($_POST["import_client_contacts_csv"])) {
|
|||||||
//Else, parse the file
|
//Else, parse the file
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$file = fopen($file_name, "r");
|
$file = fopen($file_name, "r");
|
||||||
fgetcsv($file, 1000, ","); // Skip first line
|
fgetcsv($file, 1000); // Skip first line
|
||||||
$row_count = 0;
|
$row_count = 0;
|
||||||
$duplicate_count = 0;
|
$duplicate_count = 0;
|
||||||
while (($column = fgetcsv($file, 1000, ",")) !== FALSE) {
|
while (($column = fgetcsv($file, 1000)) !== FALSE) {
|
||||||
$duplicate_detect = 0;
|
$duplicate_detect = 0;
|
||||||
if (isset($column[0])) {
|
if (isset($column[0])) {
|
||||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0])));
|
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0])));
|
||||||
@@ -4639,7 +4639,7 @@ if (isset($_POST["import_client_locations_csv"])) {
|
|||||||
|
|
||||||
//(Else)Check column count
|
//(Else)Check column count
|
||||||
$f = fopen($file_name, "r");
|
$f = fopen($file_name, "r");
|
||||||
$f_columns = fgetcsv($f, 1000, ",");
|
$f_columns = fgetcsv($f, 1000);
|
||||||
if (!$error & count($f_columns) != 7) {
|
if (!$error & count($f_columns) != 7) {
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
$_SESSION['alert_message'] = "Bad column count.";
|
$_SESSION['alert_message'] = "Bad column count.";
|
||||||
@@ -4648,10 +4648,10 @@ if (isset($_POST["import_client_locations_csv"])) {
|
|||||||
//Else, parse the file
|
//Else, parse the file
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$file = fopen($file_name, "r");
|
$file = fopen($file_name, "r");
|
||||||
fgetcsv($file, 1000, ","); // Skip first line
|
fgetcsv($file, 1000); // Skip first line
|
||||||
$row_count = 0;
|
$row_count = 0;
|
||||||
$duplicate_count = 0;
|
$duplicate_count = 0;
|
||||||
while (($column = fgetcsv($file, 1000, ",")) !== FALSE) {
|
while (($column = fgetcsv($file, 1000)) !== FALSE) {
|
||||||
$duplicate_detect = 0;
|
$duplicate_detect = 0;
|
||||||
if (isset($column[0])) {
|
if (isset($column[0])) {
|
||||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0])));
|
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0])));
|
||||||
@@ -4904,7 +4904,7 @@ if (isset($_POST["import_client_assets_csv"])) {
|
|||||||
|
|
||||||
//(Else)Check column count (name, type, make, model, serial, os)
|
//(Else)Check column count (name, type, make, model, serial, os)
|
||||||
$f = fopen($file_name, "r");
|
$f = fopen($file_name, "r");
|
||||||
$f_columns = fgetcsv($f, 1000, ",");
|
$f_columns = fgetcsv($f, 1000);
|
||||||
if (!$error & count($f_columns) != 8) {
|
if (!$error & count($f_columns) != 8) {
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
$_SESSION['alert_message'] = "Bad column count.";
|
$_SESSION['alert_message'] = "Bad column count.";
|
||||||
@@ -4913,10 +4913,10 @@ if (isset($_POST["import_client_assets_csv"])) {
|
|||||||
//Else, parse the file
|
//Else, parse the file
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$file = fopen($file_name, "r");
|
$file = fopen($file_name, "r");
|
||||||
fgetcsv($file, 1000, ","); // Skip first line
|
fgetcsv($file, 1000); // Skip first line
|
||||||
$row_count = 0;
|
$row_count = 0;
|
||||||
$duplicate_count = 0;
|
$duplicate_count = 0;
|
||||||
while (($column = fgetcsv($file, 1000, ",")) !== FALSE) {
|
while (($column = fgetcsv($file, 1000)) !== FALSE) {
|
||||||
$duplicate_detect = 0;
|
$duplicate_detect = 0;
|
||||||
if (isset($column[0])) {
|
if (isset($column[0])) {
|
||||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0])));
|
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0])));
|
||||||
@@ -5407,7 +5407,7 @@ if (isset($_POST["import_client_logins_csv"])) {
|
|||||||
|
|
||||||
//(Else)Check column count
|
//(Else)Check column count
|
||||||
$f = fopen($file_name, "r");
|
$f = fopen($file_name, "r");
|
||||||
$f_columns = fgetcsv($f, 1000, ",");
|
$f_columns = fgetcsv($f, 1000);
|
||||||
if (!$error & count($f_columns) != 4) {
|
if (!$error & count($f_columns) != 4) {
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
$_SESSION['alert_message'] = "Bad column count.";
|
$_SESSION['alert_message'] = "Bad column count.";
|
||||||
@@ -5416,10 +5416,10 @@ if (isset($_POST["import_client_logins_csv"])) {
|
|||||||
//Else, parse the file
|
//Else, parse the file
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$file = fopen($file_name, "r");
|
$file = fopen($file_name, "r");
|
||||||
fgetcsv($file, 1000, ","); // Skip first line
|
fgetcsv($file, 1000); // Skip first line
|
||||||
$row_count = 0;
|
$row_count = 0;
|
||||||
$duplicate_count = 0;
|
$duplicate_count = 0;
|
||||||
while (($column = fgetcsv($file, 1000, ",")) !== FALSE) {
|
while (($column = fgetcsv($file, 1000)) !== FALSE) {
|
||||||
$duplicate_detect = 0;
|
$duplicate_detect = 0;
|
||||||
if (isset($column[0])) {
|
if (isset($column[0])) {
|
||||||
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0])));
|
$name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0])));
|
||||||
|
|||||||
Reference in New Issue
Block a user