Commit 03c6da767bf4c38b14bcd891eff4415326f48c5c

Make sure umask is set ok.
index.php
(8 / 4)
  
108108 // FIXME: Only do the escaping and the 2>&1 if we're not in safe mode
109109 // (otherwise it will be escaped anyway).
110110 // FIXME: Removed escapeShellCmd because it clashed with author.
111 $oldUMask = umask(0022);
111112 exec($gitCommand . " 2>&1", $output, $result);
113 $umask = $oldUMask;
112114 // FIXME: The -1 is a hack to avoid 'commit' on an unchanged repo to
113115 // fail.
114116 if ($result != 0 && $result != 1) {
115117 // FIXME: HTMLify these strings
116 print "Error running " . $gitCommand;
117 print "Error message: " . join("\n", $output);
118 print "Error code: " . $result;
118 print "<h1>Error</h1>\n<pre>\n";
119 print "$" . $gitCommand . "\n";
120 print join("\n", $output) . "\n";
121 //print "Error code: " . $result . "\n";
122 print "</pre>";
119123 }
120124 return 1;
121125 }
255255
256256 $commitMessage = addslashes("Deleted $wikiPage");
257257 $author = addslashes(getAuthorForUser(getUser()));
258 if (!git("commit --message='$commitMessage' --author='$author'")) { return; }
258 if (!git("commit --allow-empty --no-verify --message='$commitMessage' --author='$author'")) { return; }
259259 if (!git("gc")) { return; }
260260 }
261261 header("Location: $wikiHome");