| 321 | | if (!empty($this->config['query_string_filters'])): |
| 322 | | $filters = str_replace(' ', '', $this->config['query_string_filters']); |
| 323 | | $filters = explode(',', $filters); |
| 324 | | else: |
| 325 | | $filters = array(); |
| 326 | | endif; |
| 327 | | |
| 328 | | // OWA specific params to filter |
| 329 | | array_push($filters, $this->config['ns'].$this->config['source_param']); |
| 330 | | array_push($filters, $this->config['ns'].$this->config['feed_subscription_id']); |
| 331 | | |
| 332 | | //print_r($filters); |
| 333 | | |
| 334 | | foreach ($filters as $filter => $value) { |
| 335 | | |
| 336 | | $url = preg_replace( |
| 337 | | '#\?' . |
| 338 | | $value . |
| 339 | | '=.*$|&' . |
| 340 | | $value . |
| 341 | | '=.*$|' . |
| 342 | | $value . |
| 343 | | '=.*&#msiU', |
| 344 | | '', |
| 345 | | $url |
| 346 | | ); |
| 347 | | |
| 348 | | } |
| 349 | | |
| | 321 | if (!empty($this->config['query_string_filters'])): |
| | 322 | $filters = str_replace(' ', '', $this->config['query_string_filters']); |
| | 323 | $filters = explode(',', $filters); |
| | 324 | else: |
| | 325 | $filters = array(); |
| | 326 | endif; |
| | 327 | |
| | 328 | // OWA specific params to filter |
| | 329 | array_push($filters, $this->config['ns'].$this->config['source_param']); |
| | 330 | array_push($filters, $this->config['ns'].$this->config['feed_subscription_id']); |
| | 331 | |
| | 332 | //print_r($filters); |
| | 333 | |
| | 334 | foreach ($filters as $filter => $value) { |
| | 335 | |
| | 336 | $url = preg_replace( |
| | 337 | '#\?' . |
| | 338 | $value . |
| | 339 | '=.*$|&' . |
| | 340 | $value . |
| | 341 | '=.*$|' . |
| | 342 | $value . |
| | 343 | '=.*&#msiU', |
| | 344 | '', |
| | 345 | $url |
| | 346 | ); |
| | 347 | |
| | 348 | } |
| | 349 | |
| | 350 | |
| | 351 | //check for dangling '?'. this might occure if all params are stripped. |
| | 352 | |
| | 353 | // returns last character of string |
| | 354 | $test = substr($url, -1); |
| | 355 | |
| | 356 | // if dangling '?' is found clean up the url by removing it. |
| | 357 | if ($test == '?'): |
| | 358 | $url = substr($url, 0, -1); |
| | 359 | endif; |
| | 360 | |