contao/import — Issue #3258: numeric aliases for news_reader
Author: importer
Created: 2011-11-29 21:13:22+00:00
State: open
Labels: Defect, Invalid, news

Hi, I found a small bugs in the alias/id logic

The query for finding page at news_reader has a part

```
"AND (id=? OR alias=?)"
```

and for parameters it is looks like

```
"execute((is_numeric($this->Input->get('items')) ? $this->Input->get('items') : 0), $this->Input->get('items')"
```

if any page has +alias+ like 000000037 it will be casted to int, like 37, and if there are page with the same +id+, and it has correct +pid+ it will be showed, instead of page which has alias 000000037.

I think you should change order for condition and parameters in the SQL query, so alias will be checked first, and then id.

--- _Originally created by dmitry on July 12th, 2011, at 11:48am (ID 3258)_