[Fusionforge-commits] FusionForge branch master updated. 0ce0924a3bb1d0503927afb6f32e87bd6358ff55

Thorsten Glaser mirabilos at fusionforge.org
Thu Nov 8 11:14:29 CET 2012


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, master has been updated
       via  0ce0924a3bb1d0503927afb6f32e87bd6358ff55 (commit)
       via  2fec15504b6edb704b65a2fe9d47584b1e9ea7c0 (commit)
       via  27ee476b7e0a95fea2ee4262e0516812a7fb62e1 (commit)
       via  db994d6ebdbc316139c6c6b517dd42bafed895b7 (commit)
       via  a9d0c6c5914f334db93321165c9caa3526bd662d (commit)
       via  6c69596a96cbe157a057141abd399fd91c0b32c0 (commit)
       via  9a4c8be063bc66cb9e5b5a24e276c117210d12f9 (commit)
       via  f16d5f11011bea4570963a436fa253a7f207b035 (commit)
       via  ff387e15c5b11417c02924f36ad66ef6b7ae0d71 (commit)
       via  bb0df27657494bf4db90bab6561f6ea40b690bc3 (commit)
       via  30af484c38036c6486b4169901d3650628854673 (commit)
       via  b5851f98d43da91491f85c97d8aa2cedd96c548e (commit)
      from  8161e7240f623dac5744e272ec5c75927bae8edd (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 0ce0924a3bb1d0503927afb6f32e87bd6358ff55
Merge: 8161e72 2fec155
Author: Thorsten Glaser <tg at mirbsd.org>
Date:   Thu Nov 8 11:14:11 2012 +0100

    merge forum and sortable fixes from branch 'Branch_5_2' into master

diff --cc src/common/forum/Forum.class.php
index 4af364a,697f406..a9acc78
--- a/src/common/forum/Forum.class.php
+++ b/src/common/forum/Forum.class.php
@@@ -138,12 -154,15 +154,12 @@@ class Forum extends Error 
  	 *
  	 * @param	string	The name of the forum.
  	 * @param	string	The description of the forum.
 -	 * @param	int	Pass (1) if it should be public (0) for private.
  	 * @param	string	The email address to send all new posts to.
  	 * @param	int	Pass (1) if a welcome message should be created (0) for no welcome message.
 -	 * @param	int	Pass (1) if we should allow non-logged-in users to post (0) for mandatory login.
 -	 * @param	int	Pass (0) if the messages that are posted in the forum should go to moderation before available. 0-> no moderation 1-> moderation for anonymous and non-project members 2-> moderation for everyone
  	 * @return	boolean	success.
  	 */
 -	function create($forum_name,$description,$is_public=1,$send_all_posts_to='',$create_default_message=1,$allow_anonymous=1,$moderation_level=0) {
 +	function create($forum_name,$description,$send_all_posts_to='',$create_default_message=1) {
- 		if (strlen($forum_name) < 3) {
+ 		if (!$this->is_news && strlen($forum_name) < 3) {
  			$this->setError(_('Forum Name Must Be At Least 3 Characters'));
  			return false;
  		}
diff --cc src/common/forum/ForumAdmin.class.php
index 16dd66a,5ac7408..c9aadd1
--- a/src/common/forum/ForumAdmin.class.php
+++ b/src/common/forum/ForumAdmin.class.php
@@@ -34,7 -35,12 +35,12 @@@ class ForumAdmin extends Error 
  		if ($group_id) {
  			$this->group_id = $group_id;
  			$this->g = group_get_object($group_id);
 -			$this->p =& $this->g->getPermission ();
 +			$this->p =& $this->g->getPermission();
+ 			if (!$this->g->usesForum()) {
+ 				$this->setError(sprintf(_('%s does not use the Forum tool'),
+ 				    $this->g->getPublicName()));
+ 				return false;
+ 			}
  		}
  	}
  
diff --cc src/www/news/submit.php
index 271e762,797666a..ca8eb4e
--- a/src/www/news/submit.php
+++ b/src/www/news/submit.php
@@@ -91,8 -91,8 +91,8 @@@ if (session_loggedin()) 
  			*/
  
  			db_begin();
- 			$f = new Forum($group);
+ 			$f = new Forum($group, false, false, true);
 -			if (!$f->create(preg_replace('/[^_\.0-9a-z-]/','-', strtolower($summary)),$details,1,'',0,0)) {
 +			if (!$f->create(preg_replace('/[^_\.0-9a-z-]/','-', strtolower($summary)),$details,'')) {
  				db_rollback();
  				exit_error($f->getErrorMessage(),'news');
  			}

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

Summary of changes:
 src/common/forum/Forum.class.php        |   24 ++++++--
 src/common/forum/ForumAdmin.class.php   |    6 ++
 src/common/forum/ForumFactory.class.php |    5 ++
 src/common/include/RBAC.php             |    3 +
 src/www/forum/admin/index.php           |    4 ++
 src/www/js/sortable.js                  |   99 +++++++++++++++++++++++++------
 src/www/news/submit.php                 |    2 +-
 7 files changed, 119 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list