[sync] Sync4j and Outlook

Chuck Hagenbuch chuck at horde.org
Thu Oct 5 09:58:49 PDT 2006


Quoting Muskingum Web Manager <webmgr at muskingum.edu>:

> OK guys, in Sync4j.php, it seems like the following code in function
> sif2vtodo...
>
> 	$vtodo->setAttribute('COMPLETED', $a['Complete'] == 'True' ? 1 : 0);
>
> ... is not tracking the "Completed" status of tasks properly, although I'm
> unclear why.
>
> First question is-- what does "$a['Complete'] == 'True' ? 1 : 0" actually
> do... not sure what the parameters mean.

It does the same thing as:

if ($a['Complete'] == 'True') {
     $vtodo->setAttribute('COMPLETED', 1);
} else {
     $vtodo->setAttribute('COMPLETED', 0);
}

It's called the ternary operator if you want to look up more info.

-chuck

-- 
"we are plastered to the windshield of the bus that is time." - Chris


More information about the sync mailing list