summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 90ae103)
raw | patch | inline | side by side (parent: 90ae103)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 2 Aug 2010 13:41:35 +0000 (13:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 2 Aug 2010 13:41:35 +0000 (13:41 +0000) |
-Added property type file
Updated stats
-Added several checks
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19343 594d385d-05f5-0310-b6e9-bd551577e9d8
Updated stats
-Added several checks
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19343 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_configRegistry.inc | patch | blob | history | |
gosa-core/include/class_stats.inc | patch | blob | history |
diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc
index a1ea7b319210ffe2e0878a1b1edebab6902aa707..f895a3dac561ef9a0c1a8c04d3c426c7beb37f3c 100644 (file)
static function isWriteableFile($message,$class,$name,$value, $type)
{
- $match = !empty($value) && (is_file($value) || is_writeable($value));
+ $match = (file_exists($value) && is_writeable($value)) ||
+ (!file_exists($value) && is_writeable(dirname($value)));
+
// Display the reason for failing this check.
if($message && ! $match){
- if(!is_writeable($value) || !is_file($value)){
+
+ if(!file_exists($value) && !is_writeable(dirname($value))){
+ msg_dialog::display(_("Warning"),
+ sprintf(_("The file '%s' specified for '%s:%s' cannot be created neither be used for writing!"),
+ bold($value),bold($class),bold($name)),
+ WARNING_DIALOG);
+ }elseif(file_exists($value) && !is_writeable($value)){
msg_dialog::display(_("Warning"),
sprintf(_("The file '%s' specified for '%s:%s' cannot be used for writing!"),
bold($value),bold($class),bold($name)),
index b64ebe1e4f0cbc146951b8dae0d73c52f30f4e8d..9d6517c3d3cf4d882bfc58987afd4303c96af44e 100644 (file)
}
// Check if we are able to read/write the given database file.
- if(!is_writeable(stats::$tableFile)){
+ if(!is_writeable(stats::$tableFile) && !is_writeable(dirname(stats::$tableFile))){
return(NULL);
}