aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www/include
diff options
context:
space:
mode:
Diffstat (limited to 'mayor-orig/mayor-naplo/www/include')
-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
2 files changed, 11 insertions, 11 deletions
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