Remove unneeded files

This commit is contained in:
danpros 2023-12-11 13:16:34 +07:00
commit 8a7559e44b
3 changed files with 0 additions and 48 deletions

View file

@ -1,7 +1,6 @@
<h3>Updated to<h3>
<h2>[<?php echo $info['tag_name']; ?>] <?php echo $info['name']; ?></h2>
<p><?php echo \Michelf\MarkdownExtra::defaultTransform($info['body']); ?></p>
<?php require_once "system/upgrade/run.php"; ?>
<?php
if (file_exists('install.php')) {
unlink('install.php');

View file

@ -1,5 +0,0 @@
<?php
define('HTMLY', true);
$config_file = 'config/config.ini';
require 'system/vendor/autoload.php';
require 'system/htmly.php';

View file

@ -1,42 +0,0 @@
<?php
config('source', 'config/config.ini');
$updater = new Kanti\HubUpdater("danpros/htmly");
$info = $updater->getCurrentInfo();
$versionNumber = substr($info['tag_name'], 1);
function isGraterThan($string)
{
global $versionNumber;
return (version_compare($versionNumber, $string) > 0);
}
// http://stackoverflow.com/questions/3338123/how-do-i-recursively-delete-a-directory-and-its-entire-contents-files-sub-dir
function rrmdir($dir)
{
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (filetype($dir . "/" . $object) == "dir") rrmdir($dir . "/" . $object); else unlink($dir . "/" . $object);
}
}
reset($objects);
rmdir($dir);
} else if (is_file($dir)) {
unlink($dir);
}
}
//run upgrade specific stuff
if (isGraterThan("2.3")) {// 2.4, 2.5, ...
if (file_exists("vendor/")) {
rrmdir("vendor/");
}
}
if (!config("dev")) {
file_put_contents("index.php", file_get_contents("system/upgrade/index.php"));
rrmdir("system/upgrade/");
}