Ignore:
Timestamp:
08/15/12 14:44:24 (12 years ago)
Author:
gustavo
Message:

Ticket #3030 - Problema para remover marcadores em pastas com espaco

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/Sync.php

    r6328 r7025  
    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} 
     46 
    647if( !isset( $args ) ) 
    7     parse_str( file_get_contents('php://input'), $args ); 
     48    $args = getRealREQUEST(); 
    849 
    950if(!function_exists('parseURI')) 
Note: See TracChangeset for help on using the changeset viewer.