[dev] Horde.php

Chuck Hagenbuch chuck at horde.org
Thu Feb 5 19:06:09 PST 2004


Quoting steve <mailling at gmx.co.uk>:

> I don't get why we are doing @include_once, and not require_once
> Indeed, if the file is not there, a lot of thing are not going to work
> anyway; but it is just more difficult to catch it (for the developpers))
>
> RCS file: /repository/horde/lib/Horde.php,v
> retrieving revision 1.375
> diff -w -b -r1.375 Horde.php
> 150,151c150,151
> <         @include_once HORDE_LIBS . 'Horde/Auth.php';
> <         @include_once HORDE_LIBS . 'Horde/CLI.php';

You included absolutely no context, but the only place I can find those calls is
in Horde::fatal(). It would be pretty stupid to let a missing file kill the
script while we were right in the middle of trying to die *usefully*.

> 2)
> When I used some profiler tools, I found that $webroot =
> $registry->getParam('webroot'); is called a lot, so we could speed up the
> things a little with:
> 429a430,432
> >         static $webroot;
> >
> >         if (!isset($webroot)) {
> 433a437
> >         }

This will break any URLs generated by the 2nd+ application that a page uses
(like the portal page). A version of this patch that avoided that problem would
be accepted.

-chuck

--
"Here, I brought some cole slaw. It's made from peeeooople! Just kidding."


More information about the dev mailing list