[kdewebdev-site] Local test bench and defined variables

Eric Laffoon eric at kdewebdev.org
Tue Mar 8 11:19:15 EST 2005


On Tuesday 08 March 2005 11:01 am, Andras Mantia wrote:
> On Tuesday 08 March 2005 20:49, Eric Laffoon wrote:
> > I was wondering if some people don't have a local test bench when I
> > saw an error on the klinkstatus page, but after looking it may have
> > been introduced after the fact by Andras. So if you don't know how to
> > set up a local test bench then ask. It will enable you to view your
> > changes with changes from others independent of upload.
>
> I don't know why you see an error, because the KlinkStatus's release.php
> should be OK.

The error was because he did not have the second parameter you introduced.
>
> > Andras, you introduced an application name variable parameter in your
> > function which is something for developers to forget about and cause
> > page errors like I saw locally testing klinkstatus. This is why I put
> > $_appFormal in every applib.php. Whenever you need the formal name of
> > the application use that. If you need the domain/application name use
> > $_application.
>
> But with this change releases.inc.php depends on applib.php (or mostly
> about the $_appFormal variable.

Guess what? Nothing will work right if you don't have an applib.php in your 
sumdomain root. It has two variables and an array for a menu and the page 
templates make sure it's the first thing called. If it's not called the menus 
won't work. When sessions, personalization and user settings are introduced 
they won't work. So these are essential and required and will be on every 
page or it will be failing to integrate without the developer doing an absurd 
amount of work. applib.php is there to make our life's easier.
> So I'd rather use 
>      <?
>         include $_libpath."releases.inc.php";
>         showReleases("releases/releases.xml", $_appFormal);
>       ?>
>
> instead of getting rid of the second parameter for showReleases...

Really? Have you tried passing a variable as a parameter to a function in PHP 
yet? ;-) I agree that if it worked it would be more elegant than using a call 
to global.
>
> Andras
>
> > I fixed all this and uploaded the changes.

-- 
Eric Laffoon
Project Lead - kdewebdev module


More information about the kdewebdev-site mailing list