/**
  * Handle the incoming request using the command resolver
  *
  * @access	protected
  * @return	void
  */
 protected function handleRequest()
 {
     $cmd_r = new ipsController_CommandResolver();
     self::$cmd = $cmd_r->getCommand($this->registry);
     IPSDebug::setMemoryDebugFlag("Everything up until execute call", 0);
     self::$cmd->execute($this->registry);
 }
示例#2
0
 /**
  * Handle the incoming request using the command resolver
  *
  * @access	protected
  * @return	@e void
  */
 protected function handleRequest()
 {
     $cmd_r = new ipsController_CommandResolver();
     try {
         self::$cmd = $cmd_r->getCommand($this->registry);
     } catch (Exception $e) {
         $msg = $e->getMessage();
         /* An error occured, so throw a 404 */
         try {
             /* The following patch prevents links such as /admin/index.php?adsess=123&app=anyrandomnamehere&module=login&do=login-complete from loading 
             			an ACP error screen complete with wrapper, which may expose the applications that are installed to an end user.
             			This issue was reported by Christopher Truncer via the IPS ticket system. */
             if (IN_ACP and !$this->registry->member()->getProperty('member_id')) {
                 $this->registry->getClass('output')->silentRedirect(ipsRegistry::$settings['base_url']);
             }
             $this->registry->getClass('output')->showError('incorrect_furl', 404, null, null, 404);
         } catch (Exception $e) {
             print $msg;
             exit;
         }
     }
     IPSDebug::setMemoryDebugFlag("Everything up until execute call", 0);
     self::$cmd->execute($this->registry);
 }
示例#3
0
<?php

/**
 * <pre>
 * Invision Power Services
 * IP.Board v3.4.6
 * Main public executable wrapper.
 * Set-up and load module to run
 * Last Updated: $Date: 2013-02-26 08:08:06 -0500 (Tue, 26 Feb 2013) $
 * </pre>
 *
 * @author 		$Author: mark $
 * @copyright	(c) 2001 - 2009 Invision Power Services, Inc.
 * @license		http://www.invisionpower.com/company/standards.php#license
 * @package		IP.Board
 * @link		http://www.invisionpower.com
 * @version		$Rev: 12025 $
 *
 */
define('IPB_THIS_SCRIPT', 'public');
require_once './initdata.php';
/*noLibHook*/
require_once IPS_ROOT_PATH . 'sources/base/ipsRegistry.php';
/*noLibHook*/
require_once IPS_ROOT_PATH . 'sources/base/ipsController.php';
/*noLibHook*/
ipsController::run();
exit;
示例#4
0
 /**
  * Check for previous sessions.
  * Checks to see if there's an unfinished upgrade.
  *
  * @param	array
  * @access	public
  */
 public static function restorePreviousSession($session)
 {
     /* Delete all previous sessions */
     ipsRegistry::DB()->delete('upgrade_sessions', 'session_id != \'' . ipsRegistry::$request['s'] . '\'');
     /* Update the session */
     ipsRegistry::DB()->update('upgrade_sessions', array('session_current_time' => time(), 'session_section' => $session['session_section'], 'session_post' => serialize($session['_session_post']), 'session_get' => serialize($session['_session_get'])), 'session_id=\'' . ipsRegistry::$request['s'] . '\'');
     /* Set correct app */
     $_GET['app'] = 'upgrade';
     $_POST['app'] = 'upgrade';
     ipsRegistry::$request['app'] = 'upgrade';
     ipsRegistry::$current_section = 'upgrade';
     /* Set correct section */
     $_GET['section'] = $session['_session_get']['section'];
     $_POST['section'] = $session['_session_get']['section'];
     ipsRegistry::$request['section'] = $session['_session_get']['section'];
     ipsRegistry::$current_section = $session['_session_get']['section'];
     /* Set up the correct do */
     $_GET['do'] = $session['_session_get']['do'];
     $_POST['do'] = $session['_session_get']['do'];
     ipsRegistry::$request['do'] = $session['_session_get']['do'];
     /* Set up the correct previous */
     $_GET['previous'] = $session['_session_get']['previous'];
     $_POST['previous'] = $session['_session_get']['previous'];
     ipsRegistry::$request['previous'] = $session['_session_get']['previous'];
     /* Set up SD */
     $_POST['_sd'] = $session['_sd'];
     ipsRegistry::$request['_sd'] = $session['_sd'];
     /* App dir, etc */
     ipsRegistry::$request['appdir'] = $session['_sd']['appdir'];
     ipsRegistry::$request['man'] = $session['_sd']['man'];
     ipsRegistry::$request['helpfile'] = $session['_sd']['helpfile'];
     $apps = explode(',', $session['_sd']['install_apps']);
     $toSave = array();
     $vNums = array();
     /* set saved data */
     if (count($session['_sd'])) {
         foreach ($session['_sd'] as $k => $v) {
             if ($k) {
                 IPSSetUp::setSavedData($k, $v);
             }
         }
     }
     if (is_array($apps) and count($apps)) {
         /* Grab data */
         foreach ($apps as $app) {
             /* Grab version numbers */
             $numbers = IPSSetUp::fetchAppVersionNumbers($app);
             /* Grab all numbers */
             $nums[$app] = IPSSetUp::fetchXmlAppVersions($app);
             /* Grab app data */
             $appData[$app] = IPSSetUp::fetchXmlAppInformation($app);
             $appClasses[$app] = IPSSetUp::fetchVersionClasses($app, $numbers['current'][0], $numbers['latest'][0]);
             /* Store starting vnums */
             $vNums[$app] = $numbers['current'][0];
         }
         /* Got anything? */
         if (count($appClasses)) {
             foreach ($appClasses as $app => $data) {
                 foreach ($data as $num) {
                     if (is_file(IPSLib::getAppDir($app) . '/setup/versions/upg_' . $num . '/version_class.php')) {
                         $_class = 'version_class_' . $app . '_' . $num;
                         require_once IPSLib::getAppDir($app) . '/setup/versions/upg_' . $num . '/version_class.php';
                         /*noLibHook*/
                         $_tmp = new $_class(ipsRegistry::instance());
                         if (method_exists($_tmp, 'preInstallOptionsSave')) {
                             $_t = $_tmp->preInstallOptionsSave();
                             if (is_array($_t) and count($_t)) {
                                 $toSave[$app][$num] = $_t;
                             }
                         }
                     }
                 }
             }
             /* Save it */
             if (count($toSave)) {
                 IPSSetUp::setSavedData('custom_options', $toSave);
             }
             if (count($vNums)) {
                 IPSSetUp::setSavedData('version_numbers', $vNums);
             }
         }
         /* Freeze data */
         IPSSetUp::freezeSavedData();
         /* Thaw it */
         IPSSetUp::thawSavedData();
     }
     /* Re run our controller */
     ipsController::run();
 }
 /**
  * Handle the incoming request using the command resolver
  *
  * @access	protected
  * @return	@e void
  */
 protected function handleRequest()
 {
     $cmd_r = new ipsController_CommandResolver();
     self::$cmd = $cmd_r->getCommand($this->registry);
     self::$cmd->execute($this->registry);
 }