Atomik Framework Forum

Discussions about Atomik Framework

You are not logged in.

#1 2010-03-25 18:37:57

eNRgie
Member
Registered: 2010-03-04
Posts: 16

Atomik::url('...')

I have just spotted something:

When you use the Atomik::url method on a page which have a setting, the url keeps this setting.

Example:

I am on page index?id=1 and : http://s2.noelshack.com/uploads/images/8142021966375_screen.png

As you see, the setting "?id=1" is kept by the pages.

the "fix" is to substitute Atomik::url('blog') by Atomik::url('blog', array()) for example, but it's very ugly

Offline

 

#2 2010-03-25 18:53:30

maxime
Administrator
From: Paris
Registered: 2009-01-02
Posts: 219
Website

Re: Atomik::url('...')

this is not a fix, it is the actual way of doing it...

it can be changed very easily but I would like to know the opinion of other people before doing it.

Offline

 

#3 2010-03-25 19:58:53

eNRgie
Member
Registered: 2010-03-04
Posts: 16

Re: Atomik::url('...')

J'avais mis fix entre guillemets car ce n'est pas un fix j'en suis bien conscient mais vu mon énorme vocabulaire en anglais ... :p

Si tu hésites à faire ce fix, c'est qu'il doit y avoir des points négatifs en contrepartie non ?

Offline

 

#4 2010-03-29 02:59:17

AdrianGaudebert
Member
From: France
Registered: 2009-10-04
Posts: 27
Website

Re: Atomik::url('...')

Tu peux réexpliquer ton pb en français parce que je n'ai rien compris... smile


Minifier : minify your CSS files with Atomik - http://minifier.lqbs.fr

Offline

 

#5 2010-03-29 20:01:27

eNRgie
Member
Registered: 2010-03-04
Posts: 16

Re: Atomik::url('...')

big_smile

C'est pas vraiment un problème puisqu'il y a une alternative.

Quand tu utilises atomik::url sur une page ayant un paramètre ( $_GET ) et bien le $_GET se remet aussi dans l'url donnée par la méthode atomik::url

C'est tout

Offline

 

#6 2010-06-01 18:03:52

Zarmakuizz
New member
Registered: 2010-05-10
Posts: 5

Re: Atomik::url('...')

I encounter this problem too, I was reporting it in this french topic.

I don't like the way some parameters are travelling through the urls.


J'ai rencontré ce "problème" également (wow, on est en train de parler français dans une zone EN non ?), j'avais commencé à reporter un topic ici pour signaler cette histoire entre autres.

J'aime pas vraiment le fait que certains paramètres se baladent dans l'url perso…

Offline

 

#7 2010-06-02 14:22:37

maxime
Administrator
From: Paris
Registered: 2009-01-02
Posts: 219
Website

Re: Atomik::url('...')

I have juste released version 2.2.2 with these modifications

Offline

 

#8 2010-06-08 10:13:55

AdrianGaudebert
Member
From: France
Registered: 2009-10-04
Posts: 27
Website

Re: Atomik::url('...')

Hi!

Here is a little bug that might come from your recent changes: when I call atomik::Url(''); like that, with an empty string, Atomik becomes very angry! tongue

An error of type ErrorException was caught at line 2226
in file /home/[...]/monProjet/index.php

Uninitialized string offset: 0

2219     $action = substr($action, 0, $separator);
2220     parse_str($queryString, $actionParams);
2221     $params = self::_mergeRecursive($actionParams, $params);
2222     }
2223   
2224     // checks if it's a named route
2225     if ($action{0} == '@') {
2226     $routeName = substr($action, 1);
2227     $action = null;
2228     foreach (self::get('app/routes') as $route => $default) {
2229     if (!is_array($default) || !isset($default['@name']) ||
2230     $default['@name'] != $routeName) {
2231     continue;
2232     }

I suppose that substring an empty string is not appreciated by our friend PHP... smile

Thanks, Adrian


Minifier : minify your CSS files with Atomik - http://minifier.lqbs.fr

Offline

 

#9 2010-06-09 12:39:00

maxime
Administrator
From: Paris
Registered: 2009-01-02
Posts: 219
Website

Re: Atomik::url('...')

You can fix this by replacing line 2225 with

Code:

if (strlen($action) > 0 && $action{0} == '@') {

i'm going to fix it in the 2.2.2 release

Offline

 

Board footer

Powered by FluxBB