mirror of
https://github.com/itflow-org/itflow
synced 2026-08-15 20:15:12 +00:00
Replace Function strtoAZaz09() with toAlphanumeric()
This commit is contained in:
@@ -1166,7 +1166,7 @@ if (isset($_GET['download_assets_csv_template'])) {
|
|||||||
$delimiter = ",";
|
$delimiter = ",";
|
||||||
$enclosure = '"';
|
$enclosure = '"';
|
||||||
$escape = '\\';
|
$escape = '\\';
|
||||||
$filename = strtoAZaz09($client_name) . "-Assets-Template.csv";
|
$filename = toAlphanumeric($client_name) . "-Assets-Template.csv";
|
||||||
|
|
||||||
//create a file pointer
|
//create a file pointer
|
||||||
$f = fopen('php://memory', 'w');
|
$f = fopen('php://memory', 'w');
|
||||||
@@ -1813,7 +1813,7 @@ if (isset($_GET['download_client_asset_interfaces_csv_template'])) {
|
|||||||
$delimiter = ",";
|
$delimiter = ",";
|
||||||
$enclosure = '"';
|
$enclosure = '"';
|
||||||
$escape = '\\';
|
$escape = '\\';
|
||||||
$filename = strtoAZaz09($asset_name) . "-Asset-Interfaces-Template.csv";
|
$filename = toAlphanumeric($asset_name) . "-Asset-Interfaces-Template.csv";
|
||||||
|
|
||||||
//create a file pointer
|
//create a file pointer
|
||||||
$f = fopen('php://memory', 'w');
|
$f = fopen('php://memory', 'w');
|
||||||
@@ -1859,7 +1859,7 @@ if (isset($_POST['export_client_asset_interfaces_csv'])) {
|
|||||||
$delimiter = ",";
|
$delimiter = ",";
|
||||||
$enclosure = '"';
|
$enclosure = '"';
|
||||||
$escape = '\\'; // backslash
|
$escape = '\\'; // backslash
|
||||||
$filename = strtoAZaz09($asset_name) . "-Interfaces-" . date('Y-m-d') . ".csv";
|
$filename = toAlphanumeric($asset_name) . "-Interfaces-" . date('Y-m-d') . ".csv";
|
||||||
|
|
||||||
//create a file pointer
|
//create a file pointer
|
||||||
$f = fopen('php://memory', 'w');
|
$f = fopen('php://memory', 'w');
|
||||||
|
|||||||
@@ -2063,7 +2063,7 @@ if (isset($_POST["export_client_pdf"])) {
|
|||||||
$pdf->writeHTML($html, true, false, true, false, "");
|
$pdf->writeHTML($html, true, false, true, false, "");
|
||||||
|
|
||||||
// Output the PDF document for download
|
// Output the PDF document for download
|
||||||
$pdf->Output(strtoAZaz09($client_name) . "-IT_Documentation-" . date("Y-m-d") . ".pdf", "D");
|
$pdf->Output(toAlphanumeric($client_name) . "-IT_Documentation-" . date("Y-m-d") . ".pdf", "D");
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ function cleanInput($input) {
|
|||||||
return $input;
|
return $input;
|
||||||
}
|
}
|
||||||
|
|
||||||
function strtoAZaz09($string)
|
function toAlphanumeric($string)
|
||||||
{
|
{
|
||||||
// Gets rid of non-alphanumerics
|
// Gets rid of non-alphanumerics
|
||||||
return preg_replace('/[^A-Za-z0-9_-]/', '', $string);
|
return preg_replace('/[^A-Za-z0-9_-]/', '', $string);
|
||||||
|
|||||||
Reference in New Issue
Block a user