[Fusionforge-commits] FusionForge branch 6.0 updated. 855c7ee forum: properly apply permissions on /forum

Sylvain Beucler beuc-inria at libremir.placard.fr.eu.org
Wed Jun 10 12:24:26 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.0 has been updated
       via  855c7ee0b6b9df429b36ad91225aa0fa3f0e69d1 (commit)
      from  3d61c0b337476d6dd04c577de781de29e410a3ae (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 855c7ee0b6b9df429b36ad91225aa0fa3f0e69d1
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Wed Jun 10 12:24:10 2015 +0200

    forum: properly apply permissions on /forum

diff --git a/src/db/20140710-forum-migrate-attachments-to-fs.php b/src/db/20140710-forum-migrate-attachments-to-fs.php
index 89d7593..b90e478 100644
--- a/src/db/20140710-forum-migrate-attachments-to-fs.php
+++ b/src/db/20140710-forum-migrate-attachments-to-fs.php
@@ -29,14 +29,14 @@ require_once $gfcommon.'forum/ForumStorage.class.php';
 ini_set('memory_limit', -1);
 ini_set('max_execution_time', 0);
 
-$data = forge_get_config('data_path');
-if (!is_dir($data)) {
-	system("mkdir -p $data");
-	system("chmod 0755 $data");
+$data_path = forge_get_config('data_path');
+if (!is_dir($data_path)) {
+	system("mkdir -p $data_path");
+	system("chmod 0755 $data_path");
 }
 if (!is_dir("$data/forum")) {
-	system("mkdir $data/forum");
-	system("chmod 0700 $data/forum");
+	system("mkdir $data_path/forum");
+	system("chmod 0700 $data_path/forum");
 }
 
 $fs = new ForumStorage();
@@ -110,6 +110,6 @@ while($row = db_fetch_array($res)) {
 	db_query_params('UPDATE forum_pending_attachment set filedata = $1 where attachmentid = $2', array(0, $row['attachmentid']));
 }
 
-system("chown -R ".forge_get_config('apache_user').':'.forge_get_config('apache_group')." $data/forum");
+system("chown -R ".forge_get_config('apache_user').':'.forge_get_config('apache_group')." $data_path/forum");
 
 echo "SUCCESS\n";

-----------------------------------------------------------------------

Summary of changes:
 src/db/20140710-forum-migrate-attachments-to-fs.php | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/db/20140710-forum-migrate-attachments-to-fs.php b/src/db/20140710-forum-migrate-attachments-to-fs.php
index 89d7593..b90e478 100644
--- a/src/db/20140710-forum-migrate-attachments-to-fs.php
+++ b/src/db/20140710-forum-migrate-attachments-to-fs.php
@@ -29,14 +29,14 @@ require_once $gfcommon.'forum/ForumStorage.class.php';
 ini_set('memory_limit', -1);
 ini_set('max_execution_time', 0);
 
-$data = forge_get_config('data_path');
-if (!is_dir($data)) {
-	system("mkdir -p $data");
-	system("chmod 0755 $data");
+$data_path = forge_get_config('data_path');
+if (!is_dir($data_path)) {
+	system("mkdir -p $data_path");
+	system("chmod 0755 $data_path");
 }
 if (!is_dir("$data/forum")) {
-	system("mkdir $data/forum");
-	system("chmod 0700 $data/forum");
+	system("mkdir $data_path/forum");
+	system("chmod 0700 $data_path/forum");
 }
 
 $fs = new ForumStorage();
@@ -110,6 +110,6 @@ while($row = db_fetch_array($res)) {
 	db_query_params('UPDATE forum_pending_attachment set filedata = $1 where attachmentid = $2', array(0, $row['attachmentid']));
 }
 
-system("chown -R ".forge_get_config('apache_user').':'.forge_get_config('apache_group')." $data/forum");
+system("chown -R ".forge_get_config('apache_user').':'.forge_get_config('apache_group')." $data_path/forum");
 
 echo "SUCCESS\n";


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list