BUG 0000 Some Fixes like unversioning index.html, cleaning up of sysGeneric

This commit is contained in:
Erik Amaru Ortiz
2012-04-09 18:48:44 -04:00
parent abc8f00daa
commit 32eace4cee
10 changed files with 453 additions and 293 deletions

View File

@@ -142,7 +142,7 @@ class Sessions {
*/
public function registerGlobal($name, $value)
{
$this->tmpfile = G::getSysTemDir() . PATH_SEP . "pm-rg-{$this->sessionId}";
$this->tmpfile = G::sys_get_temp_dir() . PATH_SEP . "pm-rg-{$this->sessionId}";
if($this->sessionId == NULL){
throw new Exception('session id was not set.');
@@ -180,7 +180,7 @@ class Sessions {
*/
public function getGlobal($name)
{
$this->tmpfile = G::getSysTemDir() . PATH_SEP . "pm-rg-{$this->sessionId}";
$this->tmpfile = G::sys_get_temp_dir() . PATH_SEP . "pm-rg-{$this->sessionId}";
if($this->sessionId == NULL){
throw new Exception('session id was not set.');
@@ -217,7 +217,7 @@ class Sessions {
*/
public function getGlobals()
{
$this->tmpfile = G::getSysTemDir() . PATH_SEP . "pm-rg-{$this->sessionId}";
$this->tmpfile = G::sys_get_temp_dir() . PATH_SEP . "pm-rg-{$this->sessionId}";
if($this->sessionId == NULL){
throw new Exception('session id was not set.');
@@ -250,7 +250,7 @@ class Sessions {
if($this->sessionId == NULL){
throw new Exception('session id was not set.');
}
$this->tmpfile = G::getSysTemDir() . PATH_SEP . "pm-rg-{$this->sessionId}";
$this->tmpfile = G::sys_get_temp_dir() . PATH_SEP . "pm-rg-{$this->sessionId}";
@unlink($this->tmpfile);
}

View File

@@ -1240,8 +1240,8 @@ case "removeUserFromGroup" :
if ( isset($_FILES['form']) ) {
foreach ($_FILES['form']['name'] as $sFieldName => $vValue) {
if ( $_FILES['form']['error'][$sFieldName] == 0 ){
file_put_contents(G::getSysTemDir().PATH_SEP.$_FILES['form']['name'][$sFieldName], file_get_contents($_FILES['form']['tmp_name'][$sFieldName]));
$filename = G::getSysTemDir().PATH_SEP.$_FILES['form']['name'][$sFieldName];
file_put_contents(G::sys_get_temp_dir().PATH_SEP.$_FILES['form']['name'][$sFieldName], file_get_contents($_FILES['form']['tmp_name'][$sFieldName]));
$filename = G::sys_get_temp_dir().PATH_SEP.$_FILES['form']['name'][$sFieldName];
}
}
}

View File

@@ -3,6 +3,6 @@
<title>Redirector</title>
<meta http-equiv="PRAGMA" content="NO-CACHE" />
<meta http-equiv="CACHE-CONTROL" content="NO-STORE" />
<meta http-equiv="REFRESH" content="0;URL=/sys/{lang}/{skin}/login/login" />
<meta http-equiv="REFRESH" content="0;URL=/sys/{$lang}/{$skin}/login/login" />
</head>
</html>

View File

@@ -36,8 +36,8 @@
if ( isset($_FILES['form']) ) {
foreach ($_FILES['form']['name'] as $sFieldName => $vValue) {
if ( $_FILES['form']['error'][$sFieldName] == 0 ){
file_put_contents(G::getSysTemDir().PATH_SEP.$_FILES['form']['name'][$sFieldName], file_get_contents($_FILES['form']['tmp_name'][$sFieldName]));
$fpath = G::getSysTemDir().PATH_SEP.$_FILES['form']['name'][$sFieldName];
file_put_contents(G::sys_get_temp_dir().PATH_SEP.$_FILES['form']['name'][$sFieldName], file_get_contents($_FILES['form']['tmp_name'][$sFieldName]));
$fpath = G::sys_get_temp_dir().PATH_SEP.$_FILES['form']['name'][$sFieldName];
if( isset($_POST['INPUTS'][$sFieldName]) && $_POST['INPUTS'][$sFieldName] != '' ){ #input file type
ws_sendFile($fpath, $USR_UID, $caseId, 1, $_POST['INPUTS'][$sFieldName]);

View File

@@ -268,7 +268,7 @@
$t->is( $methods[89] , 'pr' ,$i++. ' pr');
$t->is( $methods[90] , 'dump' ,$i++. ' dump');
$t->is( $methods[91] , 'stripCDATA' ,$i++. ' stripCDATA');
$t->is( $methods[92] , 'getSysTemDir' ,$i++. ' getSysTemDir');
$t->is( $methods[92] , 'sys_get_temp_dir' ,$i++. ' sys_get_temp_dir');
$t->is( $methods[93] , 'PMWSCompositeResponse' ,$i++. ' PMWSCompositeResponse');
$t->is( $methods[94] , 'emailAddress' ,$i++. ' emailAddress');
$t->is( count( $methods ) , --$i , count( $methods ).' = '.$i.' ok');