Skip to content

Commit

Permalink
migrate.php: icon file now points to self-hosted icon and not dissape…
Browse files Browse the repository at this point in the history
…ared demo.solder.cf...
  • Loading branch information
cowpod committed Nov 2, 2024
1 parent ebde020 commit f4f4204
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/migrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
if (!$_SESSION['user']||$_SESSION['user']=="") {
die("error");
}
$PROTO_STR = strtolower(current(explode('/',$_SERVER['SERVER_PROTOCOL']))).'://';

require_once("db.php");
$db=new Db;
Expand All @@ -50,7 +51,7 @@
} else {
$public = 0;
}
$db->execute("INSERT INTO `modpacks` (`display_name`,`name`,`public`,`latest`,`recommended`,`icon`) VALUES ('".$row['name']."','".$row['slug']."',".$public.",'".$latest."','".$recommended."','http://demo.solder.cf/TechnicSolder/resources/default/icon.png')");
$db->execute("INSERT INTO `modpacks` (`display_name`,`name`,`public`,`latest`,`recommended`,`icon`) VALUES ('".$row['name']."','".$row['slug']."',".$public.",'".$latest."','".$recommended."','".$PROTO_STR.$config['host']."/resources/default/icon.png')");
}
// ----- BUILDS ----- \\
$res = $db2->query("SELECT `modpack_id`,`version`,`minecraft_version`,`status`,`java_version`,`required_memory` FROM `builds`");
Expand Down

0 comments on commit f4f4204

Please sign in to comment.