[horde] icalendar "import to my calendar" error

Damian Fernandez damlists at tatu.cnba.uba.ar
Wed Nov 27 21:09:58 PST 2002


Please excuse my english.

I'm reading all the horde code and trying to understand it so I can do
better contributions to horde.

I find the following error:



In the function getTitle Line 193 of the file kronolith/lib/Event.php 

the "import to my calendar function fails with this error:
Fatal error: Call to undefined function: haspermission() in
/var/www/mailnew/horde/kronolith/lib/Event.php on line 193


the function $this->getCalendar()  returns "", and because of this, 
&$GLOBALS['shares']->getShare() returns a pear_error object instead of a
"share" object
the "print_r" of the pear error is: 
"
pear_error Object
(
    [error_message_prefix] => 
    [mode] => 1
    [level] => 1024
    [code] => 
    [message] =>  not found
    [userinfo] => 
    [callback] => 
)
"

I think the error isn't handled and it must be handled before the 

"if ($share->hasPermission(Auth::getAuth(), _PERMS_READ)) { ......"


also I don't know why the $this->getCalendar() function returns "" (i
have 2 calendars configured)


$share = &$GLOBALS['shares']->getShare($this->getCalendar());


function getTitle()
    {
        if (!$this->isInitialized()) {
            return '';
       }

        $share = &$GLOBALS['shares']->getShare($this->getCalendar());
        if ($share->hasPermission(Auth::getAuth(), _PERMS_READ)) {
            return $this->title;
        } else {
            global $prefs;
            return sprintf(_("Event from %s to %s"),
                          
$this->getStartDate($prefs->getValue('twentyFour') ? 'G:i' : 'g:ia'),
                          
$this->getEndDate($prefs->getValue('twentyFour') ? 'G:i' : 'g:ia'));
        }




Hope this can help finding bugs






More information about the horde mailing list