BUG 6843 - Noew the date is stored in the log
This commit is contained in:
committed by
Erik Amaru Ortiz
parent
93d9f365f5
commit
29dc5beced
@@ -18,7 +18,7 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
$vVar = stripslashes($vVar);
|
$vVar = stripslashes($vVar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ini_get('magic_quotes_gpc') == '1') {
|
if (ini_get('magic_quotes_gpc') == '1') {
|
||||||
strip_slashes($_POST);
|
strip_slashes($_POST);
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,7 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
$endTime = array_sum(explode(' ',microtime()));
|
$endTime = array_sum(explode(' ',microtime()));
|
||||||
$time = $endTime - $startingTime;
|
$time = $endTime - $startingTime;
|
||||||
$fpt= fopen ( PATH_DATA . 'log/time.log', 'a' );
|
$fpt= fopen ( PATH_DATA . 'log/time.log', 'a' );
|
||||||
fwrite( $fpt, sprintf ( "%s.%03d %15s %s %5.3f %s\n", date('H:i:s'), $time, getenv('REMOTE_ADDR'), substr($serverAddr,-4), $time, $_SERVER['REQUEST_URI'] ));
|
fwrite( $fpt, sprintf ( "%s.%03d %15s %s %5.3f %s\n", date('Y-m-d H:i:s'), $time, getenv('REMOTE_ADDR'), substr($serverAddr,-4), $time, $_SERVER['REQUEST_URI'] ));
|
||||||
fclose( $fpt);
|
fclose( $fpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,8 +128,8 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
|
|
||||||
$virtualURITable['/[a-zA-Z][a-zA-Z0-9]{0,}()'] = 'sysUnnamed';
|
$virtualURITable['/[a-zA-Z][a-zA-Z0-9]{0,}()'] = 'sysUnnamed';
|
||||||
$virtualURITable['/(*)'] = PATH_HTML;
|
$virtualURITable['/(*)'] = PATH_HTML;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//****** verify if we need to redirect or stream the file, if G:VirtualURI returns true means we are going to redirect the page *****
|
//****** verify if we need to redirect or stream the file, if G:VirtualURI returns true means we are going to redirect the page *****
|
||||||
if ( G::virtualURI($_SERVER['REQUEST_URI'], $virtualURITable , $realPath )) {
|
if ( G::virtualURI($_SERVER['REQUEST_URI'], $virtualURITable , $realPath )) {
|
||||||
@@ -164,12 +164,12 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
}
|
}
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$requestUriArray=explode("/",$_SERVER['REQUEST_URI']);
|
$requestUriArray=explode("/",$_SERVER['REQUEST_URI']);
|
||||||
|
|
||||||
|
|
||||||
if((isset($requestUriArray[1]))&&($requestUriArray[1]=='skin')) {
|
if((isset($requestUriArray[1]))&&($requestUriArray[1]=='skin')) {
|
||||||
/*
|
/*
|
||||||
* By JHL Feb 28, 11
|
* By JHL Feb 28, 11
|
||||||
@@ -187,17 +187,17 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
|
|
||||||
//Get that path in array
|
//Get that path in array
|
||||||
$paths = explode ( PATH_SEP, $forQuery[0] );
|
$paths = explode ( PATH_SEP, $forQuery[0] );
|
||||||
|
|
||||||
$fileToBeStreamed=str_replace("/skin/",PATH_CUSTOM_SKINS,$_SERVER['REQUEST_URI']);
|
$fileToBeStreamed=str_replace("/skin/",PATH_CUSTOM_SKINS,$_SERVER['REQUEST_URI']);
|
||||||
|
|
||||||
if ( file_exists ( $fileToBeStreamed ) ) {
|
if ( file_exists ( $fileToBeStreamed ) ) {
|
||||||
G::streamFile ( $fileToBeStreamed );
|
G::streamFile ( $fileToBeStreamed );
|
||||||
}
|
}
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch ( $realPath ) {
|
switch ( $realPath ) {
|
||||||
case 'sysUnnamed' :
|
case 'sysUnnamed' :
|
||||||
require_once('sysUnnamed.php'); die;
|
require_once('sysUnnamed.php'); die;
|
||||||
@@ -226,7 +226,7 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
}
|
}
|
||||||
|
|
||||||
//************** the request correspond to valid php page, now parse the URI **************
|
//************** the request correspond to valid php page, now parse the URI **************
|
||||||
|
|
||||||
G::parseURI ( getenv( "REQUEST_URI" ) );
|
G::parseURI ( getenv( "REQUEST_URI" ) );
|
||||||
$oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . "widgets/jscalendar/lang/calendar-" . SYS_LANG . ".js");
|
$oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . "widgets/jscalendar/lang/calendar-" . SYS_LANG . ".js");
|
||||||
define( 'SYS_URI' , '/sys' . SYS_TEMP . '/' . SYS_LANG . '/' . SYS_SKIN . '/' );
|
define( 'SYS_URI' , '/sys' . SYS_TEMP . '/' . SYS_LANG . '/' . SYS_SKIN . '/' );
|
||||||
@@ -295,8 +295,8 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
if ( file_exists( PATH_DB . SYS_TEMP . '/db.php' ) ) {
|
if ( file_exists( PATH_DB . SYS_TEMP . '/db.php' ) ) {
|
||||||
require_once( PATH_DB . SYS_TEMP . '/db.php' );
|
require_once( PATH_DB . SYS_TEMP . '/db.php' );
|
||||||
define ( 'SYS_SYS' , SYS_TEMP );
|
define ( 'SYS_SYS' , SYS_TEMP );
|
||||||
|
|
||||||
// defining constant for workspace shared directory
|
// defining constant for workspace shared directory
|
||||||
define ( 'PATH_WORKSPACE' , PATH_DB . SYS_SYS . PATH_SEP );
|
define ( 'PATH_WORKSPACE' , PATH_DB . SYS_SYS . PATH_SEP );
|
||||||
// including workspace shared classes -> particularlly for pmTables
|
// including workspace shared classes -> particularlly for pmTables
|
||||||
set_include_path(get_include_path() . PATH_SEPARATOR . PATH_WORKSPACE);
|
set_include_path(get_include_path() . PATH_SEPARATOR . PATH_WORKSPACE);
|
||||||
@@ -434,10 +434,10 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
//********* Setup plugins *************
|
//********* Setup plugins *************
|
||||||
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins
|
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins
|
||||||
$avoidChangedWorkspaceValidation = false;
|
$avoidChangedWorkspaceValidation = false;
|
||||||
|
|
||||||
//Load custom Classes and Model from Plugins.
|
//Load custom Classes and Model from Plugins.
|
||||||
G::LoadAllPluginModelClasses();
|
G::LoadAllPluginModelClasses();
|
||||||
|
|
||||||
//*********jump to php file in methods directory *************
|
//*********jump to php file in methods directory *************
|
||||||
$collectionPlugin = '';
|
$collectionPlugin = '';
|
||||||
if ( $oPluginRegistry->isRegisteredFolder( SYS_COLLECTION ) ) {
|
if ( $oPluginRegistry->isRegisteredFolder( SYS_COLLECTION ) ) {
|
||||||
@@ -467,8 +467,8 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
$phpFile = str_replace ( '.php', 'index.php', $phpFile );
|
$phpFile = str_replace ( '.php', 'index.php', $phpFile );
|
||||||
$phpFile = include ( $phpFile );
|
$phpFile = include ( $phpFile );
|
||||||
}*/
|
}*/
|
||||||
$bWE = false;
|
$bWE = false;
|
||||||
$isControllerCall = false;
|
$isControllerCall = false;
|
||||||
if ( substr(SYS_COLLECTION , 0,8) === 'gulliver' ) {
|
if ( substr(SYS_COLLECTION , 0,8) === 'gulliver' ) {
|
||||||
$phpFile = PATH_GULLIVER_HOME . 'methods/' . substr( SYS_COLLECTION , 8) . SYS_TARGET.'.php';
|
$phpFile = PATH_GULLIVER_HOME . 'methods/' . substr( SYS_COLLECTION , 8) . SYS_TARGET.'.php';
|
||||||
}
|
}
|
||||||
@@ -493,7 +493,7 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
$bWE = true;
|
$bWE = true;
|
||||||
//$phpFile = PATH_DATA_SITE . 'public' . PATH_SEP . SYS_COLLECTION . PATH_SEP . $auxPart[ count($auxPart)-1];
|
//$phpFile = PATH_DATA_SITE . 'public' . PATH_SEP . SYS_COLLECTION . PATH_SEP . $auxPart[ count($auxPart)-1];
|
||||||
}
|
}
|
||||||
|
|
||||||
//erik: verify if it is a Controller Class or httpProxyController Class
|
//erik: verify if it is a Controller Class or httpProxyController Class
|
||||||
if( is_file(PATH_CONTROLLERS . SYS_COLLECTION . '.php') ) {
|
if( is_file(PATH_CONTROLLERS . SYS_COLLECTION . '.php') ) {
|
||||||
require_once PATH_CONTROLLERS . SYS_COLLECTION . '.php';
|
require_once PATH_CONTROLLERS . SYS_COLLECTION . '.php';
|
||||||
@@ -505,7 +505,7 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
$isControllerCall = true;
|
$isControllerCall = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $isControllerCall && ! file_exists( $phpFile ) ) {
|
if ( ! $isControllerCall && ! file_exists( $phpFile ) ) {
|
||||||
$_SESSION['phpFileNotFound'] = $_SERVER['REQUEST_URI'];
|
$_SESSION['phpFileNotFound'] = $_SERVER['REQUEST_URI'];
|
||||||
print $phpFile;
|
print $phpFile;
|
||||||
@@ -513,7 +513,7 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//redirect to login, if user changed the workspace in the URL
|
//redirect to login, if user changed the workspace in the URL
|
||||||
if( ! $avoidChangedWorkspaceValidation && isset( $_SESSION['WORKSPACE'] ) && $_SESSION['WORKSPACE'] != SYS_SYS) {
|
if( ! $avoidChangedWorkspaceValidation && isset( $_SESSION['WORKSPACE'] ) && $_SESSION['WORKSPACE'] != SYS_SYS) {
|
||||||
$_SESSION['WORKSPACE'] = SYS_SYS;
|
$_SESSION['WORKSPACE'] = SYS_SYS;
|
||||||
@@ -536,7 +536,7 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
|
|
||||||
//get the language direction from ServerConf
|
//get the language direction from ServerConf
|
||||||
define('SYS_LANG_DIRECTION', $oServerConf->getLanDirection() );
|
define('SYS_LANG_DIRECTION', $oServerConf->getLanDirection() );
|
||||||
|
|
||||||
if((isset( $_SESSION['USER_LOGGED'] ))&&(!(isset($_GET['sid'])))) {
|
if((isset( $_SESSION['USER_LOGGED'] ))&&(!(isset($_GET['sid'])))) {
|
||||||
$RBAC->initRBAC();
|
$RBAC->initRBAC();
|
||||||
$RBAC->loadUserRolePermission( $RBAC->sSystem, $_SESSION['USER_LOGGED'] , PATH_DATA, session_id());
|
$RBAC->loadUserRolePermission( $RBAC->sSystem, $_SESSION['USER_LOGGED'] , PATH_DATA, session_id());
|
||||||
@@ -581,7 +581,7 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$_SESSION['phpLastFileFound'] = $_SERVER['REQUEST_URI'];
|
$_SESSION['phpLastFileFound'] = $_SERVER['REQUEST_URI'];
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* New feature for Gulliver framework to support Controllers & HttpProxyController classes handling
|
* New feature for Gulliver framework to support Controllers & HttpProxyController classes handling
|
||||||
*
|
*
|
||||||
@@ -593,7 +593,7 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
$controller->call($controllerAction);
|
$controller->call($controllerAction);
|
||||||
} else
|
} else
|
||||||
require_once( $phpFile );
|
require_once( $phpFile );
|
||||||
|
|
||||||
if ( defined('SKIP_HEADERS') ) {
|
if ( defined('SKIP_HEADERS') ) {
|
||||||
header("Expires: " . gmdate("D, d M Y H:i:s", mktime( 0,0,0,date('m'),date('d'),date('Y') + 1) ) . " GMT");
|
header("Expires: " . gmdate("D, d M Y H:i:s", mktime( 0,0,0,date('m'),date('d'),date('Y') + 1) ) . " GMT");
|
||||||
header('Cache-Control: public');
|
header('Cache-Control: public');
|
||||||
|
|||||||
Reference in New Issue
Block a user