diff --git a/ajax/upload.html b/ajax/upload.html
index 4cc0997..01c2688 100644
--- a/ajax/upload.html
+++ b/ajax/upload.html
@@ -19,9 +19,14 @@ function storeUploadedFile( $path )
return '415 Unsupported Media Type';
}
- if ( ! is_dir( $path ) && ! mkdir( $path, 0777, TRUE ) )
+ if ( ! is_dir( $path ) )
{
- return '404 Not Found';
+ if ( ! mkdir( $path, 0777, TRUE ) )
+ {
+ return '404 Not Found';
+ }
+
+ chmod( $path, 0777 );
}
if ( ! is_writable( $path ) )
diff --git a/api/functions.php b/api/functions.php
index 9c24645..acc787e 100644
--- a/api/functions.php
+++ b/api/functions.php
@@ -14,6 +14,11 @@
$query = "SELECT DISTINCT d.`keywords` FROM `%content` c, `%data_image` d WHERE c.`id` = d.`vtid` AND c.`path` LIKE '%,{$id_home},%' AND c.`userID` != 52 AND RIGHT( c.`accessRights`, 1 ) >= 4";
$result = v::query( $query );
$index = '';
+
+ if ( ! $result->num_rows )
+ {
+ return '[]';
+ }
while ( $row = $result->fetch_assoc() )
{
@@ -23,7 +28,7 @@
$index = array_unique( explode( ',', utf8_encode( $index ) ) );
sort( $index );
- while ( trim( $index[0] ) == '' )
+ while ( isset( $index[0] ) && trim( $index[0] ) == '' )
{
array_shift( $index );
}
diff --git a/downloadlog.html b/downloadlog.html
index 7bdb3b6..ee7d303 100644
--- a/downloadlog.html
+++ b/downloadlog.html
@@ -48,6 +48,14 @@
) ENGINE=MyISAM DEFAULT CHARSET=latin1
}}
{{vtEndIf}}
+
+ {{Optionen: checkbox, [ { "text":"Bildpfade als Links darstellen", "value":"linkImages"} ] }}
+
+ {{vtIf: {Optionen} .cn. linkImages }}
+ {{vtUse: {vtGet:ID_Bilder} }}
+ {{vtSet: Bilder = "/{vtName}" }}
+ {{vtEndUse}}
+ {{vtEndIf}}
-->
@@ -72,7 +80,18 @@
{{vtDbField:realname}} |
{{vtDbField:organization}} |
{{vtDbField:type}} |
- {{vtDbField:image_path}} |
+
+
+
+ {{vtDbField:image_path}}
+
+ {{vtDbField:image_path}}
+
+ |
diff --git a/imagelist._onchange.html b/imagelist._onchange.html
index 60463ae..b0acb58 100644
--- a/imagelist._onchange.html
+++ b/imagelist._onchange.html
@@ -96,10 +96,12 @@
{{vtDo: -act="update", -obj="{vtID}", -properties[sortField]="{vtGet:sortField}", -properties[sortOrder]="{vtGet:sortOrder}", -properties[protected]="{vtGet:protected}", fs_status="{vtGet:fs_status}" }}
-{{vtCalc: basename('{Verzeichnis:escaped}') }}
-{{vtSet: CorrectName }}
-{{vtCalc: '{vtName:escaped}' != '{vtGet:CorrectName}' ? 1 : 0 }}
+{{vtIf: {Verzeichnis} .neq. - }}
+ {{vtCalc: basename('{Verzeichnis:escaped}') }}
+ {{vtSet: CorrectName }}
+ {{vtCalc: '{vtName:escaped}' != '{vtGet:CorrectName}' ? 1 : 0 }}
-{{vtIf: {vtResult} .eq. 1 }}
- {{vtDo: -act="update", -obj="{vtID}", -properties[name]="{vtGet:CorrectName}", -force="1" }}
+ {{vtIf: {vtResult} .eq. 1 }}
+ {{vtDo: -act="update", -obj="{vtID}", -properties[name]="{vtGet:CorrectName}", -force="1" }}
+ {{vtEndIf}}
{{vtEndIf}}
diff --git a/includes/functions.html b/includes/functions.html
index c07266c..db8a7d3 100644
--- a/includes/functions.html
+++ b/includes/functions.html
@@ -455,6 +455,7 @@
{{vtIf: {vtGlobal:pxtcLocalAccess} .eq. direct .or. {vtFtpCheck} .neq. 1 }}
{{vtCalc: mkdir( '{vtGlobal:pxtcPathHires}{vtArg:Target_Path}', 0777, TRUE ) }}
+ {{vtCalc: chmod( '{vtGlobal:pxtcPathHires}{vtArg:Target_Path}', 0777 ) }}
{{vtCalc: rename( '{vtGlobal:pxtcPathHires}{vtArg:Object_Path}', '{vtGlobal:pxtcPathHires}{vtArg:Target_Path}/{vtGet:Object_Name}' ) ? 1 : 0 }}
{{vtIf: {vtResult} .eq. 0 }}
{{vtCalc: rename( '{vtGlobal:pxtcPathLores}{vtArg:Target_Path}/{vtGet:Object_Name}', '{vtGlobal:pxtcPathLores}{vtArg:Object_Path}' ) }}
diff --git a/lib/image_processor.class.php b/lib/image_processor.class.php
index 4f18f57..a42b42d 100644
--- a/lib/image_processor.class.php
+++ b/lib/image_processor.class.php
@@ -349,6 +349,7 @@ class Image_Processor {
$meta->write( $file );
}
+ @chmod( $file, 0644 );
return TRUE;
}
diff --git a/register.html b/register.html
index ad636ff..96a6e34 100755
--- a/register.html
+++ b/register.html
@@ -86,7 +86,7 @@
return false;
}
- if( ! f.username.value.match(/^[a-zA-Z0-9._-]+$/) ){
+ if( ! f.username.value.match(/^[a-zA-Z0-9._@-]+$/) ){
alert('{{vtGet:s_msg_0057}}');
f.username.focus();
return false;
diff --git a/resources/functions.php b/resources/functions.php
index 5d1ff7a..f6d4427 100644
--- a/resources/functions.php
+++ b/resources/functions.php
@@ -35,6 +35,8 @@ function makeThumbnail( $image, $force = FALSE )
{
return -11; // Creation of thumbnails directory failed
}
+
+ chmod( $path, 0777 );
}
if ( ! is_writable( $path ) )
@@ -1075,10 +1077,13 @@ function checkLocalDirectory( $dir )
return is_writable( $dir ) ? 1 : -2;
}
- $umask = umask( 0 );
- $result = mkdir( $dir, octdec( '777' ), TRUE ) ? 1 : -3;
- umask( $umask );
- return $result;
+ if ( ! mkdir( $dir, 0777, TRUE ) )
+ {
+ return -3;
+ }
+
+ chmod( $dir, 0777 );
+ return 1;
}
@@ -1746,18 +1751,12 @@ function create_zip_file( $name, $basedir, $files )
{
$tempdir = v::vtconfig('pathToVirthos') . '/data/temp';
- if ( ! file_exists( $tempdir ) )
+ if ( ! file_exists( $tempdir ) && ! @mkdir( $tempdir ) )
{
- $old_umask = umask( 0 );
- $result = @mkdir( $tempdir, 0777 );
- umask( $old_umask );
-
- if ( ! $result )
- {
- return -1; // could not create temp directory
- }
+ return -1; // could not create temp directory
}
+ chmod( $tempdir, 0777 );
$tempurl = v::vtconfig('baseURL') . 'data/temp/';
}
@@ -1786,8 +1785,6 @@ function create_zip_file( $name, $basedir, $files )
/*** Create zip directory ***/
- $old_umask = umask( 0 );
-
for ( $i = 1; $i <= 20; $i++ )
{
$tempname = md5( microtime() . rand() );
@@ -1796,11 +1793,10 @@ function create_zip_file( $name, $basedir, $files )
if ( mkdir( $zipdir, 0777 ) )
{
break;
+ chmod( $zipdir, 0777 );
}
}
- umask( $old_umask );
-
if ( empty( $zipdir ) || ! file_exists( $zipdir ) )
{
return -2; // could not create temp subdirectory
@@ -2142,6 +2138,8 @@ function update_lores_image( $image_path, $force = FALSE )
{
return -11; // Creation of Low-res directory failed
}
+
+ chmod( $path, 0777 );
}
if ( ! is_writable( $path ) )
diff --git a/setup_delivery.vtedit.html b/setup_delivery.vtedit.html
index 66db5b5..22f0f52 100644
--- a/setup_delivery.vtedit.html
+++ b/setup_delivery.vtedit.html
@@ -184,7 +184,7 @@
Liefermethoden