aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www/policy/private
diff options
context:
space:
mode:
authorM.Gergo2020-04-06 15:57:22 +0200
committerM.Gergo2020-04-06 15:57:22 +0200
commitf41c58472a34b3a503bf253ea589f7875d351985 (patch)
treea129f2b7c2ea771795acf8fddc41239651c52a73 /mayor-orig/mayor-naplo/www/policy/private
parent70180abdfc226d1640a0408248fefd1fd1e45c1f (diff)
parentdf9e6d7a1ef747e2207bc2e18b96fca06cbef8f8 (diff)
downloadmayor-f41c58472a34b3a503bf253ea589f7875d351985.tar.gz
mayor-f41c58472a34b3a503bf253ea589f7875d351985.zip
Merge branch 'MaYor-dev'
Original modifications pulled from http://www.mayor.hu
Diffstat (limited to 'mayor-orig/mayor-naplo/www/policy/private')
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php
index ac911f8b..86ca57a0 100644
--- a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php
+++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php
@@ -61,7 +61,7 @@
$hazifeladatFeltoltesEngedely = readVariable($_POST['hazifeladatFeltoltesEngedely'],'id',0);
if ($hazifeladatId>0) { // update
if (is_null($hazifeladatHataridoDt)) {
- $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s',hazifeladatFeltoltesEngedely=%u WHERE hazifeladatId=%u";
+ $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s',hazifeladatFeltoltesEngedely=%u,hazifeladatHataridoDt=NULL WHERE hazifeladatId=%u";
$values = array($ADAT['hazifeladatLeiras'],$hazifeladatFeltoltesEngedely,$ADAT['hazifeladatId']);
} else {
$q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s',hazifeladatFeltoltesEngedely=%u,hazifeladatHataridoDt='%s' WHERE hazifeladatId=%u";
@@ -147,8 +147,6 @@
}
if ($sikeresFeltoltes===true) {
- // --todo unlink existing?--
-
$q = "SELECT hazifeladatDiakFilename FROM oraHazifeladatDiak WHERE hazifeladatId=%u AND diakId=%u";
$values = array($ADAT['hazifeladatId'],$diakId);
$oldFilename = db_query($q, array('modul'=>'naplo','result'=>'value','values'=>$values));
@@ -158,7 +156,7 @@
$origFilename = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $_FILES['upfile']['name']);
$origFilename = mb_ereg_replace("([\.]{2,})", '', $_FILES['upfile']['name']);
if ($origFilename=='') $origFilename = $FILEADAT['filename'];
- $q = "UPDATE oraHazifeladatDiak SET hazifeladatDiakFilename='%s',hazifeladatDiakOrigFilename='%s' WHERE hazifeladatId=%u AND diakId=%u";
+ $q = "UPDATE oraHazifeladatDiak SET hazifeladatDiakFilename='%s',hazifeladatDiakOrigFilename='%s',hazifeladatDiakFileDt=NOW() WHERE hazifeladatId=%u AND diakId=%u";
$values = array($FILEADAT['filename'],$origFilename,$ADAT['hazifeladatId'], $diakId);
db_query($q, array('modul'=>'naplo','result'=>'update','values'=>$values));
}