Add fix for skin feature process.
This commit is contained in:
@@ -292,33 +292,30 @@ class Bootstrap
|
|||||||
* = local path
|
* = local path
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function virtualURI($url, $convertionTable, &$realPath) {
|
public function virtualURI ($url, $convertionTable, &$realPath)
|
||||||
foreach ( $convertionTable as $urlPattern => $localPath ) {
|
{
|
||||||
// $urlPattern = addcslashes( $urlPattern , '/');
|
foreach ($convertionTable as $urlPattern => $localPath) {
|
||||||
$urlPattern = addcslashes ( $urlPattern, './' );
|
// $urlPattern = addcslashes( $urlPattern , '/');
|
||||||
$urlPattern = '/^' . str_replace ( array (
|
$urlPattern = addcslashes( $urlPattern, './' );
|
||||||
'*',
|
$urlPattern = '/^' . str_replace( array ('*','?'
|
||||||
'?'
|
), array ('.*','.?'
|
||||||
), array (
|
), $urlPattern ) . '$/';
|
||||||
'.*',
|
if (preg_match( $urlPattern, $url, $match )) {
|
||||||
'.?'
|
if ($localPath === false) {
|
||||||
), $urlPattern ) . '$/';
|
$realPath = $url;
|
||||||
if (preg_match ( $urlPattern, $url, $match )) {
|
return false;
|
||||||
if ($localPath === false) {
|
}
|
||||||
$realPath = $url;
|
if ($localPath != 'jsMethod') {
|
||||||
return false;
|
$realPath = $localPath . $match[1];
|
||||||
}
|
} else {
|
||||||
if ($localPath != 'jsMethod') {
|
$realPath = $localPath;
|
||||||
$realPath = $localPath . $match [1];
|
}
|
||||||
} else {
|
return true;
|
||||||
$realPath = $localPath;
|
}
|
||||||
}
|
}
|
||||||
return true;
|
$realPath = $url;
|
||||||
}
|
return false;
|
||||||
}
|
}
|
||||||
$realPath = $url;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* streaming a file
|
* streaming a file
|
||||||
@@ -469,9 +466,9 @@ class Bootstrap
|
|||||||
* return true if the file exists, otherwise false.
|
* return true if the file exists, otherwise false.
|
||||||
*/
|
*/
|
||||||
public function isPMUnderUpdating($setFlag = 2) {
|
public function isPMUnderUpdating($setFlag = 2) {
|
||||||
if (!defined('PATH_DATA')) {
|
if (!defined('PATH_DATA')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fileCheck = PATH_DATA . "UPDATE.dat";
|
$fileCheck = PATH_DATA . "UPDATE.dat";
|
||||||
if ($setFlag == 0) {
|
if ($setFlag == 0) {
|
||||||
|
|||||||
@@ -286,6 +286,7 @@ $virtualURITable['/rest/(*)'] = 'rest-service';
|
|||||||
$virtualURITable['/update/(*)'] = PATH_GULLIVER_HOME . 'methods/update/';
|
$virtualURITable['/update/(*)'] = PATH_GULLIVER_HOME . 'methods/update/';
|
||||||
//$virtualURITable['/(*)'] = PATH_HTML;
|
//$virtualURITable['/(*)'] = PATH_HTML;
|
||||||
$virtualURITable['/css/(*)'] = PATH_HTML . 'css/'; //ugly
|
$virtualURITable['/css/(*)'] = PATH_HTML . 'css/'; //ugly
|
||||||
|
$virtualURITable['/skin/(*)'] = PATH_HTML;
|
||||||
$virtualURITable['/[a-zA-Z][a-zA-Z0-9]{0,}/'] = 'errorFile';
|
$virtualURITable['/[a-zA-Z][a-zA-Z0-9]{0,}/'] = 'errorFile';
|
||||||
|
|
||||||
$isRestRequest = false;
|
$isRestRequest = false;
|
||||||
@@ -365,6 +366,13 @@ if (Bootstrap::virtualURI( $_SERVER['REQUEST_URI'], $virtualURITable, $realPath
|
|||||||
}
|
}
|
||||||
} //virtual URI parser
|
} //virtual URI parser
|
||||||
|
|
||||||
|
// Call Gulliver Classes
|
||||||
|
Bootstrap::LoadThirdParty( 'smarty/libs', 'Smarty.class' );
|
||||||
|
//loading the autoloader libraries feature
|
||||||
|
spl_autoload_register(array('Bootstrap', 'autoloadClass'));
|
||||||
|
Bootstrap::registerClass('G', PATH_GULLIVER . "class.g.php");
|
||||||
|
Bootstrap::registerClass('System', PATH_HOME . "engine/classes/class.system.php");
|
||||||
|
|
||||||
// the request correspond to valid php page, now parse the URI
|
// the request correspond to valid php page, now parse the URI
|
||||||
Bootstrap::parseURI( getenv( "REQUEST_URI" ), $isRestRequest );
|
Bootstrap::parseURI( getenv( "REQUEST_URI" ), $isRestRequest );
|
||||||
|
|
||||||
@@ -392,13 +400,8 @@ if (defined( 'PATH_DATA' ) && file_exists( PATH_DATA )) {
|
|||||||
$oServerConf = & serverConf::getSingleton();
|
$oServerConf = & serverConf::getSingleton();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call Gulliver Classes
|
// Call more Classes
|
||||||
Bootstrap::LoadThirdParty( 'smarty/libs', 'Smarty.class' );
|
|
||||||
|
|
||||||
//testing the autoloader feature
|
|
||||||
spl_autoload_register(array('Bootstrap', 'autoloadClass'));
|
|
||||||
Bootstrap::registerClass('headPublisher', PATH_GULLIVER . "class.headPublisher.php");
|
Bootstrap::registerClass('headPublisher', PATH_GULLIVER . "class.headPublisher.php");
|
||||||
Bootstrap::registerClass('G', PATH_GULLIVER . "class.g.php");
|
|
||||||
Bootstrap::registerClass('publisher', PATH_GULLIVER . "class.publisher.php");
|
Bootstrap::registerClass('publisher', PATH_GULLIVER . "class.publisher.php");
|
||||||
Bootstrap::registerClass('xmlform', PATH_GULLIVER . "class.xmlform.php");
|
Bootstrap::registerClass('xmlform', PATH_GULLIVER . "class.xmlform.php");
|
||||||
Bootstrap::registerClass('XmlForm_Field', PATH_GULLIVER . "class.xmlform.php");
|
Bootstrap::registerClass('XmlForm_Field', PATH_GULLIVER . "class.xmlform.php");
|
||||||
@@ -418,7 +421,6 @@ Bootstrap::registerClass('Controller', PATH_GULLIVER . "class.controlle
|
|||||||
Bootstrap::registerClass('HttpProxyController', PATH_GULLIVER . "class.httpProxyController.php");
|
Bootstrap::registerClass('HttpProxyController', PATH_GULLIVER . "class.httpProxyController.php");
|
||||||
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('Propel', PATH_THIRDPARTY . "propel/Propel.php");
|
Bootstrap::registerClass('Propel', PATH_THIRDPARTY . "propel/Propel.php");
|
||||||
Bootstrap::registerClass('Creole', PATH_THIRDPARTY . "creole/Creole.php");
|
Bootstrap::registerClass('Creole', PATH_THIRDPARTY . "creole/Creole.php");
|
||||||
Bootstrap::registerClass('Groups', PATH_HOME . "engine/classes/class.groups.php");
|
Bootstrap::registerClass('Groups', PATH_HOME . "engine/classes/class.groups.php");
|
||||||
|
|||||||
Reference in New Issue
Block a user