<?php

class mod_mapboxInstallerScript
{
    function postflight($type, $parent)
{
    JFolder::delete(JPATH_ROOT . '/media/mod_mapbox');
    if ($type === 'uninstall') {
        JFolder::delete(JPATH_ROOT . '/media/mod_mapbox_new');
    } else {
        rename(JPATH_ROOT . '/media/mod_mapbox_new', JPATH_ROOT . '/media/mod_mapbox');
    }
}
}
