Changeset 7228 for branches/2.4/prototype/Sync.php
- Timestamp:
- 09/17/12 14:30:47 (12 years ago)
- Location:
- branches/2.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4
- Property svn:mergeinfo changed
-
branches/2.4/prototype/Sync.php
r7054 r7228 4 4 $accept = $_SERVER["HTTP_ACCEPT"]; 5 5 6 if(!function_exists('getRealREQUEST')) 7 { 8 function getRealREQUEST() { 9 $vars = array(); 10 11 $input = $_SERVER['REDIRECT_QUERY_STRING']; 12 if(!empty($input)){ 13 $pairs = explode("&", $input); 14 foreach ($pairs as $pair) { 15 $nv = explode("=", $pair); 16 17 $name = urldecode($nv[0]); 18 $nameSanitize = preg_replace('/([^\[]*)\[.*$/','$1',$name); 19 20 $nameMatched = str_replace('.','_',$nameSanitize); 21 $nameMatched = str_replace(' ','_',$nameMatched); 22 23 $vars[$nameSanitize] = $_REQUEST[$nameMatched]; 24 } 25 } 26 27 $input = file_get_contents("php://input"); 28 if(!empty($input)){ 29 $pairs = explode("&", $input); 30 foreach ($pairs as $pair) { 31 $nv = explode("=", $pair); 32 33 $name = urldecode($nv[0]); 34 $nameSanitize = preg_replace('/([^\[]*)\[.*$/','$1',$name); 35 36 $nameMatched = str_replace('.','_',$nameSanitize); 37 $nameMatched = str_replace(' ','_',$nameMatched); 38 39 $vars[$nameSanitize] = $_REQUEST[$nameMatched]; 40 } 41 } 42 43 return $vars; 44 } 45 } 6 if(!function_exists('getRealREQUEST')) 7 { 8 function getRealREQUEST() { 9 $vars = array(); 10 11 if(isset($_SERVER['REDIRECT_QUERY_STRING'])) 12 $input = $_SERVER['REDIRECT_QUERY_STRING']; 13 14 if(!empty($input)){ 15 $pairs = explode("&", $input); 16 foreach ($pairs as $pair) { 17 $nv = explode("=", $pair); 18 19 $name = urldecode($nv[0]); 20 $nameSanitize = preg_replace('/([^\[]*)\[.*$/','$1',$name); 21 22 $nameMatched = str_replace('.','_',$nameSanitize); 23 $nameMatched = str_replace(' ','_',$nameMatched); 24 25 $vars[$nameSanitize] = $_REQUEST[$nameMatched]; 26 } 27 } 28 29 $input = file_get_contents("php://input"); 30 if(!empty($input)){ 31 $pairs = explode("&", $input); 32 foreach ($pairs as $pair) { 33 $nv = explode("=", $pair); 34 35 $name = urldecode($nv[0]); 36 $nameSanitize = preg_replace('/([^\[]*)\[.*$/','$1',$name); 37 38 $nameMatched = str_replace('.','_',$nameSanitize); 39 $nameMatched = str_replace(' ','_',$nameMatched); 40 41 $vars[$nameSanitize] = $_REQUEST[$nameMatched]; 42 } 43 } 44 45 return $vars; 46 } 47 } 48 46 49 if( !isset( $args ) ) 47 50 $args = getRealREQUEST();
Note: See TracChangeset
for help on using the changeset viewer.