mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 19:46:21 +05:30
[TASK] PSR-2
This commit is contained in:
parent
5483453e75
commit
5f6bf63760
2 changed files with 327 additions and 327 deletions
|
|
@ -4,13 +4,15 @@ $updater = new Kanti\HubUpdater("danpros/htmly");
|
|||
$info = $updater->getCurrentInfo();
|
||||
$versionNumber = substr($info['tag_name'], 1);
|
||||
|
||||
function isGraterThan($string){
|
||||
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) {
|
||||
function rrmdir($dir)
|
||||
{
|
||||
if (is_dir($dir)) {
|
||||
$objects = scandir($dir);
|
||||
foreach ($objects as $object) {
|
||||
|
|
@ -30,7 +32,5 @@ if(isGraterThan("2.3")) {// 2.4, 2.5, ...
|
|||
}
|
||||
}
|
||||
|
||||
if(isGraterThan("2.3")) {
|
||||
file_put_contents("index.php", file_get_contents("system/upgrade/index.php"));
|
||||
rrmdir("system/upgrade/");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue