diff options
Diffstat (limited to 'mayor-orig/mayor-portal/www/include')
-rw-r--r-- | mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php | 3 | ||||
-rw-r--r-- | mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php b/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php index 1c5c8bc9..652c18ae 100644 --- a/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php +++ b/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php @@ -41,6 +41,9 @@ } } else $q = ''; if ($q!='') $r = db_query($q,array('modul'=>'portal','result'=>'insert','values'=>$v)); + $q = "DELETE FROM `hirKategoria` WHERE hirId=%u"; + $v = array($hirId); + db_query($q,array('modul'=>'portal','result'=>'delete','values'=>$v)); if (is_array($DATA['kategoriaId'])) { for ($i=0; $i<count($DATA['kategoriaId']); $i++) { $q = "INSERT IGNORE INTO `hirKategoria` (hirId,kategoriaId) VALUES (%u,%u)"; diff --git a/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php b/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php index 0de316b6..7b59782a 100644 --- a/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php +++ b/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php @@ -13,7 +13,7 @@ return $r; } - function getHirek($SET = array('all'=>true,'tolDt'=>'', 'igDt'=>'', 'id' => '', 'flag'=>array(), 'class'=>array(), 'cid'=>array(), 'limit'=>'', 'lang'=>'hu_HU') ) { + function getHirek($SET = array('all'=>true,'tolDt'=>'', 'igDt'=>'', 'id' => '', 'flag'=>array(), 'class'=>array(), 'cid'=>array(), 'limit'=>'', 'lang'=>'hu_HU', 'kategoria'=>array()) ) { $tolDt = $SET['tolDt']; $igDt = $SET['igDt']; if ($tolDt!='') $W[] = "kdt<='$tolDt'"; @@ -21,6 +21,8 @@ if (count($SET['flag'])>0) $W[] = "flag IN (".implode(',',$SET['flag']).")"; if (count($SET['class'])>0) $W[] = "class IN (".implode(',',$SET['class']).")"; if (count($SET['cid'])>0) $W[] = "cid IN (".implode(',',$SET['cid']).")"; + if (is_array($SET['kategoria']) && count($SET['kategoria'])>0 && !is_null($SET['kategoria'][0])) + $W[] = "kategoriaId IN (".implode(',',$SET['kategoria']).")"; if ($SET['lang']!='') $W[] = "lang='".$SET['lang']."'"; if ($SET['limit']!='') $L = ' LIMIT '.$SET['limit']; |