7 |
#-------------------------------------------------- |
#-------------------------------------------------- |
8 |
+##create the upload_tmp_folder in the ibay if PHPTmpDir is set to 'enabled' |
+##create the upload_tmp_folder in the ibay if PHPTmpDir is set to 'enabled' |
9 |
+my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled'; |
+my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled'; |
10 |
+$tmpdir = ('/home/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled'; |
+$tmpdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled'; |
11 |
+mkdir $tmpdir unless (-d $tmpdir || $tmpdir eq "disabled"); |
+mkdir $tmpdir unless (-d $tmpdir || $tmpdir eq "disabled"); |
12 |
|
|
13 |
chdir "/home/e-smith/files/ibays/$ibayName" |
chdir "/home/e-smith/files/ibays/$ibayName" |
17 |
chmod $experm, $_; |
chmod $experm, $_; |
18 |
} |
} |
19 |
+ ##chmod 0700 ; chown www:www if upload_tmp_folder exists |
+ ##chmod 0700 ; chown www:www if upload_tmp_folder exists |
20 |
+ my $tmpdirperm = (('/home/e-smith/files/ibays/' . $ibay->key . '/tmp')||''); |
+ my $tmpdirperm = (('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp')||''); |
21 |
+ if ( -d $tmpdirperm) |
+ if ( -d $tmpdirperm) |
22 |
+ { |
+ { |
23 |
+ system ('/bin/chown', '-R', 'www:www' , $tmpdirperm); |
+ system ('/bin/chown', '-R', 'www:www' , $tmpdirperm); |
53 |
+ #Then we retrieve the name of the ebay |
+ #Then we retrieve the name of the ebay |
54 |
+ my $key = $ibay->key; |
+ my $key = $ibay->key; |
55 |
+ my $tmpdb = $ibay->prop('PHPTmpDir') || 'enabled'; |
+ my $tmpdb = $ibay->prop('PHPTmpDir') || 'enabled'; |
56 |
+ my $path = (('/home/e-smith/files/ibays/') . $key . '/tmp'); |
+ my $path = (('/var/cache/e-smith/files/ibays/') . $key . '/tmp'); |
57 |
+ |
+ |
58 |
+ #we test the condition if /tmp exists or if it is disabled in the Ibay |
+ #we test the condition if /tmp exists or if it is disabled in the Ibay |
59 |
+ unless (-d $path || $tmpdb eq "disabled") |
+ unless (-d $path || $tmpdb eq "disabled") |
65 |
+ |
+ |
66 |
exit (0); |
exit (0); |
67 |
|
|
68 |
diff -Nur e-smith-ibays-2.4.0/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore |
diff -Nur e-smith-ibays-2.4.0/root/var/cache/e-smith/files/ibay/.cvs_ignore e-smith-ibays-2.4.0.bz7011/root/var/cache/e-smith/files/ibay/.cvs_ignore |
69 |
--- e-smith-ibays-2.4.0/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore 1970-01-01 01:00:00.000000000 +0100 |
--- e-smith-ibays-2.4.0/root/var/cache/e-smith/files/ibay/.cvs_ignore 1970-01-01 01:00:00.000000000 +0100 |
70 |
+++ e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore 2015-01-03 23:58:20.889702229 +0100 |
+++ e-smith-ibays-2.4.0.bz7011/root/var/cache/e-smith/files/ibay/.cvs_ignore 2015-01-03 23:58:20.889702229 +0100 |
71 |
@@ -0,0 +1 @@ |
@@ -0,0 +1 @@ |
72 |
+#added to create the /etc/e-smith/skel/ibay/tmp folder |
+#added to create the /var/cache/e-smith/files/ibays folder |