SPEEDY fix some issues in autoloader and login page

This commit is contained in:
Fernando Ontiveros
2012-11-13 15:09:16 -04:00
parent 5113ac34d3
commit 1ffb33c427
2 changed files with 14 additions and 23 deletions

View File

@@ -48,11 +48,11 @@ if (!isset($_SESSION['FAILED_LOGINS'])) {
$sFailedLogins = $_SESSION['FAILED_LOGINS']; $sFailedLogins = $_SESSION['FAILED_LOGINS'];
require_once 'classes/model/LoginLog.php';
$aFields['LOGIN_VERIFY_MSG'] = G::loadTranslation('LOGIN_VERIFY_MSG'); $aFields['LOGIN_VERIFY_MSG'] = G::loadTranslation('LOGIN_VERIFY_MSG');
//$aFields['LOGIN_VERIFY_MSG'] = Bootstrap::loadTranslation('LOGIN_VERIFY_MSG');
if (isset ($_SESSION['USER_LOGGED'])) { if (isset ($_SESSION['USER_LOGGED'])) {
require_once 'classes/model/LoginLog.php';
//close the session, if the current session_id was used in PM. //close the session, if the current session_id was used in PM.
$oCriteria = new Criteria('workflow'); $oCriteria = new Criteria('workflow');
@@ -143,6 +143,7 @@ global $_DBArray;
$_DBArray ['langOptions'] = $availableLangArray; $_DBArray ['langOptions'] = $availableLangArray;
G::LoadClass('configuration'); G::LoadClass('configuration');
//BootStrap::LoadClass('configuration');
$oConf = new Configurations(); $oConf = new Configurations();
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', ''); $oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
@@ -153,7 +154,7 @@ $aFields['USER_LANG'] = isset($oConf->aConfig['login_defaultLanguage'])
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI . 'login/authentication.php'); $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI . 'login/authentication.php');
G::LoadClass('serverConfiguration'); G::LoadClass('serverConfiguration');
//Bootstrap::LoadClass('serverConfiguration');
//get the serverconf singleton, and check if we can send the heartbeat //get the serverconf singleton, and check if we can send the heartbeat
$oServerConf = & serverConf::getSingleton(); $oServerConf = & serverConf::getSingleton();
@@ -192,12 +193,7 @@ if ($flagGettingStarted == 0) {
$dummy = ''; $dummy = '';
G::loadClass('configuration');
$oConf = new Configurations();
$oConf->loadConfig($dummy, 'ENVIRONMENT_SETTINGS', ''); $oConf->loadConfig($dummy, 'ENVIRONMENT_SETTINGS', '');
$flagForgotPassword = isset($oConf->aConfig['login_enableForgotPassword']) $flagForgotPassword = isset($oConf->aConfig['login_enableForgotPassword'])
? $oConf->aConfig['login_enableForgotPassword'] ? $oConf->aConfig['login_enableForgotPassword']
: 'off'; : 'off';

View File

@@ -300,14 +300,6 @@ if (Bootstrap::virtualURI( $_SERVER['REQUEST_URI'], $virtualURITable, $realPath
die(); die();
} }
switch ($realPath) { switch ($realPath) {
/*case 'sysUnnamed':
require_once ('sysUnnamed.php');
die();
break;
case 'sysNamed':
header( 'location : ' . $_SERVER['REQUEST_URI'] . '/' . SYS_LANG . '/classic/login/login' );
die();
break;*/
case 'jsMethod': case 'jsMethod':
Bootstrap::parseURI( getenv( "REQUEST_URI" ) ); Bootstrap::parseURI( getenv( "REQUEST_URI" ) );
$filename = PATH_METHODS . SYS_COLLECTION . '/' . SYS_TARGET . '.js'; $filename = PATH_METHODS . SYS_COLLECTION . '/' . SYS_TARGET . '.js';
@@ -402,6 +394,11 @@ Bootstrap::registerClass('HttpProxyController', PATH_GULLIVER . "class.httpProxy
Bootstrap::registerClass('templatePower', PATH_GULLIVER . "class.templatePower.php"); Bootstrap::registerClass('templatePower', PATH_GULLIVER . "class.templatePower.php");
Bootstrap::registerClass('XmlForm_Field_SimpleText', PATH_GULLIVER . "class.xmlformExtension.php"); Bootstrap::registerClass('XmlForm_Field_SimpleText', PATH_GULLIVER . "class.xmlformExtension.php");
Bootstrap::registerClass('System', PATH_HOME . "engine/classes/class.system.php"); Bootstrap::registerClass('System', PATH_HOME . "engine/classes/class.system.php");
Bootstrap::registerClass('Propel', PATH_THIRDPARTY . "propel/Propel.php");
Bootstrap::registerClass('Creole', PATH_THIRDPARTY . "creole/Creole.php");
//Bootstrap::registerClass('LoginLog', PATH_HOME . "engine/classes/model/LoginLog.php");
//Bootstrap::registerClass('LoginLogPeer', PATH_HOME . "engine/classes/model/LoginLogPeer.php");
//Bootstrap::LoadSystem( 'pmException' ); //Bootstrap::LoadSystem( 'pmException' );
@@ -551,8 +548,9 @@ if (file_exists( $sSerializedFile )) {
} }
// setup propel definitions and logging // setup propel definitions and logging
require_once ("propel/Propel.php"); //changed to autoloader
require_once ("creole/Creole.php"); //require_once ("propel/Propel.php");
//require_once ("creole/Creole.php");
if (defined( 'DEBUG_SQL_LOG' ) && DEBUG_SQL_LOG) { if (defined( 'DEBUG_SQL_LOG' ) && DEBUG_SQL_LOG) {
define( 'PM_PID', mt_rand( 1, 999999 ) ); define( 'PM_PID', mt_rand( 1, 999999 ) );
@@ -678,12 +676,10 @@ if (substr( SYS_COLLECTION, 0, 8 ) === 'gulliver') {
//if the method name is empty set default to index method //if the method name is empty set default to index method
$controllerAction = SYS_TARGET != '' ? SYS_TARGET : 'index'; $controllerAction = SYS_TARGET != '' ? SYS_TARGET : 'index';
//if the method exists //if the method exists
if (is_callable( Array ($controllerClass,$controllerAction if (is_callable( Array ($controllerClass,$controllerAction ) )) {
) )) {
$isControllerCall = true; $isControllerCall = true;
} }
} }
if (! $isControllerCall && ! file_exists( $phpFile ) && ! $isRestRequest) { if (! $isControllerCall && ! file_exists( $phpFile ) && ! $isRestRequest) {
$_SESSION['phpFileNotFound'] = $_SERVER['REQUEST_URI']; $_SESSION['phpFileNotFound'] = $_SERVER['REQUEST_URI'];
header( "location: /errors/error404.php?url=" . urlencode( $_SERVER['REQUEST_URI'] ) ); header( "location: /errors/error404.php?url=" . urlencode( $_SERVER['REQUEST_URI'] ) );
@@ -752,7 +748,6 @@ if (! defined( 'EXECUTE_BY_CRON' )) {
// This sentence is used when you lost the Session // This sentence is used when you lost the Session
if (! in_array( SYS_TARGET, $noLoginFiles ) && ! in_array( SYS_COLLECTION, $noLoginFolders ) && $bWE != true && $collectionPlugin != 'services' && ! $isRestRequest) { if (! in_array( SYS_TARGET, $noLoginFiles ) && ! in_array( SYS_COLLECTION, $noLoginFolders ) && $bWE != true && $collectionPlugin != 'services' && ! $isRestRequest) {
$bRedirect = true; $bRedirect = true;
if (isset( $_GET['sid'] )) { if (isset( $_GET['sid'] )) {
Bootstrap::LoadClass( 'sessions' ); Bootstrap::LoadClass( 'sessions' );
$oSessions = new Sessions(); $oSessions = new Sessions();