Commit 2ebbc91a authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Remove commented code and replace quotes

parent 0b8ae5af
Pipeline #3877 passed with stages
in 3 minutes and 22 seconds
......@@ -77,13 +77,11 @@ function getAssociationMembers()
{
$db = new mysqli(TYPO3_DB_HOST, TYPO3_DB_USERNAME, TYPO3_DB_PASSWORD, TYPO3_DB_NAME);
$db->query('SET NAMES utf8');
$where = "email != '' AND hidden=0 AND deleted=0";
$where .= " AND end_date > UNIX_TIMESTAMP(DATE_SUB(CURDATE(),INTERVAL 1 DAY))";
$query = "SELECT uid,email,name,firstname,lastname,membership FROM tx_t3omembership_domain_model_member WHERE " . $where;
//$query .= " AND email LIKE '%loeffler%'";
//$query .= " GROUP BY email";
$query .= " ORDER BY email";
$where = 'email != "" AND hidden=0 AND deleted=0';
$where .= ' AND end_date > UNIX_TIMESTAMP(DATE_SUB(CURDATE(),INTERVAL 1 DAY))';
$query = 'SELECT uid,email,name,firstname,lastname,membership FROM tx_t3omembership_domain_model_member WHERE ' . $where;
$query .= ' ORDER BY email';
$members = array();
$result = $db->query($query);
......@@ -103,9 +101,6 @@ function getAssociationMembers()
*/
function arrayToCsv(array &$fields, $delimiter = ';', $enclosure = '"', $encloseAll = false, $nullToMysqlNull = false)
{
// $delimiter_esc = preg_quote($delimiter, '/');
// $enclosure_esc = preg_quote($enclosure, '/');
$output = array();
foreach ($fields as $field) {
if ($field === null && $nullToMysqlNull) {
......@@ -114,7 +109,7 @@ function arrayToCsv(array &$fields, $delimiter = ';', $enclosure = '"', $enclose
}
// Enclose fields containing $delimiter, $enclosure or whitespace
if ($encloseAll || preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field)) {
if ($encloseAll || preg_match("/(?:${delimiter}|${enclosure}|\s)/", $field)) {
$output[] = $enclosure . str_replace($enclosure, $enclosure . $enclosure, $field) . $enclosure;
} else {
$output[] = $field;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment