dartharnold / mining-buddy-plus

Automatically exported from code.google.com/p/mining-buddy-plus
3 stars 0 forks source link

Delete mysql-update-xx-xx.php after site is up to date #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Installing new site or updates will put update files on server

Once MiningBuddy is updated these files are unnecessary and need deleted

What is the expected output? Files remain after update What do you see instead? 
Files be deleted if site is up to date

Please provide any additional information below.

When the update check is ran inside functions/system/init.php simple have these 
files removed once site is up to date

// get rid of latest mysqlupdate
    if ("$CURRENT[0]" == "$SQLVER") {
        $filename2 = "./mysql-update-" . ($CURRENT[0] -1) . "-" . ($CURRENT[0]) . ".php";
        unlink($filename2);
    }

    // get rid of the rest just this time
    if ("$CURRENT[0]" == "$SQLVER") {
        $filename3 = "./mysql-update-" . ($CURRENT[0] -2) . "-" . ($CURRENT[0] -1) . ".php";
        $filename4 = "./mysql-update-" . ($CURRENT[0] -3) . "-" . ($CURRENT[0] -2) . ".php";
        $filename5 = "./mysql-update-" . ($CURRENT[0] -4) . "-" . ($CURRENT[0] -1) . ".php";
        $filename6 = "./mysql-update-" . ($CURRENT[0] -5) . "-" . ($CURRENT[0] -4) . ".php";
        $filename7 = "./mysql-update-" . ($CURRENT[0] -6) . "-" . ($CURRENT[0] -5) . ".php";
        unlink($filename3);
        unlink($filename4);
        unlink($filename5);
        unlink($filename6);
        unlink($filename7);
    }
}

Original issue reported on code.google.com by support@miningbuddy.us on 4 Jan 2012 at 12:46

Attachments:

GoogleCodeExporter commented 9 years ago
Looking into a different approach for this I have already discussed it with the 
requester.

Original comment by darth.ar...@thedarth.com on 8 Jan 2012 at 3:44