Skip to content

Commit

Permalink
Update add-modloader.php
Browse files Browse the repository at this point in the history
set filesize
  • Loading branch information
cowpod committed Nov 13, 2024
1 parent e86c04d commit 8fb515a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions functions/add-modloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@
unlink("../forges/modpack-".$version."/modpack.jar");
rmdir("../forges/modpack-".$version);
$md5 = md5_file("../forges/forge-".$version.".zip");
$filesize=filesize("../forges/forge-".$version.".zip");
$url = "http://".$config['host'].$config['dir']."forges/forge-".$version.".zip";

$res = $db->execute("
INSERT INTO `mods` (`name`,`pretty_name`,`md5`,`url`,`link`,`author`,`description`,`version`,`mcversion`,`filename`,`type`,`loadertype`)
INSERT INTO `mods` (`name`,`pretty_name`,`md5`,`url`,`link`,`author`,`description`,`version`,`mcversion`,`filename`,`filesize`,`type`,`loadertype`)
VALUES (
'".$type."',
'".$type_pretty_names[$type]."',
Expand All @@ -75,7 +76,8 @@
'".$type_descriptions[$type]."',
'".$version."',
'".$mcversion."',
'forge-".$version.".zip',
'forge-".$version.".zip',
".$filesize.",
'forge',
'".$type."'
)
Expand Down

0 comments on commit 8fb515a

Please sign in to comment.