aboutsummaryrefslogtreecommitdiffstats
path: root/egyéb/nextcloud/mayor-nextcloud.php
diff options
context:
space:
mode:
authorM.Gergo2020-03-31 14:54:04 +0200
committerM.Gergo2020-03-31 14:54:04 +0200
commit5c2b63072499cf2baa936382146b061f76c48faa (patch)
treeb14a79da965da407f9f39b7fd7d68344ccf64541 /egyéb/nextcloud/mayor-nextcloud.php
parentd7e6a9dcbe8a6664357c689667ac6c8aa125231b (diff)
downloadmayor-5c2b63072499cf2baa936382146b061f76c48faa.tar.gz
mayor-5c2b63072499cf2baa936382146b061f76c48faa.zip
Mayor-Nextcloud script: tankörmappa
Diffstat (limited to 'egyéb/nextcloud/mayor-nextcloud.php')
-rw-r--r--egyéb/nextcloud/mayor-nextcloud.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/egyéb/nextcloud/mayor-nextcloud.php b/egyéb/nextcloud/mayor-nextcloud.php
index b86a9f7f..abf1d987 100644
--- a/egyéb/nextcloud/mayor-nextcloud.php
+++ b/egyéb/nextcloud/mayor-nextcloud.php
@@ -419,12 +419,14 @@ if (function_exists('mysqli_connect') and PHP_MAJOR_VERSION >= 7) { //MySQLi (Im
$ret[0] = rmdir($occ_path."/data/".$user."/files/".$path."/".$val);
if($log['verbose'] > 5) { echo "php ->\tDIR: \"".$occ_path."/data/".$user."/files/".$path."/".$val."\" deleted.\n"; }
} else { //Nem mappa, vagy nem üres
- if( @unlink($occ_path."/data/".$user."/files/".$path."/".$val.".please-remove") === true && $log['verbose'] > 0 ){ // Már az xxxx.backup is foglalt...
- echo "php ->\tFILE: \"".$occ_path."/data/".$user."/files/".$path."/".$val."\" deleted!!!\n";
- user_notify($user,"Fájl: ".$val.".please-remove Illegális helyen, volt. Automata által törölve.", "Fájl: ".$val.".please-remove törölve!");
+ if( @unlink($occ_path."/data/".$user."/files/".$path."/".$val.time().".please-remove") === true && $log['verbose'] > 0 ){ // Már "xxxx.please-remove" is volt...
+ echo "php ->\tFILE: \"".$occ_path."/data/".$user."/files/".$path."/".$val.time()."\" deleted!!!\n";
+ user_notify($user,"Fájl: ".$path."/".$val.".please-remove Illegális helyen, volt. Automata által törölve.", "Fájl: ".$path."/".$val.".please-remove törölve!");
+ }
+ if(file_exist(pathinfo(pathinfo(occ_path."/data/".$user."/files/".$path."/".$val)['filename'])['filename'])){ //Ha az eredeti könyvtár vagy fájl él
+ $ret[1] = rename($occ_path."/data/".$user."/files/".$path."/".$val, $occ_path."/data/".$user."/files/".$path."/".basename($val, '.please-remove').time().".please-remove");
+ user_notify($user,"Az ön >>".$path."/<< könyvtárában tiltott helyen lévő fájl, vagy olyan tankör-mappa található, amely tankörnek ön továbbá már nem tagja. Kérem helyezze el kívül a >>".$path."/<< mappán, vagy törölje belőle! Később automatikusan törlésre kerül! A fájl átnevezve, új neve --> ".basename($val, '.please-remove').time().".please-remove", "Fájl/Mappa rossz helyen! --> ".$path."/".basename($val, '.please-remove').time().".please-remove" );
}
- $ret[1] = rename($occ_path."/data/".$user."/files/".$path."/".$val, $occ_path."/data/".$user."/files/".$path."/".basename($val, '.please-remove').".please-remove");
- user_notify($user,"Az ön >>".$path."/<< könyvtárában tiltott helyen lévő fáj található, vagy olyan tankör-mappa, amely tankörnek ön továbbá már nem tagja. Kérem helyezze el kívül a >>".$path."/<< mappán, vagy törölje belőle! Biztonság kedvéért átnevezve, új neve --> ".basename($val, '.please-remove').".please-remove", "Fájl/Mappa rossz helyen! --> ".$path."/".basename($val, '.please-remove').".please-remove" );
}
}
}