Browse Source

Remove unneeded files

pull/663/head
danpros 2 years ago
parent
commit
8a7559e44b
3 changed files with 0 additions and 48 deletions
  1. +0
    -1
      system/admin/views/updated-to.html.php
  2. +0
    -5
      system/upgrade/index.php
  3. +0
    -42
      system/upgrade/run.php

+ 0
- 1
system/admin/views/updated-to.html.php View File

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


+ 0
- 5
system/upgrade/index.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';

+ 0
- 42
system/upgrade/run.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/");
}

Loading…
Cancel
Save