aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www/policy/private
diff options
context:
space:
mode:
authorM.Gergo2020-04-01 12:10:03 +0200
committerM.Gergo2020-04-01 12:10:03 +0200
commit973ae816e66352e9d97facf92f8ffc3bcc0d89bd (patch)
treea6caefb9b9327ded9032d74c2402021e90c68e88 /mayor-orig/mayor-naplo/www/policy/private
parentc11d4fc99247dda5d64fd76ee4206f06cd7108e8 (diff)
downloadmayor-rev4645.tar.gz
mayor-rev4645.zip
Rev: 4645rev4645
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));
}