[thirdparty-commits] jpeeler: mantis/trunk r50 - 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 18:43:22 CST 2009
Author: jpeeler
Date: Thu Jan 8 18:43:21 2009
New Revision: 50
URL: http://svn.digium.com/view/thirdparty?view=rev&rev=50
Log:
really fix the problem with all attachments being labeled as 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=50&r1=49&r2=50
==============================================================================
--- mantis/trunk/core/file_api.php (original)
+++ mantis/trunk/core/file_api.php Thu Jan 8 18:43:21 2009
@@ -238,7 +238,7 @@
PRINT "toggleDisplay('wgetfile_{$v_id}', 'inline'); return false;\">wget patch</a>]";
}
- if($t_license_status !== LICENSE_NOTREQUIRED) {
+ if($t_license_status !== false) {
$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=50&r1=49&r2=50
==============================================================================
--- mantis/trunk/core/license_api.php (original)
+++ mantis/trunk/core/license_api.php Thu Jan 8 18:43:21 2009
@@ -8,7 +8,6 @@
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 );
@@ -51,7 +50,9 @@
}
function license_status( $p_result ) {
- if (!$p_result) {
+ if ($p_result === false)
+ return false; // no license required
+ if (!$p_result)
return LICENSE_NONE;
}
@@ -68,7 +69,7 @@
$result = db_query($sql);
if (!db_num_rows($result)) {
- return LICENSE_NOTREQUIRED;
+ return false;
}
$result = db_fetch_array($result);
@@ -126,7 +127,7 @@
function submit_early_license( $p_user_id ) {
$sql = sprintf("INSERT INTO mantis_license_table VALUES(''," .
- "'%d', '%s', '', '', '', '', '', '', FALSE, '1.0','', 0, '%s')",
+ "'%d', '%s', '', '', '', '', '', '', '', '', FALSE, '1.0','', 0, '%s')",
$p_user_id,
db_prepare_string(user_get_realname($p_user_id)),
db_prepare_string(license_magic_date()));
More information about the thirdparty-commits
mailing list