Changeset 7054 for branches


Ignore:
Timestamp:
08/17/12 14:57:25 (12 years ago)
Author:
eduardow
Message:

Ticket #3030 - Problema para remover marcadores em pastas com espaço.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/prototype/Sync.php

    r6328 r7054  
    44$accept = $_SERVER["HTTP_ACCEPT"]; 
    55 
     6if(!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}  
    646if( !isset( $args ) ) 
    7     parse_str( file_get_contents('php://input'), $args ); 
     47    $args = getRealREQUEST(); 
    848 
    949if(!function_exists('parseURI')) 
Note: See TracChangeset for help on using the changeset viewer.