Exemplo n.º 1
0
 public function preDispatch()
 {
     //        if ('development' === APPLICATION_ENV) { //@todo remove in release
     //            return;
     //        }
     if (Axis_Application::isInstalled() && !isset($this->_session->permit_installation)) {
         if (!headers_sent()) {
             $host = $_SERVER['HTTP_HOST'];
             $uri = rtrim(dirname(str_replace('/install', '', $_SERVER['PHP_SELF'])), '/\\');
             $uri = str_replace('/index.php', '', $uri);
             header("Location: http://{$host}{$uri}/");
         }
         exit;
     }
 }
Exemplo n.º 2
0
 * Axis is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Axis.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @category    Axis
 * @package     Axis_Install
 * @copyright   Copyright 2008-2011 Axis
 * @license     GNU Public License V3.0
 */
define('AXIS_ROOT', realpath('../'));
set_include_path(realpath('../app/code') . PATH_SEPARATOR . realpath('../library') . PATH_SEPARATOR . AXIS_ROOT . '/install' . PATH_SEPARATOR . get_include_path());
@(include_once 'Zend/Loader/Autoloader.php');
if (!class_exists('Zend_Loader')) {
    echo 'Please, copy Zend Framework to the "library" folder: ' . realpath('../library');
    exit;
}
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->setFallbackAutoloader(true);
defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production');
$displayErrors = (int) (APPLICATION_ENV === 'development');
$bootstrapConfig = array('bootstrap' => array('path' => AXIS_ROOT . '/library/Axis/Bootstrap/Install.php', 'class' => 'Axis_Bootstrap_Install'), 'phpSettings' => array('display_startup_errors' => $displayErrors, 'display_errors' => $displayErrors));
$application = new Axis_Application(APPLICATION_ENV, $bootstrapConfig);
$application->bootstrap(array('Application', 'Area', 'Session', 'Cache', 'Locale', 'Layout'));
if (is_readable(AXIS_ROOT . '/app/etc/config.php')) {
    $application->bootstrap('DbAdapter');
}
$application->bootstrap(array('FrontController'));
Exemplo n.º 3
0
 *
 * You should have received a copy of the GNU General Public License
 * along with Axis.  If not, see <http://www.gnu.org/licenses/>.
 * Index file
 *
 * @category    Axis
 * @package     Axis_Core
 * @copyright   Copyright 2008-2011 Axis
 * @license     GNU Public License V3.0
 */
define('AXIS_ROOT', realpath(dirname(__FILE__)));
if (!file_exists('./app/etc/config.php')) {
    if (!headers_sent()) {
        $host = $_SERVER['HTTP_HOST'];
        $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
        $extra = 'install';
        header("Location: http://{$host}{$uri}/{$extra}/");
    }
    exit;
}
set_include_path(realpath('library') . PATH_SEPARATOR . realpath('app/code') . PATH_SEPARATOR . get_include_path());
@(include_once 'Axis/Application.php');
if (!class_exists('Zend_Application')) {
    echo 'Please, copy Zend Framework to the "library" folder: ' . realpath('library');
    exit;
}
defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production');
$displayErrors = (int) (APPLICATION_ENV === 'development');
$bootstrapConfig = array('bootstrap' => array('path' => 'Axis/Bootstrap.php', 'class' => 'Axis_Bootstrap'), 'phpSettings' => array('display_startup_errors' => $displayErrors, 'display_errors' => $displayErrors));
$application = new Axis_Application(APPLICATION_ENV, $bootstrapConfig);
$application->bootstrap()->run();