[gollem] Simple Changes
Chuck Hagenbuch
chuck@horde.org
Tue, 16 Jul 2002 15:00:25 -0400
Quoting Michael Varghese <mike.varghese@ascellatech.com>:
> I noticed some a small error in horde/lib/VFS/file.php and I changed some
> code in gollem/view.php to check if there was an error in reading the
> file data. If there was no error, then download the file, else notify the
> user.
Both committed, thanks. Btw, make sure to take a read through
horde/docs/CODING_STANDARDS:
> > if (!PEAR::isError($data)) {
> > $browser->downloadHeaders($filename);
> > echo $data;
> > }
> > else {
...
----------------------
[2] Control Structures
======================
These include if, for, while, switch, etc. Here is an example if statement,
since it is the most complicated of them:
if ((condition1) || (condition2)) {
action1;
} elseif ((condition3) && (condition4)) {
action2;
} else {
defaultaction;
}
Control statements should have one space between the control keyword
and opening parenthesis, to distinguish them from function calls.
Do not omit the curly braces under any circumstance. In the case of a
large number of short tests and actions, the following is acceptable:
if (condition) { action; }
if (condition 2) { action 2; }
...
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"After a few minutes the most aromatic and nice smelling Italian coffee
will come out of the exhaustpipe." - Our stove-top espresso pot