Permalink
Browse files

Merge pull request #49 from Halamix2/develop

Removing threads fix
  • Loading branch information...
phpcodex committed Aug 17, 2017
2 parents 2f8f0bb + 7e51244 commit cc39976c5dbb6ce50c274c317feda1e82d0a9c1f
Showing with 13 additions and 7 deletions.
  1. +2 −0 .gitignore
  2. +1 −1 README.md
  3. +1 −0 changelog.txt
  4. +2 −2 classes/Upload.php
  5. +7 −4 delete.php
View
@@ -3,9 +3,11 @@
*.ta
*.dat
*.tdb
*.kdev4
data_*/
uploads_*/
.idea/
.kdev4/
config.php
composer.lock
vendor/.git #not sure why this was added
View
@@ -5,7 +5,7 @@ Ultimate PHP Board is a flat-file forum for anyone who need fast and modern foru
Development:
[Slack invitation link](https://join.slack.com/myupb/shared_invite/MTk3NjIyMzEzNDQyLTE0OTc0NDQ5NTEtM2M3YjEwYWRjYw)
[Development flow](hhttps://github.com/PHP-Outburst/myUPB/projects/1)
[Development flow](https://github.com/PHP-Outburst/myUPB/projects/1)
Official Forum is on <br>
http://forum.myupb.com/
View
@@ -16,6 +16,7 @@ v2.2.8 Changelog - unreleased (still in development)
# PHP7 support
# Fixed Private Messages system & unblocking
# Fixed built-in avatar chooser
# Fixed removing topics with no files in them
== NEW FEATURES ==
View
@@ -28,7 +28,7 @@ function __construct($dir, $maxSize, $uploadLoc)
$this->initialized = false;
$this->uploadLoc = $uploadLoc;
// Initialize the TextDb object
$this->tdb($dir . '/', 'main.tdb');
parent::__construct($dir . '/', 'main.tdb');
// Check if the upload mod has been installed
if (!file_exists($dir . '/main_uploads.ta'))
@@ -156,4 +156,4 @@ public function notInitialized()
return true;
}
}
}
View
@@ -28,14 +28,17 @@
foreach($p_ids as $p_id) {
$pRec = $post_tdb->get('posts', $p_id);
$upload_ids = explode(",",$pRec[0]['upload_id']);
$upload_ids = [];
if($pRec[0]['upload_id']!="") {
$upload_ids = explode(",",$pRec[0]['upload_id']);
}
$upload = new Upload(DB_DIR, $_CONFIG["fileupload_size"],$_CONFIG["fileupload_location"]);
foreach ($upload_ids as $upload_id)
$upload->deleteFile($upload_id);
$upload->deleteFile($upload_id);
if (!isset($subtract_user_post_count[$pRec[0]['user_id']])) {
$subtract_user_post_count[$pRec[0]['user_id']] = 1;
}

0 comments on commit cc39976

Please sign in to comment.