aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www/policy/private
diff options
context:
space:
mode:
Diffstat (limited to 'mayor-orig/mayor-naplo/www/policy/private')
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php4
1 files changed, 1 insertions, 3 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..3fd87f21 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
@@ -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));
}