[chora] Diffs aren't shown
Alexander Skwar
lists.ASkwar at email-server.info
Fri Apr 18 15:31:47 PDT 2003
Jan Schneider wrote:
> It does: Horde::getTempDir()
> I just wanted to ask you, why you don't want to use that but pass the tmp
> dir around as a parameter. ;-)
Ah, okay. The attached patch now uses getTempDir().
However, that's not what I meant. It's still necessary to do
putenv('TMPDIR=' . Horde::getTempDir())
at the right spot.
I meant, that Horde should do this; maybe in horde/lib/base.php, so that
TMPDIR (the environment variable) is set to a "sane" value throughout
all of Horde.
Alexander Skwar
--
The PROPER way to handle HTML postings is to cancel the article, then
hire a hitman to kill the poster, his wife and kids, and fuck his dog
and smash his computer into little bits. Anything more is just extremism.
-------------- next part --------------
Index: lib/CVSLib/Diff.php
===================================================================
RCS file: /repository/chora/lib/CVSLib/Diff.php,v
retrieving revision 1.27
diff -u -r1.27 Diff.php
--- lib/CVSLib/Diff.php 25 Dec 2002 16:13:24 -0000 1.27
+++ lib/CVSLib/Diff.php 18 Apr 2003 12:27:28 -0000
@@ -76,7 +76,11 @@
$command .= ' < "' . __FILE__ . '"';
}
+ $old_tmpdir = getenv('TMPDIR');
+ echo "Horde::getTempDir(): " . Horde::getTempDir() . "<br>";
+ putenv('TMPDIR=' . Horde::getTempDir());
exec($command, $diff, $retval);
+ putenv('TMPDIR=' . $old_tmpdir);
return ($retval > 0) ? $diff : array();
}
More information about the chora
mailing list