Patchs sur des warnings à la création d'un membre

This commit is contained in:
Alan Garcia 2013-01-21 14:51:33 +00:00
parent 2d72d3e069
commit 7a49d30792
2 changed files with 2 additions and 2 deletions

View File

@ -965,7 +965,7 @@ class m_dom {
$db->next_record();
if ($db->f('create_tmpdir')) {
if (! is_dir($dest_root . "/tmp")) {
if(!mkdir($dest_root . "/tmp")){
if(!mkdir($dest_root . "/tmp",0770,true)){
$err->raise("dom",_("Cannot write to the destination folder"));
}
}

View File

@ -185,7 +185,7 @@ class m_quota {
exec("sudo /usr/lib/alternc/quota_edit $cuid $size &> /dev/null &");
// Now we check that the value has been written properly :
exec("sudo /usr/lib/alternc/quota_get $cuid &> /dev/null &",$a);
if ($size!=$a[1]) {
if (!isset($a[1]) || $size!=$a[1]) {
$err->raise("quota",_("Error writing the quota entry!"));
return false;
}