From 597659cefa59767d3e07e21c79c7c0f430a6b7d1 Mon Sep 17 00:00:00 2001 From: "Stefan E. Funk" <stefan.funk@daasi.de> Date: Fri, 20 Sep 2013 16:28:27 +0000 Subject: [PATCH] Comitting changes for new PHP version due to errors with the new TG2.0 auth. git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@14428 7c539038-3410-0410-b1ec-0f2a7bf1c452 --- .../lib/Helper.class.php | 10 +++++----- .../lib/Number.class.php | 2 +- .../lib/XML.class.php | 10 +++++----- .../rbac/RBAC.class.php | 4 ++-- .../rbac/RBACcore.class.php | 14 +++++++------- .../rbac/RBAClimitedHirarchical.class.php | 4 ++-- .../rbacSoap/TgReview.class.php | 6 +++--- .../rbacSoap/tgextra-crud.php | 2 +- .../rbacSoap/tgsystem.php | 2 +- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/info.textgrid.middleware.tgauth.rbac/lib/Helper.class.php b/info.textgrid.middleware.tgauth.rbac/lib/Helper.class.php index 2ef0f54..240d413 100755 --- a/info.textgrid.middleware.tgauth.rbac/lib/Helper.class.php +++ b/info.textgrid.middleware.tgauth.rbac/lib/Helper.class.php @@ -72,7 +72,7 @@ class Helper implements iHelper { // Im letzten Eintrag muss der Laendercode stehen - $arrAddress['countrycode'] = trim( strtolower( array_pop( &$arrRawAddress ) ) ); + $arrAddress['countrycode'] = trim( strtolower( array_pop( $arrRawAddress ) ) ); if( preg_match( "/^de$/i", trim( $arrAddress['countrycode'] ) ) ) { @@ -143,8 +143,8 @@ class Helper implements iHelper { $i = 0; // Schleifenvariable - preg_match_all( "/[a-z]{2}/i", $inServerString, &$arrCode ); - preg_match_all( "/[a-z]{2}-[a-z]{2}/i", $inServerString, &$arrCombination ); + preg_match_all( "/[a-z]{2}/i", $inServerString, $arrCode ); + preg_match_all( "/[a-z]{2}-[a-z]{2}/i", $inServerString, $arrCombination ); // Nur der erste Array-Eintrag ist von Interesse in diesem Fall @@ -159,7 +159,7 @@ class Helper implements iHelper { // Der hintere Teil bezieht sich auf das Land. Wenn aber hinterer und vorderer // Teil gleich sind, darf es trotzdem nicht auf die Blacklist. - !preg_match( "/" . $arrTmp[0] . "/", $arrTmp[1] ) ? array_push( &$arrBlacklist, $arrTmp[1] ) : false; + !preg_match( "/" . $arrTmp[0] . "/", $arrTmp[1] ) ? array_push( $arrBlacklist, $arrTmp[1] ) : false; } @@ -169,7 +169,7 @@ class Helper implements iHelper { if( !in_array( $arrCode[$i], $arrReturn ) && !in_array( $arrCode[$i], $arrBlacklist ) ) { - array_push( &$arrReturn, strtolower( $arrCode[$i] ) ); + array_push( $arrReturn, strtolower( $arrCode[$i] ) ); } diff --git a/info.textgrid.middleware.tgauth.rbac/lib/Number.class.php b/info.textgrid.middleware.tgauth.rbac/lib/Number.class.php index a4fe7c3..b348b95 100755 --- a/info.textgrid.middleware.tgauth.rbac/lib/Number.class.php +++ b/info.textgrid.middleware.tgauth.rbac/lib/Number.class.php @@ -50,7 +50,7 @@ class Number implements iNumber { // ## expand ######################################################## function expand( $inNumber, $inDigit ) { - settype( &$inNumber, "string" ); + settype( $inNumber, "string" ); while( strlen( $inNumber ) < $inDigit ) { diff --git a/info.textgrid.middleware.tgauth.rbac/lib/XML.class.php b/info.textgrid.middleware.tgauth.rbac/lib/XML.class.php index 95f612f..04d2060 100755 --- a/info.textgrid.middleware.tgauth.rbac/lib/XML.class.php +++ b/info.textgrid.middleware.tgauth.rbac/lib/XML.class.php @@ -84,7 +84,7 @@ class XML implements iXML { // zur Version und zum verwendeten Zeichensatz nicht. // Dieser muss hier manuell ausgewertet werden. $arrXmlHeader = Array(); - preg_match( "/<\?\s*xml\s.+\?>/i", $inData, &$arrXmlHeader ); + preg_match( "/<\?\s*xml\s.+\?>/i", $inData, $arrXmlHeader ); if( sizeof( $arrXmlHeader ) == 1 ) { @@ -102,12 +102,12 @@ class XML implements iXML { if( (sizeof( $arrXmlHeader ) == 1) && !preg_match( "/encoding\s*=\s*.?utf[-]?8/i", $arrXmlHeader[0] ) ) { - xml_parse_into_struct( $parser, utf8_encode( $inData ), &$arrVal, &$index ); + xml_parse_into_struct( $parser, utf8_encode( $inData ), $arrVal, $index ); } else { - xml_parse_into_struct( $parser, $inData, &$arrVal, &$index ); + xml_parse_into_struct( $parser, $inData, $arrVal, $index ); } @@ -212,7 +212,7 @@ class XML implements iXML { foreach( $arrAttribute as $key => $value ) { $arrMatch = Array(); - if( preg_match( "/^xmlns:(.+)$/i", $key, &$arrMatch ) ) { + if( preg_match( "/^xmlns:(.+)$/i", $key, $arrMatch ) ) { $inArrNamespace[$arrMatch[1]] = $value; @@ -310,7 +310,7 @@ class XML implements iXML { foreach( $arrAttribute as $key => $value ) { $arrMatch = Array(); - if( preg_match( "/^xmlns:(.+)$/i", $key, &$arrMatch ) ) { + if( preg_match( "/^xmlns:(.+)$/i", $key, $arrMatch ) ) { $inArrNamespace[$arrMatch[1]] = $value; diff --git a/info.textgrid.middleware.tgauth.rbac/rbac/RBAC.class.php b/info.textgrid.middleware.tgauth.rbac/rbac/RBAC.class.php index 7120a35..2af173f 100755 --- a/info.textgrid.middleware.tgauth.rbac/rbac/RBAC.class.php +++ b/info.textgrid.middleware.tgauth.rbac/rbac/RBAC.class.php @@ -189,7 +189,7 @@ class RBAC { if( method_exists( $extension, $inFunctionName ) && !method_exists( $this->objSystem, $inFunctionName ) ) { - $result = call_user_func_array( Array( &$this->arrExtension[$className], $inFunctionName ), $inArrParameter ); + $result = call_user_func_array( Array( $this->arrExtension[$className], $inFunctionName ), $inArrParameter ); $foundInExtension = true; break; @@ -204,7 +204,7 @@ class RBAC { if( method_exists( $this->objSystem, $inFunctionName ) ) { - $result = call_user_func_array( Array( &$this->objSystem, $inFunctionName ), $inArrParameter ); + $result = call_user_func_array( Array( $this->objSystem, $inFunctionName ), $inArrParameter ); if( isset( $this->arrEvent[$inFunctionName]['outputfilter'] ) ) { diff --git a/info.textgrid.middleware.tgauth.rbac/rbac/RBACcore.class.php b/info.textgrid.middleware.tgauth.rbac/rbac/RBACcore.class.php index 3e4682e..ccec78c 100755 --- a/info.textgrid.middleware.tgauth.rbac/rbac/RBACcore.class.php +++ b/info.textgrid.middleware.tgauth.rbac/rbac/RBACcore.class.php @@ -88,7 +88,7 @@ class RBACcore implements iRBACcore { // Create a role connection if( $this->sameConnectionParams( "user", "role" ) ) { - $this->conn['role'] = &$this->conn['user']; + $this->conn['role'] = $this->conn['user']; } else { @@ -107,12 +107,12 @@ class RBACcore implements iRBACcore { // Create a session connection if( $this->sameConnectionParams( "session", "user" ) ) { - $this->conn['session'] = &$this->conn['user']; + $this->conn['session'] = $this->conn['user']; } elseif( $this->sameConnectionParams( "session", "role" ) ) { - $this->conn['session'] = &$this->conn['role']; + $this->conn['session'] = $this->conn['role']; } else { @@ -131,17 +131,17 @@ class RBACcore implements iRBACcore { // Create a resource connection if( $this->sameConnectionParams( "resource", "user" ) ) { - $this->conn['resource'] = &$this->conn['user']; + $this->conn['resource'] = $this->conn['user']; } elseif( $this->sameConnectionParams( "resource", "role" ) ) { - $this->conn['resource'] = &$this->conn['role']; + $this->conn['resource'] = $this->conn['role']; } elseif( $this->sameConnectionParams( "resource", "session" ) ) { - $this->conn['resource'] = &$this->conn['session']; + $this->conn['resource'] = $this->conn['session']; } else { @@ -2211,7 +2211,7 @@ class RBACcore implements iRBACcore { $element = ""; - while( $element = array_pop( &$inArray ) ) { + while( $element = array_pop( $inArray ) ) { if( !in_array( $element, $inArray ) ) { diff --git a/info.textgrid.middleware.tgauth.rbac/rbac/RBAClimitedHirarchical.class.php b/info.textgrid.middleware.tgauth.rbac/rbac/RBAClimitedHirarchical.class.php index 6213b59..9c73dc7 100755 --- a/info.textgrid.middleware.tgauth.rbac/rbac/RBAClimitedHirarchical.class.php +++ b/info.textgrid.middleware.tgauth.rbac/rbac/RBAClimitedHirarchical.class.php @@ -127,7 +127,7 @@ class RBAClimitedHirarchical extends RBACcore implements iRBAClimitedHirarchical // Cut off the first element - array_shift( &$arrTmpSplit ); + array_shift( $arrTmpSplit ); } @@ -616,7 +616,7 @@ class RBAClimitedHirarchical extends RBACcore implements iRBAClimitedHirarchical // Cut off the first element - array_shift( &$arrTmpSplit ); + array_shift( $arrTmpSplit ); } diff --git a/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgReview.class.php b/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgReview.class.php index e4391e8..e5bbcb4 100755 --- a/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgReview.class.php +++ b/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgReview.class.php @@ -235,7 +235,7 @@ class TgReview { for( $i = 0; $i < sizeof( $arrPermission ); $i++ ) { - array_push( &$result->permissionset, new permission( $arrPermission[$i]['operation'], + array_push( $result->permissionset, new permission( $arrPermission[$i]['operation'], $arrPermission[$i]['resource'] ) ); } @@ -396,7 +396,7 @@ class TgReview { for( $i = 0; $i < sizeof( $arrPermission ); $i++ ) { - array_push( &$result->permissionset, new permission( $arrPermission[$i]['operation'], + array_push( $result->permissionset, new permission( $arrPermission[$i]['operation'], $arrPermission[$i]['resource'] ) ); } @@ -453,7 +453,7 @@ class TgReview { for( $i = 0; $i < sizeof( $arrPermission ); $i++ ) { - array_push( &$result->permissionset, new permission( $arrPermission[$i]['operation'], + array_push( $result->permissionset, new permission( $arrPermission[$i]['operation'], $arrPermission[$i]['resource'] ) ); } diff --git a/info.textgrid.middleware.tgauth.rbac/rbacSoap/tgextra-crud.php b/info.textgrid.middleware.tgauth.rbac/rbacSoap/tgextra-crud.php index f249dcf..b007c04 100755 --- a/info.textgrid.middleware.tgauth.rbac/rbacSoap/tgextra-crud.php +++ b/info.textgrid.middleware.tgauth.rbac/rbacSoap/tgextra-crud.php @@ -15,7 +15,7 @@ require_once( "TgExtraCrud.class.php" ); // Dont be so verbose with messages and notices. -error_reporting( E_ERROR | E_USER_ERROR ); +//error_reporting( E_ERROR | E_USER_ERROR ); // ############################################################# diff --git a/info.textgrid.middleware.tgauth.rbac/rbacSoap/tgsystem.php b/info.textgrid.middleware.tgauth.rbac/rbacSoap/tgsystem.php index d55efd8..7ac8d53 100755 --- a/info.textgrid.middleware.tgauth.rbac/rbacSoap/tgsystem.php +++ b/info.textgrid.middleware.tgauth.rbac/rbacSoap/tgsystem.php @@ -13,7 +13,7 @@ require_once( "TgSystem.class.php" ); // Dont be so verbose with messages and notices. -error_reporting( E_ERROR | E_USER_ERROR ); +//error_reporting( E_ERROR | E_USER_ERROR ); // ############################################################# -- GitLab