From 0e8de1ea03765f564bc1757504e0d8c14334b79e Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Tue, 19 Nov 2019 00:13:36 +0100 Subject: Rev: 4572 --- .../www/include/modules/naplo/haladasi/haladasi.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'mayor-orig/mayor-naplo/www/include') diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php index 9c46b400..e5090c18 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php @@ -39,15 +39,17 @@ // Az érintett tankörök id-inek listája $tankorIds = $tankorAdat = array(); if (is_array($Tankorok) && ($count = count($Tankorok)) > 0) { - $tankorFeltetel = 'tankorId IN (' . $Tankorok[0]['tankorId']; - $tankorIds[] = $Tankorok[0]['tankorId']; - $Tankorok[0]['tanar'] = getTankorTanaraiByInterval($Tankorok[0]['tankorId'], array('tanev' => __TANEV, 'tolDt' => _SHOW_DAYS_FROM, 'igDt' => _SHOW_DAYS_TO, 'result' => 'nevsor')); - $tankorAdat[$Tankorok[0]['tankorId']] = $Tankorok[0]; + $_tankorId = intval($Tankorok[0]['tankorId']); + $tankorFeltetel = 'tankorId IN (' . $_tankorId; + $tankorIds[] = $_tankorId; + $Tankorok[0]['tanar'] = getTankorTanaraiByInterval($_tankorId, array('tanev' => __TANEV, 'tolDt' => _SHOW_DAYS_FROM, 'igDt' => _SHOW_DAYS_TO, 'result' => 'nevsor')); + $tankorAdat[$_tankorId] = $Tankorok[0]; for ($i = 1; $i < $count; $i++) { - $tankorFeltetel .= ', '.$Tankorok[$i]['tankorId']; - $tankorIds[] = $Tankorok[$i]['tankorId']; - $Tankorok[$i]['tanar'] = getTankorTanaraiByInterval($Tankorok[$i]['tankorId'], array('tanev' => __TANEV, 'tolDt' => _SHOW_DAYS_FROM, 'igDt' => _SHOW_DAYS_TO, 'result' => 'nevsor')); - $tankorAdat[$Tankorok[$i]['tankorId']] = $Tankorok[$i]; + $_tankorId = intval($Tankorok[$i]['tankorId']); + $tankorFeltetel .= ', '.$_tankorId; + $tankorIds[] = $_tankorId; + $Tankorok[$i]['tanar'] = getTankorTanaraiByInterval($_tankorId, array('tanev' => __TANEV, 'tolDt' => _SHOW_DAYS_FROM, 'igDt' => _SHOW_DAYS_TO, 'result' => 'nevsor')); + $tankorAdat[$_tankorId] = $Tankorok[$i]; } $tankorFeltetel .= ')'; } -- cgit v1.2.3