aiki config "url" should not require an ending slash

Reported by rejon on 2012-03-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
aikiframework
High
Jakub Jankiewicz

Bug Description

Most people will forget it, and ideally its backwards compatible, but annoying and will break aiki if forgotten. Standard practice is to NOT include the / and the AIKI_SITE_URL does not use it. We should consolidate use of url across aiki to NOT need the closing /

I think that Aiki should add that slash if not present, I always use
this type of code.

if ($url[strlen($url)-1] != '/') {
  $url .= '/';
}

On Thu, 08 Mar 2012 06:14:23 -0000
rejon <email address hidden> wrote:

> Public bug reported:
>
> Most people will forget it, and ideally its backwards compatible, but
> annoying and will break aiki if forgotten. Standard practice is to NOT
> include the / and the AIKI_SITE_URL does not use it. We should
> consolidate use of url across aiki to NOT need the closing /
>
> ** Affects: aikiframework
> Importance: High
> Status: Confirmed
>

--
Jakub Jankiewicz
twitter: @jcubic
www: http://jcubic.pl

Please commit it

Jon Phillips
bj. +86-187-1003-9974
sf. +1-415-830-3884
http://fabricatorz.com

On Mar 8, 2012 6:57 PM, "Jakub Jankiewicz" <email address hidden>
wrote:

I think that Aiki should add that slash if not present, I always use
this type of code.

if ($url[strlen($url)-1] != '/') {
 $url .= '/';

}

On Thu, 08 Mar 2012 06:14:23 -0000
rejon <email address hidden> wrote:

> Public bug reported:
>
> Most...
Jakub Jankiewicz
twitter: @jcubic
www: http://jcubic.pl

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.l...

Jakub Jankiewicz (jcubic) wrote :

OK I commit (revno: 1129), but it will need some testing, I added it to
aiki::get_config that function is executed in boostrap.php and it look
like no code is accessing $config before that function is executed.

Changed in aikiframework:
status: Confirmed → Fix Committed
assignee: nobody → Jakub Jankiewicz (jcubic)

Hi jakub!

use substr($url,-1)
it doesn't crash with a empty string.

rejon (rejon) wrote :

Jon Phillips
bj. +86-187-1003-9974
sf. +1-415-830-3884
http://fabricatorz.com

On Mar 8, 2012 9:55 PM, "rg1024" <email address hidden> wrote:

Hi jakub!

use substr($url,-1)
it doesn't crash with a empty string.

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.l...

Jakub Jankiewicz (jcubic) wrote :

I'll use it. I didn't know that I can use that, like in python url[-1]

On Thu, 08 Mar 2012 13:45:54 -0000
rg1024 <email address hidden> wrote:

> Hi jakub!
>
> use substr($url,-1)
> it doesn't crash with a empty string.
>

--
Jakub Jankiewicz
twitter: @jcubic
www: http://jcubic.pl

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers