[thirdparty-commits] jpeeler: mantis/trunk r49 - in /mantis/trunk/core: file_api.php license_api.php

SVN commits to the Digium third-party software repository thirdparty-commits at lists.digium.com
Thu Jan 8 14:52:45 CST 2009


Author: jpeeler
Date: Thu Jan  8 14:52:44 2009
New Revision: 49

URL: http://svn.digium.com/view/thirdparty?view=rev&rev=49
Log:
do not restrict non code submissions

Modified:
    mantis/trunk/core/file_api.php
    mantis/trunk/core/license_api.php

Modified: mantis/trunk/core/file_api.php
URL: http://svn.digium.com/view/thirdparty/mantis/trunk/core/file_api.php?view=diff&rev=49&r1=48&r2=49
==============================================================================
--- mantis/trunk/core/file_api.php (original)
+++ mantis/trunk/core/file_api.php Thu Jan  8 14:52:44 2009
@@ -238,7 +238,7 @@
 					PRINT "toggleDisplay('wgetfile_{$v_id}', 'inline'); return false;\">wget patch</a>]";
 				}
  
-	 			if($t_license_status !== false) {
+	 			if($t_license_status !== LICENSE_NOTREQUIRED) {
 					$license_ver = $t_license["license_ver"];
 	 				switch($t_license_status) {
 	 					case LICENSE_NONE:

Modified: mantis/trunk/core/license_api.php
URL: http://svn.digium.com/view/thirdparty/mantis/trunk/core/license_api.php?view=diff&rev=49&r1=48&r2=49
==============================================================================
--- mantis/trunk/core/license_api.php (original)
+++ mantis/trunk/core/license_api.php Thu Jan  8 14:52:44 2009
@@ -8,6 +8,7 @@
 	define("LICENSE_PENDING", 1);
 	define("LICENSE_ACCEPTED", 2);
 	define("LICENSE_REJECTED", 3);
+	define("LICENSE_NOTREQUIRED", 4);
 
 	function license_on_file ( $p_id, $p_license_ver = NULL ) {
 		$t_license = get_license( $p_license_ver );
@@ -50,8 +51,9 @@
 	}
 
 	function license_status( $p_result ) {
-		if (!$p_result)
+		if (!$p_result) {
 			return LICENSE_NONE;
+		}
 
 		if ($p_result["pending"] && !is_null($p_result["date_expired"]))
 			return LICENSE_REJECTED;
@@ -65,8 +67,9 @@
 
 		$result = db_query($sql);
 			
-		if (!db_num_rows($result))
-			return false;
+		if (!db_num_rows($result)) {
+			return LICENSE_NOTREQUIRED;
+		}
 
 		$result = db_fetch_array($result);
 		$c_user_id = $result["user_id"];
@@ -77,8 +80,9 @@
 
 		$result = db_query($sql);
 
-		if (!db_num_rows($result))
+		if (!db_num_rows($result)) {
 			return LICENSE_NONE;
+		}
 
 		$result = db_fetch_array($result);
 




More information about the thirdparty-commits mailing list