$paginator->options(array('url' => array('?' => $this-
>data['Search']));

On 24 ноя, 09:31, Dmitry Shevchenko <[email protected]> wrote:
> I found a very bad solution
> 1. make convert from array to url manually
> 2. add this to parameters array
> 3. unset not flat array's in param
>
> f.e.
> $seeking_url = '';
>             if (!empty($this->data['Search']['seeking']))
>             {
>                 $seeking_url .= "seeking="; //make url to string
>
>                 foreach ($this->data['Search']['seeking'] as $field=>
> $value)
>                 {
>                     $seeking_url .= "&seeking[]=".$value; //make url
> to string
>                 }
>                 $this->data['Search']['see'] = $seeking_url; //add to
> params
>
>                unset($this->data['Search']['seeking']); // unset real
> array
>
>     }
>
> but this is VERY UGLY solution. Maybe someone knew better ??
>
> On Nov 23, 3:55 pm, Dmitry Shevchenko <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi.
> > I found a some error when using paginator-> options ( .. url ..)
>
> > for example this is my call for paginator in view.
> > $paginator->options  (array('url' => $this->data['Search'] ..
>
> > and if data['Search'] is flat array - all is good - it will create a
> > correct url
> > but if it contain a sub arrays like:
> > $url    =       array(
> >         "controller" => "profiles",
> >         "plugin" => null,
> >         "page" => 1,
> >         "search_type" => "advanced",
> >         "age_from" => "0",
> >         "age_to" => "0",
> >         "with_photo" => "0",
> >         "is_online" => "0",
> >         "seeking" => array(
> >         "5",
> >         "7"
> > ),
>
> > I'm getting a Array to string conversion [ROOT\cake\cake\libs
> > \router.php, line 952]
>
> > It seems cake doesn't convert sub arrays like
> > seeking=&seeking[]=1&seeking[]=2&seeking[]=4&seeking[]=7
>
> > Do anyone knew some workaround for this?
>
> > p.s. I'm using cake 1.2.6 and possibly found a bug

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to