Mailing List Archive

problems with v0.9.7.4
Hi,

I just updated my developer version of DAViCal from 0.9.7.2 to 0.9.7.4
Now there is some strange behaviour which I don't know if it's because
of some incomplete integration of my changes or if it's a problem regarding 0.9.7.2
I'll investigate more time in finding out...

But for a few things I'm nearly sure that it's because of 0.9.7.4 and not because of my patches ;-)

1.) the LDAP synchronisation does no longer work.
Previously in "inc//DAViCalUser.php" the file "classBrowser.php" gets
integrated by "require_once"; now there's only "include".
This change leads to an PHP Faal error about redaclaration of class BrowserColumn
because "drivers_ldap.php" integrates DAViCalUser.php and it seems to indirectly
integrate "classBrowser.php" twice...
Changing "include" to at least "include_once" for "classBrowser.php" in DAViCalUser.php solves that problem.

2.) the HTML link to user.php in index.php is wrong (that was already wrong in 0.9.7.2)
It's href="../users.php" and should be href="users.php" because that file is in the same directory...

For the other strange behaviour I'll do my tests somewhen else - maybe tomorrow...

regards,
Matthias

HELPING HEADS for Hard- and Software
-------------------------------------------------------------------------
Fuer Ihre Projekte entwickeln wir massgeschneiderte Loesungen - schnell,
flexibel und direkt vor Ort. Unser eingespieltes Team an erfahrenen Hard-
und Software-Spezialisten unterstuetzt Sie dort, wo Sie uns brauchen.



--------------------------------------------------------------------------
SysDesign GmbH
Saentisstrasse 25
D-88079 Kressbronn am Bodensee

Geschaeftsfuehrer: Franz Kleiner
Handelsregister: Ulm 632138
--------------------------------------------------------------------------
problems with v0.9.7.4 [ In reply to ]
On Thu, 2009-10-15 at 19:37 +0200, Matthias Mohr wrote:
> Hi,
>
> I just updated my developer version of DAViCal from 0.9.7.2 to 0.9.7.4
> Now there is some strange behaviour which I don't know if it's because
> of some incomplete integration of my changes or if it's a problem regarding 0.9.7.2
> I'll investigate more time in finding out...
>
> But for a few things I'm nearly sure that it's because of 0.9.7.4 and not because of my patches ;-)
>
> 1.) the LDAP synchronisation does no longer work.
> Previously in "inc//DAViCalUser.php" the file "classBrowser.php" gets
> integrated by "require_once"; now there's only "include".
> This change leads to an PHP Faal error about redaclaration of class BrowserColumn
> because "drivers_ldap.php" integrates DAViCalUser.php and it seems to indirectly
> integrate "classBrowser.php" twice...
> Changing "include" to at least "include_once" for "classBrowser.php" in DAViCalUser.php solves that problem.

Aarggh! There was me trying to be more efficient by using plain
'include' wherever I could...

I really *wish* drivers_ldap didn't include DAViCalUser.php - I think
there needs to be an intermediate object which can be included in such
places, without pulling in all of the UI stuff that's coded into that
one.


> 2.) the HTML link to user.php in index.php is wrong (that was already wrong in 0.9.7.2)
> It's href="../users.php" and should be href="users.php" because that file is in the same directory...

That's peculiar. If you look around line 70 of inc/page_header.php
you'll see it's calculated (and calculated the same way all the URLs
are) using $c->base_url which in your case must be set to '..' for some
reason.

That's calculated like:

$c->base_url = preg_replace("#/[^/]+\.php.*$#", "",$_SERVER['SCRIPT_NAME']);

though it could be overridden in your config.php I guess. This means
that a script URL like '/calendar/index.php' would have a base URL of
'/calendar', which seems right to me.

Cheers,
Andrew.

------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
Bank error in your favor. Collect $200.
------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.morphoss.com/pipermail/davical-users/attachments/20091016/931c14d0/attachment.pgp>
-------------- next part --------------
problems with v0.9.7.4 [ In reply to ]
Hi Andrew,

> I really *wish* drivers_ldap didn't include DAViCalUser.php - I think
> there needs to be an intermediate object which can be included in such
> places, without pulling in all of the UI stuff that's coded into that
> one.
Yepp :-)
But what's wrong with "include_once" and "required_once"?
I don't think their counterparts without "once" are much more efficiant...


> That's peculiar. If you look around line 70 of inc/page_header.php
> you'll see it's calculated (and calculated the same way all the URLs
> are) using $c->base_url which in your case must be set to '..' for some
> reason.
Huh???
I don't understand - in index.php, line 34 there is a hardcoded
href="../users.php" - no "$c->base_url" is used here.
So I tries to search the users.php one directory up to the htdocs directory,
from which the "index.php" has been called.
And the file is actually in the same dircteory - so how shall this work?
Or am I missing some "magic"?

I'm currently at home, (lying in bed with a cold) - so I'm unable to look at my DAViCal installations to print out the base_url (or
other things)...
But as soon as I'm convalesced I'll have a look and tell you!

kind regards,
Matthias




HELPING HEADS for Hard- and Software
-------------------------------------------------------------------------
Fuer Ihre Projekte entwickeln wir massgeschneiderte Loesungen - schnell,
flexibel und direkt vor Ort. Unser eingespieltes Team an erfahrenen Hard-
und Software-Spezialisten unterstuetzt Sie dort, wo Sie uns brauchen.



--------------------------------------------------------------------------
SysDesign GmbH
Saentisstrasse 25
D-88079 Kressbronn am Bodensee

Geschaeftsfuehrer: Franz Kleiner
Handelsregister: Ulm 632138
--------------------------------------------------------------------------
problems with v0.9.7.4 [ In reply to ]
On Sun, 2009-10-18 at 11:32 +0200, Matthias Mohr wrote:
> Hi Andrew,
>
> > I really *wish* drivers_ldap didn't include DAViCalUser.php - I think
> > there needs to be an intermediate object which can be included in such
> > places, without pulling in all of the UI stuff that's coded into that
> > one.
> Yepp :-)
> But what's wrong with "include_once" and "required_once"?
> I don't think their counterparts without "once" are much more efficiant...

Turns out that your intuition is wrong on that. Sure, efficiency
differences on these things aren't huge, but the _once variants need to
do quite a bit more work.


> > That's peculiar. If you look around line 70 of inc/page_header.php
> > you'll see it's calculated (and calculated the same way all the URLs
> > are) using $c->base_url which in your case must be set to '..' for some
> > reason.
> Huh???
> I don't understand - in index.php, line 34 there is a hardcoded
> href="../users.php" - no "$c->base_url" is used here.

Ah, OK. I thought you meant the link in the menus. I actually think
that front page text needs some thorough editing, so I'm happy to accept
patches for it...

Certainly that one could be changed to use $c->base_url, and I've
committed that fix right now.

Cheers,
Andrew.

------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
Don't worry. Life's too long.
-- Vincent Sardi, Jr.
------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.morphoss.com/pipermail/davical-users/attachments/20091018/e38f4199/attachment.pgp>
-------------- next part --------------