aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo
diff options
context:
space:
mode:
authorM.Gergo2022-07-27 19:30:06 +0200
committerM.Gergo2022-07-27 19:30:06 +0200
commit9acd050ff186f06079b0bdb396d2f17bbbdc5336 (patch)
treefbbd61eb2c7512b74a34ff49d183f58b730354f9 /mayor-orig/mayor-naplo
parenta1743374b1a3f12a1d713cd40191bdb853c5e690 (diff)
downloadmayor-9acd050ff186f06079b0bdb396d2f17bbbdc5336.tar.gz
mayor-9acd050ff186f06079b0bdb396d2f17bbbdc5336.zip
Rev: 4850
Diffstat (limited to 'mayor-orig/mayor-naplo')
-rw-r--r--mayor-orig/mayor-naplo/log/mayor-naplo.rev2
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/osztaly.php6
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/tanar.php16
3 files changed, 12 insertions, 12 deletions
diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev
index be364c8b..4d4433e4 100644
--- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev
+++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev
@@ -1 +1 @@
-4847
+4850
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/osztaly.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/osztaly.php
index 86301c28..5a2f70c3 100644
--- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/osztaly.php
+++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/osztaly.php
@@ -525,7 +525,7 @@ function getOsztalyfonok($osztalyId, $tanev=__TANEV, $olr = null) {
initTolIgDt($tanev, $kDt, $zDt);
$q = "SELECT osztalyTanar.tanarId,
- TRIM(CONCAT(viseltNevElotag,' ',viseltCsaladiNev,' ',viseltUtonev)) As tanarNev, osztalyTanar.beDt, osztalyTanar.kiDt
+ TRIM(CONCAT(IFNULL(viseltNevElotag,''),' ',viseltCsaladiNev,' ',viseltUtonev)) As tanarNev, osztalyTanar.beDt, osztalyTanar.kiDt
FROM osztalyTanar LEFT JOIN tanar USING (tanarId)
WHERE osztalyId = %u
AND osztalyTanar.beDt <= '%s'
@@ -544,7 +544,7 @@ function getOsztalyfonokok($osztalyId, $tanev = null, $olr = null) {
if (is_null($tanev)) {
$q = "SELECT osztalyTanar.tanarId AS tanarId,
- TRIM(CONCAT(viseltNevElotag,' ',viseltCsaladiNev,' ',viseltUtonev)) AS tanarNev,
+ TRIM(CONCAT(IFNULL(viseltNevElotag,''),' ',viseltCsaladiNev,' ',viseltUtonev)) AS tanarNev,
osztalyTanar.beDt AS beDt,
osztalyTanar.kiDt AS kiDt
FROM osztalyTanar LEFT JOIN tanar USING (tanarId)
@@ -561,7 +561,7 @@ function getOsztalyfonokok($osztalyId, $tanev = null, $olr = null) {
$kDt = $tanevAdat['kezdesDt']; $zDt = $tanevAdat['zarasDt'];
$q = "SELECT osztalyTanar.tanarId AS tanarId,
- TRIM(CONCAT(viseltNevElotag,' ',viseltCsaladiNev,' ',viseltUtonev)) AS tanarNev,
+ TRIM(CONCAT(IFNULL(viseltNevElotag,''),' ',viseltCsaladiNev,' ',viseltUtonev)) AS tanarNev,
osztalyTanar.beDt AS beDt,
osztalyTanar.kiDt AS kiDt
FROM osztalyTanar LEFT JOIN tanar USING (tanarId)
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/tanar.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/tanar.php
index 77b47fb8..fbf22510 100644
--- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/tanar.php
+++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/tanar.php
@@ -50,12 +50,12 @@
if ($SET['targyId'] != '') {
if (count($where) > 0) $W = 'AND ' . implode(' AND ',$where);
- $q1 = "SELECT tanar.tanarId AS tanarId, TRIM(CONCAT_WS(' ',viseltNevElotag, ViseltCsaladiNev, viseltUtoNev)) AS tanarNev, statusz,
+ $q1 = "SELECT tanar.tanarId AS tanarId, TRIM(CONCAT_WS(' ',IFNULL(viseltNevElotag,''), ViseltCsaladiNev, viseltUtoNev)) AS tanarNev, statusz,
hetiKotelezoOraszam,hetiLekotottMinOraszam,hetiLekotottMaxOraszam,hetiKotottMaxOraszam,hetiMunkaora
$extraAttrs
FROM ".__INTEZMENYDBNEV.".targy LEFT JOIN ".__INTEZMENYDBNEV.".mkTanar USING (mkId) LEFT JOIN ".__INTEZMENYDBNEV.".tanar USING (tanarId)
WHERE targyId=%u AND tanarId IS NOT NULL ".$W;
- $q2 = "SELECT tanar.tanarId AS tanarId, TRIM(CONCAT_WS(' ',viseltNevElotag, ViseltCsaladiNev, viseltUtoNev)) AS tanarNev, statusz,
+ $q2 = "SELECT tanar.tanarId AS tanarId, TRIM(CONCAT_WS(' ',IFNULL(viseltNevElotag,''), ViseltCsaladiNev, viseltUtoNev)) AS tanarNev, statusz,
hetiKotelezoOraszam,hetiLekotottMinOraszam,hetiLekotottMaxOraszam,hetiKotottMaxOraszam,hetiMunkaora
$extraAttrs
FROM ".__INTEZMENYDBNEV.".kepesitesTargy LEFT JOIN ".__INTEZMENYDBNEV.".tanarKepesites USING (kepesitesId) LEFT JOIN ".__INTEZMENYDBNEV.".tanar USING (tanarId)
@@ -65,7 +65,7 @@
$q = "(".$q1.") UNION DISTINCT (".$q2.") ORDER BY tanarNev,tanarId";
} elseif ($SET['mkId'] == '') {
if (count($where) > 0) $W = 'WHERE ' . implode(' AND ',$where);
- $q = "SELECT tanarId, TRIM(CONCAT_WS(' ',viseltNevElotag, ViseltCsaladiNev, viseltUtoNev)) AS tanarNev, statusz,
+ $q = "SELECT tanarId, TRIM(CONCAT_WS(' ',IFNULL(viseltNevElotag,''), ViseltCsaladiNev, viseltUtoNev)) AS tanarNev, statusz,
hetiKotelezoOraszam,hetiLekotottMinOraszam,hetiLekotottMaxOraszam,hetiKotottMaxOraszam,hetiMunkaora
$extraAttrs
FROM ".__INTEZMENYDBNEV.".tanar
@@ -73,7 +73,7 @@
$W ORDER BY CONCAT_WS(' ', ViseltCsaladiNev, viseltUtoNev)";
} else {
if (count($where) > 0) $W = 'AND ' . implode(' AND ',$where);
- $q = "SELECT tanar.tanarId AS tanarId, TRIM(CONCAT_WS(' ',viseltNevElotag, ViseltCsaladiNev, viseltUtoNev)) AS tanarNev, statusz,
+ $q = "SELECT tanar.tanarId AS tanarId, TRIM(CONCAT_WS(' ',IFNULL(viseltNevElotag,''), ViseltCsaladiNev, viseltUtoNev)) AS tanarNev, statusz,
hetiKotelezoOraszam,hetiLekotottMinOraszam,hetiLekotottMaxOraszam,hetiKotottMaxOraszam,hetiMunkaora
$extraAttrs
FROM ".__INTEZMENYDBNEV.".tanar LEFT JOIN ".__INTEZMENYDBNEV.".mkTanar USING (tanarId)
@@ -86,7 +86,7 @@
function getTanarNevById($tanarId, $olr = null) {
- $q = "SELECT TRIM(CONCAT_WS(' ', viseltNevElotag, viseltCsaladiNev, viseltUtonev)) AS tanarNev
+ $q = "SELECT TRIM(CONCAT_WS(' ', IFNULL(viseltNevElotag,''), viseltCsaladiNev, viseltUtonev)) AS tanarNev
FROM ".__INTEZMENYDBNEV.".tanar WHERE tanarId=%u";
return db_query($q, array('fv' => 'getTanarNevById', 'modul' => 'naplo_intezmeny', 'result' => 'value', 'values' => array($tanarId)), $olr);
@@ -99,7 +99,7 @@
function getSzabadTanarok($dt, $ora, $olr = '') {
- $q = "SELECT tanar.tanarId AS tanarId, TRIM(CONCAT_WS(' ',viseltNevElotag, ViseltCsaladiNev, viseltUtoNev)) AS tanarNev
+ $q = "SELECT tanar.tanarId AS tanarId, TRIM(CONCAT_WS(' ',IFNULL(viseltNevElotag,''), ViseltCsaladiNev, viseltUtoNev)) AS tanarNev
FROM ".__INTEZMENYDBNEV.".tanar LEFT JOIN ora ON tanarId=ki AND dt='%1\$s' and ora=%2\$u
WHERE ki IS NULL AND beDt<='%1\$s' and (kiDt IS NULL OR kiDt>='%1\$s')
ORDER BY CONCAT_WS(' ', ViseltCsaladiNev, viseltUtoNev)";
@@ -109,7 +109,7 @@
function getFoglaltTanarok($dt, $ora, $olr = '') {
- $q = "SELECT DISTINCT tanar.tanarId AS tanarId, TRIM(CONCAT_WS(' ',viseltNevElotag, ViseltCsaladiNev, viseltUtoNev)) AS tanarNev
+ $q = "SELECT DISTINCT tanar.tanarId AS tanarId, TRIM(CONCAT_WS(' ',IFNULL(viseltNevElotag,''), ViseltCsaladiNev, viseltUtoNev)) AS tanarNev
FROM ".__INTEZMENYDBNEV.".tanar LEFT JOIN ora ON tanarId=ki AND dt='%1\$s' and ora=%2\$u
WHERE ki IS NOT NULL AND beDt<='%1\$s' and (kiDt IS NULL OR kiDt>='%1\$s')
ORDER BY CONCAT_WS(' ', ViseltCsaladiNev, viseltUtoNev)";
@@ -120,7 +120,7 @@
function getTanarAdatById($tanarIds, $olr = '') {
if (!is_array($tanarIds)) $tanarIds = array($tanarIds);
- $q = "SELECT *,TRIM(CONCAT_WS(' ',viseltNevElotag, ViseltCsaladiNev, viseltUtoNev)) AS tanarNev FROM ".__INTEZMENYDBNEV.".tanar WHERE tanarId IN (".implode(',', array_fill(0, count($tanarIds), '%u')).")";
+ $q = "SELECT *,TRIM(CONCAT_WS(' ',IFNULL(viseltNevElotag,''), ViseltCsaladiNev, viseltUtoNev)) AS tanarNev FROM ".__INTEZMENYDBNEV.".tanar WHERE tanarId IN (".implode(',', array_fill(0, count($tanarIds), '%u')).")";
$R = db_query($q, array('fv' => 'getTanarAdatById', 'modul' => 'naplo_intezmeny', 'result' => 'indexed', 'values' => $tanarIds), $olr);
// for ($i=0; $i<count($R); $i++) {
// $q2 = "SELECT osztalyId