public function GetURL($filters = NULL) { $this->_SetupParents(); $this->_SetupFields(); if ($filters === FALSE) { return parent::GetURL($filters); } if (!is_array($filters) && $filters !== NULL) { $f = $this->FindFilter($this->GetPrimaryKey()); if ($f) { $filters = array('_f_' . $f['uid'] => $filters); } else { $filters = array($this->GetPrimaryKey() => $filters); } } foreach ($this->filters as $filterType) { foreach ($filterType as $filterSet) { foreach ($filterSet as $filter) { // is the current filter referenced in $filters? if not, continue; if (!is_callable($filter['fieldName']) && !isset($filters[$filter['fieldName']]) && !isset($filters['_f_' . $filter['uid']])) { continue; } $val = $this->GetFilterValue($filter['uid']); if (!is_callable($filter['fieldName']) && isset($filters[$filter['fieldName']])) { $val = $filters[$filter['fieldName']]; } if (isset($filters['_f_' . $filter['uid']])) { $val = $filters['_f_' . $filter['uid']]; } /*if (!empty($filter['default']) && $val == $filter['default']) { unset($filters[$filter['fieldName']]); unset($filters['_f_'.$filter['uid']]); continue; }*/ if (!$val) { continue; } if ($this->HasRewrite($filter['fieldName'])) { if (isset($filters[$filter['fieldName']])) { continue; } $filters[$filter['fieldName']] = $val; unset($filters['_f_' . $filter['uid']]); continue; } continue; // skip below $filters['_f_' . $filter['uid']] = $val; unset($filters[$filter['fieldName']]); } } } $this->RewriteFilters($filters); return parent::GetURL($filters); }
public function GetURL($filters = NULL) { return str_replace('//', '/', parent::GetURL($filters)); }