[Fusionforge-commits] r7156 - in trunk/gforge: common/include www/admin www/register

Alexandre Neymann neymanna at libremir.placard.fr.eu.org
Thu Mar 12 10:57:48 CET 2009


Author: neymanna
Date: 2009-03-12 10:57:48 +0100 (Thu, 12 Mar 2009)
New Revision: 7156

Modified:
   trunk/gforge/common/include/Group.class.php
   trunk/gforge/www/admin/groupedit.php
   trunk/gforge/www/register/projectinfo.php
Log:
remove the use of license in the project registration and administration

Modified: trunk/gforge/common/include/Group.class.php
===================================================================
--- trunk/gforge/common/include/Group.class.php	2009-03-11 22:05:01 UTC (rev 7155)
+++ trunk/gforge/common/include/Group.class.php	2009-03-12 09:57:48 UTC (rev 7156)
@@ -277,11 +277,9 @@
 	 *  @param	string	The full name of the user.
 	 *  @param	string	The Unix name of the user.
 	 *  @param	string	The new group description.
-	 *  @param	int	The ID of the license to use.
-	 *  @param	string	The 'other' license to use if any.
 	 *  @param	string	The purpose of the group.
 	 */
-	function create(&$user, $group_name, $unix_name, $description, $license, $license_other, $purpose, $unix_box='shell1', $scm_box='cvs1', $is_public=1) {
+	function create(&$user, $group_name, $unix_name, $description, $purpose, $unix_box='shell1', $scm_box='cvs1', $is_public=1) {
 		// $user is ignored - anyone can create pending group
 
 		if ($this->getID()!=0) {
@@ -308,15 +306,6 @@
 		} else if (strlen($description)>255) {
 			$this->setError(_('Your project description is too long. Please make it smaller than 256 bytes.'));
 			return false;
-		} else if (!$license) {
-			$this->setError(_('You have not chosen a license'));
-			return false;
-		} else if ($license!=GROUP_LICENSE_OTHER && $license_other) {
-			$this->setError(_('Conflicting licenses choice'));
-			return false;
-		} else if ($license==GROUP_LICENSE_OTHER && strlen($license_other)<50) {
-			$this->setError(_('Please give more comprehensive licensing description'));
-			return false;
 		} else {
 
 			srand((double)microtime()*1000000);
@@ -335,14 +324,12 @@
 					status,
 					unix_box,
 					scm_box,
-					license,
 					register_purpose,
 					register_time,
-					license_other,
                                         enable_anonscm,
 					rand_hash
 				)
-				VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15)',
+				VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)',
 						array (htmlspecialchars ($group_name),
 						       $is_public,
 						       $unix_name,
@@ -352,10 +339,8 @@
 						       'P',
 						       $unix_box,
 						       $scm_box,
-						       $license,
 						       htmlspecialchars($purpose),
 						       time(),
-						       htmlspecialchars($license_other),
 						       $is_public,
 						       md5($random_num)	)) ;
 			if (!$res || db_affected_rows($res) < 1) {
@@ -416,14 +401,13 @@
 	 *
 	 *	@param	object	User requesting operation (for access control).
 	 *	@param	bool	Whether group is publicly accessible (0/1).
-	 *	@param	string	Project's license (string ident).
 	 *	@param	int		Group type (1-project, 2-foundry).
 	 *	@param	string	Machine on which group's home directory located.
 	 *	@param	string	Domain which serves group's WWW.
 	 *	@return status.
 	 *	@access public.
 	 */
-	function updateAdmin(&$user, $is_public, $license, $type_id, $unix_box, $http_domain) {
+	function updateAdmin(&$user, $is_public, $type_id, $unix_box, $http_domain) {
 		$perm =& $this->getPermission($user);
 
 		if (!$perm || !is_object($perm)) {
@@ -440,11 +424,10 @@
 
 		$res = db_query_params ('
 			UPDATE groups
-			SET is_public=$1, license=$2, type_id=$3,
-				unix_box=$4, http_domain=$5
-			WHERE group_id=$6',
+			SET is_public=$1, type_id=$2,
+				unix_box=$3, http_domain=$4
+			WHERE group_id=$5',
 					array ($is_public,
-					       $license,
 					       $type_id,
 					       $unix_box,
 					       $http_domain,
@@ -460,9 +443,6 @@
 		if ($is_public != $this->isPublic()) {
 			$this->addHistory('is_public', $this->isPublic());
 		}
-		if ($license != $this->data_array['license']) {
-			$this->addHistory('license', $this->data_array['license']);
-		}
 		if ($type_id != $this->data_array['type_id']) {
 			$this->addHistory('type_id', $this->data_array['type_id']);
 		}
@@ -2277,15 +2257,13 @@
 
 Project Full Name:  %2$s
 Submitted Description: %3$s
-License: %4$s
-Submitter: %6$s (%7$s)
+Submitter: %5$s (%6$s)
 
 Please visit the following URL to approve or reject this project:
-%5$s'),
+%4$s'),
 						       $GLOBALS['sys_name'],
 						       $this->getPublicName(),
 						       util_unconvert_htmlspecialchars($this->getRegistrationPurpose()),
-						       $this->getLicenseName(), 
 						       util_make_url ('/admin/approve-pending.php'),
 						       $submitter->getRealName(), 
 						       $submitter->getUnixName()));
@@ -2301,9 +2279,8 @@
 
 Project Full Name:  %2$s
 Submitted Description: %3$s
-License: %4$s
 
-The %1$s admin team will now examine your project submission.  You will be notified of their decision.'), $GLOBALS['sys_name'], $this->getPublicName(), util_unconvert_htmlspecialchars($this->getRegistrationPurpose()), $this->getLicenseName(), $GLOBALS['sys_default_domain']));
+The %1$s admin team will now examine your project submission.  You will be notified of their decision.'), $GLOBALS['sys_name'], $this->getPublicName(), util_unconvert_htmlspecialchars($this->getRegistrationPurpose()), $GLOBALS['sys_default_domain']));
 				
 		util_send_message($email, sprintf(_('New %1$s Project Submitted'), $GLOBALS['sys_name']), $message);
 		setup_gettext_from_context();

Modified: trunk/gforge/www/admin/groupedit.php
===================================================================
--- trunk/gforge/www/admin/groupedit.php	2009-03-11 22:05:01 UTC (rev 7155)
+++ trunk/gforge/www/admin/groupedit.php	2009-03-12 09:57:48 UTC (rev 7156)
@@ -23,7 +23,6 @@
 
 require_once('../env.inc.php');
 require_once $gfwww.'include/pre.php';
-require_once $gfcommon.'include/license.php';
 require_once $gfwww.'admin/admin_utils.php';
 require_once $gfwww.'project/admin/project_admin_utils.php';
 
@@ -38,7 +37,7 @@
 }
 
 // This function performs very update
-function do_update(&$group, $is_public, $status, $license,
+function do_update(&$group, $is_public, $status,
 		   $group_type, $unix_box, $http_domain, $scm_box='') {
 	global $feedback;
 
@@ -50,7 +49,7 @@
 		return false;
 	}
 
-	if (!$group->updateAdmin(session_get_user(), $is_public, $license, $group_type, $unix_box, $http_domain)) {
+	if (!$group->updateAdmin(session_get_user(), $is_public, $group_type, $unix_box, $http_domain)) {
 		$feedback .= $group->getErrorMessage();
 		db_rollback();
 		return false;
@@ -72,12 +71,11 @@
 if (getStringFromRequest('submit')) {
 	$form_public = getStringFromRequest('form_public');
 	$form_status = getStringFromRequest('form_status');
-	$form_license = getStringFromRequest('form_license');
 	$form_box = getStringFromRequest('form_box');
 	$form_domain = getStringFromRequest('form_domain');
 	$form_scm_box = getStringFromRequest('form_scm_box');
 
-	do_update($group, $form_public, $form_status, $form_license,
+	do_update($group, $form_public, $form_status, 
 		  1, $form_box, $form_domain, $form_scm_box);
 
 } else if (getStringFromRequest('resend')) {
@@ -159,28 +157,7 @@
 </td>
 </tr>
 
-<tr>
-<td>
-<?php echo _('License:'); ?>
-</td>
-<td>
 <?php
-	echo license_selectbox('form_license',$group->getLicense());
-?>
-</td>
-</tr>
-<?php
-if ($group->getLicense() == GROUP_LICENSE_OTHER) {
-?>
-<tr>
-<td><?php echo _('License Other:'); ?>
-</td>
-<td>
-<?php echo $group->getLicenseOther(); ?>
-</td>
-</tr>
-<?php } ?> 
-<?php
 	global $sys_use_shell;
 	if ($sys_use_shell) {
 ?> 

Modified: trunk/gforge/www/register/projectinfo.php
===================================================================
--- trunk/gforge/www/register/projectinfo.php	2009-03-11 22:05:01 UTC (rev 7155)
+++ trunk/gforge/www/register/projectinfo.php	2009-03-12 09:57:48 UTC (rev 7156)
@@ -38,7 +38,6 @@
 
 require_once('../env.inc.php');
 require_once $gfwww.'include/pre.php';
-require_once $gfcommon.'include/license.php';
 require_once $gfcommon.'scm/SCMFactory.class.php';
 //
 //	Test if restricted project registration
@@ -56,8 +55,6 @@
 
 	$full_name = trim(getStringFromRequest('full_name'));
 	$purpose = trim(getStringFromRequest('purpose'));
-	$license = trim(getStringFromRequest('license'));
-	$license_other = trim(getStringFromRequest('license_other'));
 	$description = trim(getStringFromRequest('description'));
 	$unix_name = strtolower(getStringFromRequest('unix_name'));
 	$scm = getStringFromRequest('scm');
@@ -85,8 +82,6 @@
 			$full_name,
 			$unix_name,
 			$description,
-			$license,
-			$license_other,
 			$purpose,
 			'shell1',
 			$scm_host,
@@ -117,8 +112,6 @@
 } else {
 	$full_name = '';
 	$purpose = '';
-	$license = '';
-	$license_other = '';
 	$description = '';
 	$unix_name = '';
 	$scm = '';
@@ -143,25 +136,14 @@
 <?php echo htmlspecialchars(stripslashes($purpose)); ?>
 </textarea>
 
-<?php printf(_('<h3>3. License</h3>'), $GLOBALS['sys_name']) ?>
-
-<?php
-echo license_selectbox('license',$license);
-?>
-<?php echo _('<p>If you selected "other", please provide an explanation along with a description of your license. Realize that other licenses may not be approved. Also, it may take additional time to make a decision for such project, since we will need to check that license is compatible with the OpenSource definition.</p>') ?>
+<?php echo _('<h3>3. Project Public Description</h3><p>This is the description of your project which will be shown on the Project Summary page, in search results, etc. It should not be as comprehensive and formal as Project Purpose description (step 2), so feel free to use concise and catchy wording. Maximum length is 255 chars.</p>')?>
 <br />
-<textarea name="license_other" cols="60" rows="5">
-<?php echo htmlspecialchars(stripslashes($license_other)); ?>
-</textarea>
-
-<?php echo _('<h3>4. Project Public Description</h3><p>This is the description of your project which will be shown on the Project Summary page, in search results, etc. It should not be as comprehensive and formal as Project Purpose description (step 2), so feel free to use concise and catchy wording. Maximum length is 255 chars.</p>')?>
 <br />
-<br />
 <textarea name="description" cols="70" rows="5">
 <?php echo htmlspecialchars(stripslashes($description)); ?>
 </textarea>
 
-<?php printf(_('<h3>5. Project Unix Name</h3>In addition to full project name, you will need to choose short,"Unix" name for your project.<p/> The "Unix Name" has several restrictions because it is used in so many places around the site. They are:<ul><li>Cannot match the unix name of any other project</li><li>Must be between 3 and 15 characters in length</li><li>Must be in lower case</li><li>Can only contain characters, numbers, and dashes</li><li>Must be a valid unix username</li><li>Cannot match one of our reserved domains</li><li>Unix name will never change for this project</li></ul><p/>Your unix name is important, however, because it will be used for many things, including:<ul><li>A web site at <tt>unixname.%1$s</tt></li><li>A CVS Repository root of <tt>/cvsroot/unixname</tt> at <tt>cvs.unixname.%1$s</tt></li><li>Shell access to <tt>unixname.%1$s</tt></li><li>Search engines throughout the site</li></ul><p/>Unix Name:<br/>'), $GLOBALS['sys_default_domain']) ?>
+<?php printf(_('<h3>4. Project Unix Name</h3>In addition to full project name, you will need to choose short,"Unix" name for your project.<p/> The "Unix Name" has several restrictions because it is used in so many places around the site. They are:<ul><li>Cannot match the unix name of any other project</li><li>Must be between 3 and 15 characters in length</li><li>Must be in lower case</li><li>Can only contain characters, numbers, and dashes</li><li>Must be a valid unix username</li><li>Cannot match one of our reserved domains</li><li>Unix name will never change for this project</li></ul><p/>Your unix name is important, however, because it will be used for many things, including:<ul><li>A web site at <tt>unixname.%1$s</tt></li><li>A CVS Repository root of <tt>/cvsroot/unixname</tt> at <tt>cvs.unixname.%1$s</tt></li><li>Shell access to <tt>unixname.%1$s</tt></li><li>Search engines throughout the site</li></ul><p/>Unix Name:<br/>'), $GLOBALS['sys_default_domain']) ?>
 
 <input type="text" maxlength="15" size="15" name="unix_name" value="<?php echo htmlspecialchars(stripslashes($unix_name)); ?>"/>
 




More information about the Fusionforge-commits mailing list