/** * Construct */ public static function main() { error_reporting(E_ERROR | E_PARSE); $_SESSION["fail"] = null; $_SESSION["success"] = null; $_SESSION["path"] = null; $_SESSION["chmod"] = null; $globalConfiguration = "app/etc/modules/"; $localModuleFile = "app/code/local/"; $localePT = "app/locale/pt_BR/"; $localeEN = "app/locale/en_US/"; $appAdminDefault = "app/design/adminhtml/default/default/"; $appFrontendBase = "app/design/frontend/base/default/"; $appFrontendDefault = "app/design/frontend/default/"; $skinAdminDefault = "skin/adminhtml/default/default/"; $skinBaseDefault = "skin/frontend/base/default/"; $array = array($globalConfiguration . "Mage_PagSeguro.xml", $globalConfiguration . "PagSeguro_PagSeguro.xml", $localModuleFile . "Mage", $localModuleFile . "PagSeguro", $appAdminDefault . "layout/pagseguro.xml", $appAdminDefault . "template/pagseguro", $appFrontendBase . "layout/pagseguro_pagseguro.xml", $appFrontendBase . "template/pagseguro", $appFrontendDefault . "pagseguro", $localePT . "PagSeguro_PagSeguro.csv", $localePT . "template/email/sales/pagseguro_abandoned.html", $localeEN . "template/email/sales/pagseguro_abandoned.html", $skinAdminDefault . "pagseguro", $skinBaseDefault . "js/onepagecheckoutpagseguro.js", $skinBaseDefault . "js/pagseguro.js"); foreach ($array as $item) { Remove::deleteItem($item, true); } if ($_SESSION['fail']) { $fail = $_SESSION['fail']; echo "<p><strong>Não foi possível remover o módulo por completo.</strong></p>"; echo "<p><font color='red'>"; echo "É necessário alterar a permissão dos itens abaixo:</font></p>"; echo "<p>" . $_SESSION['path'] . "<br /><strong>Exemplo:</strong></p><p>" . $_SESSION['chmod'] . "</p>"; echo "<p><font color='red'>Após alterar as permissões, tente novamente.</font></p>"; $_SESSION['fail'] = null; $_SESSION['path'] = null; $_SESSION['chmod'] = null; } else { if ($_SESSION['success']) { echo "<p><strong>Módulo removido com sucesso!</strong></p>"; } else { echo "<p><strong>O módulo já foi removido.</strong></p>"; } } if ($_SESSION['success']) { echo "<p><strong>Itens removidos:</strong></p><p>" . $_SESSION['success'] . "</p>"; $_SESSION['success'] = null; } if ($fail) { echo "<p><strong>Itens não removidos (restrição de permissão):</strong></p>"; echo "<p>" . $fail . "</p>"; } }