• Welcome to Simple Machines Community Forum. Please login or sign up.

[2.1] Package Manager Reporting Incorrect Installed Time for uninstalled MOD

Started by Randem, February 07, 2020, 10:57:14 PM

Previous topic - Next topic

Randem

Found a small error in the Package Manager which will report and installed time for an uninstalled MOD that has the same name. The Package Manager checks for the package name but not the version number and then updates all the MODs with the same installed time. This happens when there are multiple version of a MOD uploaded but not installed. If one is installed ALL of the MODs from the same author that have the same name will be updated with the same install date and time.

I created a quick fix for this until the code is actually updated to reflect a correction.
The MOD is attached along with images of before and after the installation of the MOD.
https://randemsystems.com/support/       -   Discusware to SMF Converter / BotBanish Support
https://blaxtonjames.com                         - Money, Knowledge And Power; Why You Are Missing All Three
https://joystickgangsta.com                      - An Experience You Can't Refuse
https://botbanish.com                                 - The Ultimate BOT Defender for SMF, OpenCart, WordPress  & Websites

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Randem

Had to make an update to the package... Disregard previous upload.
https://randemsystems.com/support/       -   Discusware to SMF Converter / BotBanish Support
https://blaxtonjames.com                         - Money, Knowledge And Power; Why You Are Missing All Three
https://joystickgangsta.com                      - An Experience You Can't Refuse
https://botbanish.com                                 - The Ultimate BOT Defender for SMF, OpenCart, WordPress  & Websites

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Randem

If you would like to make the changes manually, please follow these instructions:
The program to change is Packages.php in the Sources folder at line 1633.

Find:

$packageInfo['time_installed'] = isset($installed_mods[$packageInfo['id']]) ? $installed_mods[$packageInfo['id']]['time_installed'] : 0;


Replace With:

$packageInfo['time_installed'] = 0;

if (isset($instmods)) {

foreach($instmods as $mod) {

if (($packageInfo['id'] == $mod['package_id'])
&& ($packageInfo['version'] == $mod['version'])) {

$packageInfo['time_installed'] = $mod['time_installed'];
break;
}
}

} else {

$packageInfo['time_installed'] = isset($installed_mods[$packageInfo['id']]) ? $installed_mods[$packageInfo['id']]['time_installed'] : 0;
}
https://randemsystems.com/support/       -   Discusware to SMF Converter / BotBanish Support
https://blaxtonjames.com                         - Money, Knowledge And Power; Why You Are Missing All Three
https://joystickgangsta.com                      - An Experience You Can't Refuse
https://botbanish.com                                 - The Ultimate BOT Defender for SMF, OpenCart, WordPress  & Websites

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself



Advertisement: