Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /** * Vladimir Fishchenko extension * * NOTICE OF LICENSE * * This source file ..

Decoded Output download

<?php
/**
 * Vladimir Fishchenko extension
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * 
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade
 * the VF EasyAjax module to newer versions in the future.
 * If you wish to customize the VF EasyAjax module for your needs
 * please refer to http://www.magentocommerce.com for more information.
 *
 * @category   VF
 * @package    VF_EasyAjax
 * @copyright  Copyright (C) 2012 Vladimir Fishchenko (http://fishchenko.com/)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

/**
 * EasyAjax Event Observer
 *
 * @category   VF
 * @package    VF_EasyAjax
 * @subpackage Model
 * @author     Vladimir Fishchenko <[email protected]>
 */
class VF_EasyAjax_Model_Observer
{
    /**
     * Add Json to response instead of default data
     *
     * @param Varien_Event_Observer $observer
     */
    public function getJson(Varien_Event_Observer $observer)
    {
        $core = Mage::getSingleton('easyAjax/core');
        if ($core->isEasyAjax() && !$core->isProceed()) {
            $core->setProceed();
            /** @var $messages VF_EasyAjax_Model_Message_Storage */
            $messages = Mage::getSingleton('easyAjax/message_storage');
            /** @var $response VF_EasyAjax_Model_Response */
            $response = Mage::getModel('easyAjax/response');
            $response->setMessages($messages->getMessages());
            $response->loadContent(
                (array) Mage::app()->getRequest()->getParam('action_content', array()),
                (array) Mage::app()->getRequest()->getParam('custom_content', array())
            );

            //check transport object
            if ($transport = $observer->getEvent()->getTransport()) {
                if ($transport->getUrl()) {
                    $response->setRedirect($transport->getUrl());
                    if ($transport->getCode()) {
                        $response->setRedirectCode($transport->getCode());
                    }
                }
            }

            $response->sendResponse();
        }
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * Vladimir Fishchenko extension
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * 
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade
 * the VF EasyAjax module to newer versions in the future.
 * If you wish to customize the VF EasyAjax module for your needs
 * please refer to http://www.magentocommerce.com for more information.
 *
 * @category   VF
 * @package    VF_EasyAjax
 * @copyright  Copyright (C) 2012 Vladimir Fishchenko (http://fishchenko.com/)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

/**
 * EasyAjax Event Observer
 *
 * @category   VF
 * @package    VF_EasyAjax
 * @subpackage Model
 * @author     Vladimir Fishchenko <[email protected]>
 */
class VF_EasyAjax_Model_Observer
{
    /**
     * Add Json to response instead of default data
     *
     * @param Varien_Event_Observer $observer
     */
    public function getJson(Varien_Event_Observer $observer)
    {
        $core = Mage::getSingleton('easyAjax/core');
        if ($core->isEasyAjax() && !$core->isProceed()) {
            $core->setProceed();
            /** @var $messages VF_EasyAjax_Model_Message_Storage */
            $messages = Mage::getSingleton('easyAjax/message_storage');
            /** @var $response VF_EasyAjax_Model_Response */
            $response = Mage::getModel('easyAjax/response');
            $response->setMessages($messages->getMessages());
            $response->loadContent(
                (array) Mage::app()->getRequest()->getParam('action_content', array()),
                (array) Mage::app()->getRequest()->getParam('custom_content', array())
            );

            //check transport object
            if ($transport = $observer->getEvent()->getTransport()) {
                if ($transport->getUrl()) {
                    $response->setRedirect($transport->getUrl());
                    if ($transport->getCode()) {
                        $response->setRedirectCode($transport->getCode());
                    }
                }
            }

            $response->sendResponse();
        }
    }
}

Function Calls

None

Variables

None

Stats

MD5 b019f4af42f70cde1ee904449bcaa959
Eval Count 0
Decode Time 106 ms