includes/paths.php
changeset 876 aed15c337b72
parent 843 4415e50e4e84
child 915 91f4da84966f
equal deleted inserted replaced
864:09c3ba4f6fbf 876:aed15c337b72
   140     }
   140     }
   141     else
   141     else
   142     {
   142     {
   143       // This method really isn't supported because apache has a habit of passing dots as underscores, thus corrupting the request
   143       // This method really isn't supported because apache has a habit of passing dots as underscores, thus corrupting the request
   144       // If you really want to try it, the URI format is yoursite.com/?/Page_title
   144       // If you really want to try it, the URI format is yoursite.com/?/Page_title
   145       if ( count($_GET) > 0 )
   145       if ( !empty($_SERVER['QUERY_STRING']) && substr($_SERVER['QUERY_STRING'], 0, 1) == '/' )
   146       {
   146       {
   147         list($getkey) = array_keys($_GET);
   147         $pos = ( ($_ = strpos($_SERVER['QUERY_STRING'], '&')) !== false ) ? $_ - 1: 0x7FFFFFFF;
   148         if ( substr($getkey, 0, 1) == '/' )
   148         $title = substr($_SERVER['QUERY_STRING'], 1, $pos);
   149         {
       
   150           $title = substr($getkey, 1);
       
   151         }
       
   152       }
   149       }
   153     }
   150     }
   154     return ( $sanitize ) ? sanitize_page_id($title) : $title;
   151     return ( $sanitize ) ? sanitize_page_id($title) : $title;
   155   }
   152   }
   156   
   153