00001 <?php
00003
00004
00005
00006
00007
00008
00010
00025 function ___uri_filter()
00026 {
00027 static $firstTime = true;
00028
00029 if (!$firstTime || !isset($_SERVER['PATH_INFO'])) { return; }
00030 $firstTime = false;
00031
00032 $parts = explode('/', substr($_SERVER['PATH_INFO'], 1));
00033 $_GET[FLEA::getAppInf('controllerAccessor')] = isset($parts[0]) ? $parts[0] : '';
00034 $_GET[FLEA::getAppInf('actionAccessor')] = isset($parts[1]) ? $parts[1] : '';
00035
00036 $style = FLEA::getAppInf('urlParameterPairStyle');
00037 if ($style == '/') {
00038 for ($i = 2; $i < count($parts); $i += 2) {
00039 if (isset($parts[$i + 1])) {
00040 $_GET[$parts[$i]] = $parts[$i + 1];
00041 }
00042 }
00043 } else {
00044 for ($i = 2; $i < count($parts); $i++) {
00045 $p = $parts[$i];
00046 $arr = explode($style, $p);
00047 if (isset($arr[1])) {
00048 $_GET[$arr[0]] = $arr[1];
00049 }
00050 }
00051 }
00052
00053
00054
00055 $_REQUEST = array_merge($_REQUEST, $_GET);
00056 }
00057
00061 if (defined('FLEA_VERSION')) {
00062 ___uri_filter();
00063 }