$a = $a ?: $b;

$a = $a ?: $b;, a forum discussion on Jojo CMS. Join us for more discussions on $a = $a ?: $b; on our General Discussion forum.

Back to Forum Index : Back to General Discussion   RSS
Rick Rick

14 Oct 2009
Posts: 336

A while ago the trunk stopped working for me but I pretty much ignored it since one of the log messages said to expect as much. But I just started looking at it and what I thought was a typo is in multiple places.

includes/jojo.php

$uriformat = Jojo::$siteInfo['uriformat'] ?: "%language%-%region%";

and then

$uri = substr($uri, strlen($testuri) + 1) ?: '';

I can see what appears to be an evolution of the short IF statement where the result of the check is assumed to be the result if positive. Searching for anything like this in Google returns nothing, so I'm at a loss. The code throws PHP errors in 5.2.5 and 5.2.6, is it a 'bleeding edge' addition to PHP?
tom

Developer

tom

14 Oct 2009
Posts: 379

That format is a 5.3 shortcut.

Using 6 code would be bleeding edge :p

Mike figures that by the time Jojo 2 is ready for release (given how long 1 has taken) that php 5.3 will be standard by then (or at least common).

We already have a couple of clients who're on 5.3 and have done a cleanup (which I think made it to RC2 and the 1 branch) to get Jojo 5.3 compliant (but still OK for 5.2).

It adds a bunch of features (like this) which make life easier, but is also much stricter. Dwoo has similar issues/advantages.

So in combination, and with the complete overhaul of URL handling to accomodate multiple domains / regions / languages / themes within a single site install, it'll probably be a while before trunk is reasonably stable again.

The 1.0 branch should be pretty good, but it still needs bug fixing and testing so we can (finally) get a real release out. Mike and I are head down on trunk at the moment, so any assistance on cleaning up the branch would be appreciated.

I think we got the worst of the bugs that infested the RC2 release (off 1.0 branch), but we two haven't had a chance to really test it enough to be sure of it for RC3.

If you (all) reckon the branch is all good now, we'll go for a RC3 release from it in the next week or so. Ideally this should be the last test release and there should only be bug fixing / compatibiilty testing and so on to do on it in order to get it out at 1.0
Rick Rick

14 Oct 2009
Posts: 336

That makes sense... It's a nice addition. Time to look at upgrading soon I guess.

I just committed the only change I've made to 1.0 recently, it's very minor though.

I've been busy recently setting up a business, and getting a couple of quick sites out but definitely want to get digging into Jojo. Most of my ideas are either too big for the amount of time I have or too specific to my needs over everyone elses.

I'll pay attention whenever I'm in Jojo and see what bugs I find myself working around without realising.

I have a lot of ideas for improving numerous plugins but want to tread carefully so as to not impose on the creators of those plugins. I'll probably just make a post for each one and put it up for discussion. Or I could add the changes and just accept it if they get rolled back.
tom

Developer

tom

14 Oct 2009
Posts: 379

You can probably just go for it where you see improvements could be made. As long as your commits are commented you should be fine, and we should be able to see if there are potential upgrade issues. Where possible, if you can avoid changes that absolutely require running setup after updating (rather than just as a means to accessing the new functionality), that'd be good :)

If you have overarching principles of modification you'd like to embark on though, they might be worth discussing first..
Rick Rick

18 Feb 2010
Posts: 336

If you guys want the bug tracker up again I've got some space on a VPS running PHP5.2 I'd be happy to donate.
Back to Forum Index : Back to General Discussion   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.