[thirdparty-commits] russell: mantis/trunk r144 - in /mantis/trunk: ./ api/soap/ core/ doc/ images...

SVN commits to the Digium third-party software repository thirdparty-commits at lists.digium.com
Mon Jan 18 11:51:14 CST 2010


Author: russell
Date: Mon Jan 18 11:51:09 2010
New Revision: 144

URL: http://svnview.digium.com/svn/thirdparty?view=rev&rev=144
Log:
Apply changes that occurred from 1.1.6 to 1.1.8 upstream

Added:
    mantis/trunk/lang/strings_arabic.txt   (with props)
Modified:
    mantis/trunk/adm_config_report.php
    mantis/trunk/api/soap/mc_issue_attachment_api.php
    mantis/trunk/billing_page.php
    mantis/trunk/bug_report.php
    mantis/trunk/bug_update.php
    mantis/trunk/config_defaults_inc.php
    mantis/trunk/core/bug_api.php
    mantis/trunk/core/constant_inc.php
    mantis/trunk/core/custom_field_api.php
    mantis/trunk/core/email_api.php
    mantis/trunk/core/form_api.php
    mantis/trunk/core/gpc_api.php
    mantis/trunk/core/history_api.php
    mantis/trunk/core/html_api.php
    mantis/trunk/core/print_api.php
    mantis/trunk/core/session_api.php
    mantis/trunk/core/user_api.php
    mantis/trunk/doc/ChangeLog
    mantis/trunk/images/attachment.png
    mantis/trunk/images/blank.gif
    mantis/trunk/images/delete.png
    mantis/trunk/images/dollars.gif
    mantis/trunk/images/favicon.ico
    mantis/trunk/images/fileicons/jpg.gif
    mantis/trunk/images/fileicons/mid.gif
    mantis/trunk/images/fileicons/pdf.gif
    mantis/trunk/images/fileicons/wbk.gif
    mantis/trunk/images/minus.png
    mantis/trunk/images/no_avatar.png
    mantis/trunk/images/plus.png
    mantis/trunk/images/rel_dependant.png
    mantis/trunk/images/rel_duplicate.png
    mantis/trunk/images/rel_related.png
    mantis/trunk/images/update.png
    mantis/trunk/javascript/common.js
    mantis/trunk/lang/strings_bulgarian.txt
    mantis/trunk/lang/strings_bulgarian_1251.txt
    mantis/trunk/lang/strings_catalan.txt
    mantis/trunk/lang/strings_catalan_8859-15.txt
    mantis/trunk/lang/strings_chinese_simplified.txt
    mantis/trunk/lang/strings_chinese_simplified_gb2312.txt
    mantis/trunk/lang/strings_chinese_traditional.txt
    mantis/trunk/lang/strings_chinese_traditional_big5.txt
    mantis/trunk/lang/strings_croatian_8859-2.txt
    mantis/trunk/lang/strings_czech.txt
    mantis/trunk/lang/strings_czech_8859-2.txt
    mantis/trunk/lang/strings_danish.txt
    mantis/trunk/lang/strings_danish_8859-15.txt
    mantis/trunk/lang/strings_dutch.txt
    mantis/trunk/lang/strings_dutch_8859-15.txt
    mantis/trunk/lang/strings_english.txt
    mantis/trunk/lang/strings_estonian.txt
    mantis/trunk/lang/strings_estonian_8859-15.txt
    mantis/trunk/lang/strings_finnish.txt
    mantis/trunk/lang/strings_finnish_8859-15.txt
    mantis/trunk/lang/strings_french.txt
    mantis/trunk/lang/strings_french_8859-15.txt
    mantis/trunk/lang/strings_german.txt
    mantis/trunk/lang/strings_german_8859-1.txt
    mantis/trunk/lang/strings_german_eintrag.txt
    mantis/trunk/lang/strings_greek.txt
    mantis/trunk/lang/strings_hungarian.txt
    mantis/trunk/lang/strings_hungarian_8859-2.txt
    mantis/trunk/lang/strings_icelandic.txt
    mantis/trunk/lang/strings_icelandic_8859-1.txt
    mantis/trunk/lang/strings_italian.txt
    mantis/trunk/lang/strings_japanese.txt
    mantis/trunk/lang/strings_japanese_euc.txt
    mantis/trunk/lang/strings_japanese_sjis.txt
    mantis/trunk/lang/strings_korean.txt
    mantis/trunk/lang/strings_korean_euc-kr.txt
    mantis/trunk/lang/strings_latvian_1257.txt
    mantis/trunk/lang/strings_lithuanian.txt
    mantis/trunk/lang/strings_lithuanian_1257.txt
    mantis/trunk/lang/strings_norwegian.txt
    mantis/trunk/lang/strings_norwegian_8859-15.txt
    mantis/trunk/lang/strings_polish.txt
    mantis/trunk/lang/strings_polish_8859-2.txt
    mantis/trunk/lang/strings_portuguese_brazil.txt
    mantis/trunk/lang/strings_portuguese_brazil_8859-1.txt
    mantis/trunk/lang/strings_portuguese_standard_8859-1.txt
    mantis/trunk/lang/strings_romanian.txt
    mantis/trunk/lang/strings_russian.txt
    mantis/trunk/lang/strings_russian_1251.txt
    mantis/trunk/lang/strings_russian_koi8.txt
    mantis/trunk/lang/strings_serbian.txt
    mantis/trunk/lang/strings_serbian_8859-2.txt
    mantis/trunk/lang/strings_slovak.txt
    mantis/trunk/lang/strings_slovak_8859-2.txt
    mantis/trunk/lang/strings_spanish.txt
    mantis/trunk/lang/strings_spanish_8859-15.txt
    mantis/trunk/lang/strings_swedish_8859-1.txt
    mantis/trunk/lang/strings_turkish_8859-9.txt
    mantis/trunk/lang/strings_ukrainian.txt
    mantis/trunk/lang/strings_ukrainian_1251.txt
    mantis/trunk/lang/strings_urdu.txt
    mantis/trunk/manage_config_email_set.php
    mantis/trunk/manage_config_work_threshold_set.php
    mantis/trunk/manage_config_workflow_page.php
    mantis/trunk/manage_config_workflow_set.php
    mantis/trunk/manage_user_page.php
    mantis/trunk/print_bug_page.php

Modified: mantis/trunk/adm_config_report.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/adm_config_report.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/adm_config_report.php (original)
+++ mantis/trunk/adm_config_report.php Mon Jan 18 11:51:09 2010
@@ -82,7 +82,7 @@
 
 <!-- Title -->
 <tr>
-	<td class="form-title" colspan="3">
+	<td class="form-title" colspan="7">
 		<?php echo lang_get( 'database_configuration' ) ?>
 	</td>
 </tr>
@@ -226,4 +226,4 @@
 </div>
 <?php
 	html_page_bottom1( __FILE__ );
-?>
+?>

Modified: mantis/trunk/api/soap/mc_issue_attachment_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/api/soap/mc_issue_attachment_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/api/soap/mc_issue_attachment_api.php (original)
+++ mantis/trunk/api/soap/mc_issue_attachment_api.php Mon Jan 18 11:51:09 2010
@@ -50,7 +50,7 @@
 		if ( !access_has_bug_level( config_get( 'upload_bug_file_threshold' ), $p_issue_id, $t_user_id ) ) {
  			return new soap_fault( 'Client', '', 'Access Denied' );
 		}
-		return mci_file_add( $p_issue_id, $p_name, $p_content, $p_file_type, 'bug' );
+		return mci_file_add( $p_issue_id, $p_name, base64_decode( $p_content ), $p_file_type, 'bug' );
  	}
  	
   	/**

Modified: mantis/trunk/billing_page.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/billing_page.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/billing_page.php (original)
+++ mantis/trunk/billing_page.php Mon Jan 18 11:51:09 2010
@@ -25,6 +25,7 @@
 	require_once( 'core.php' );
 	
 	$t_core_path = config_get( 'core_path' );
+ 	access_ensure_global_level( config_get( 'time_tracking_reporting_threshold' ) );
 ?>
 <?php
 /*

Modified: mantis/trunk/bug_report.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/bug_report.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/bug_report.php (original)
+++ mantis/trunk/bug_report.php Mon Jan 18 11:51:09 2010
@@ -92,11 +92,11 @@
 	$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug_data->project_id );
 	foreach( $t_related_custom_field_ids as $t_id ) {
 		$t_def = custom_field_get_definition( $t_id );
-		if ( $t_def['require_report'] && !gpc_isset( "custom_field_$t_id" ) ) {
+		if ( $t_def['require_report'] && !gpc_isset_custom_field( $t_id, $t_def['type'] ) ) {
 			error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
 			trigger_error( ERROR_EMPTY_FIELD, ERROR );
 		}
-		if ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], $t_def['default_value'] ) ) ) {
+		if ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], NULL ) ) ) {
 			error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
 			trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
 		}

Modified: mantis/trunk/bug_update.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/bug_update.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/bug_update.php (original)
+++ mantis/trunk/bug_update.php Mon Jan 18 11:51:09 2010
@@ -91,6 +91,7 @@
 
 	# Handle auto-assigning
 	if ( ( NEW_ == $t_bug_data->status )
+	  && ( $t_bug_data->status == $t_old_bug_status )
 	  && ( 0 != $t_bug_data->handler_id )
 	  && ( ON == config_get( 'auto_set_status_to_assigned' ) ) ) {
 		$t_bug_data->status = config_get( 'bug_assigned_status' );
@@ -125,17 +126,19 @@
 			continue;
 		}
 
-		if ( $t_def['require_' . $t_custom_status_label] && !gpc_isset( "custom_field_$t_id" ) ) {
+		if ( $t_def['require_' . $t_custom_status_label] && !gpc_isset_custom_field( $t_id, $t_def['type'] ) ) {
 			error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
 			trigger_error( ERROR_EMPTY_FIELD, ERROR );
 		}
 
-		# Only update the field if it is posted 
-		if ( !gpc_isset( "custom_field_$t_id" ) ) {
+		# Only update the field if it is posted, 
+		#	or if it is empty, and the current value isn't the default 
+		if ( !gpc_isset_custom_field( $t_id, $t_def['type'] ) && 
+				( custom_field_get_value( $t_id, $f_bug_id ) == $t_def['default_value'] ) ) {
 			continue;
 		}
 
-		if ( !custom_field_set_value( $t_id, $f_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], null ) ) ) {
+		if ( !custom_field_set_value( $t_id, $f_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], NULL ) ) ) {
 			error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
 			trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
 		}

Modified: mantis/trunk/config_defaults_inc.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/config_defaults_inc.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/config_defaults_inc.php (original)
+++ mantis/trunk/config_defaults_inc.php Mon Jan 18 11:51:09 2010
@@ -153,8 +153,17 @@
 	#   'memcached' -> Memcached storage sessions
 	$g_session_handler = 'php';
 
+	# Session key name.  Should be unique between multiple installations to prevent conflicts.
+	$g_session_key = 'MantisBT';
+
 	# Session save path.  If false, uses default value as set by session handler.
 	$g_session_save_path = false;
+
+	# Form security validation.
+	# This protects against Cross-Site Request Forgery, but some proxy servers may
+	# not correctly work with this option enabled because they cache pages incorrectly.
+	# WARNING: Disabling this IS a security risk!!
+	$g_form_security_validation = ON;
 
 	#############################
 	# Configuration Settings
@@ -166,7 +175,7 @@
 	$g_global_settings = array(
 		'_table$', 'cookie', '^db_', 'hostname', 'database_name', 'session_handler',
 		'_path$', 'use_iis', 'language', 'use_javascript', 'display_errors', 'stop_on_errors', 'login_method', '_file$',
-		'anonymous', 'content_expire', 'html_valid_tags', 'custom_headers', 'rss_key_seed'
+		'anonymous', 'content_expire', 'html_valid_tags', 'custom_headers', 'rss_key_seed', 'form_security_',
 	);
 
 	#############################
@@ -381,6 +390,7 @@
 	# list the choices that the users are allowed to choose
 	$g_language_choices_arr	= array(
 		'auto',
+		'arabic',
 		'bulgarian',
 		'catalan',
 		'chinese_simplified',
@@ -422,6 +432,7 @@
 
 	# Browser language mapping for 'auto' language selection
 	$g_language_auto_map = array(
+		'ar' => 'arabic',
 		'bg' => 'bulgarian',
 		'ca' => 'catalan',
 		'zh-cn, zh-sg, zh' => 'chinese_simplified',

Modified: mantis/trunk/core/bug_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/bug_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/bug_api.php (original)
+++ mantis/trunk/core/bug_api.php Mon Jan 18 11:51:09 2010
@@ -102,7 +102,7 @@
 		}	
 		
 		if( !is_int( $p_bug_datebase_result['date_submitted'] ) )
-			$p_bug_datebase_result['date_submitted']	= db_unixtimestamp( $p_bug_datebase_result['date_submitted']['date_submitted'] );
+			$p_bug_datebase_result['date_submitted']	= db_unixtimestamp( $p_bug_datebase_result['date_submitted'] );
 		if( !is_int( $p_bug_datebase_result['last_updated'] ) )
 			$p_bug_datebase_result['last_updated']	= db_unixtimestamp( $p_bug_datebase_result['last_updated'] );
 		$g_cache_bug[ $p_bug_datebase_result['id'] ] = $p_bug_datebase_result;

Modified: mantis/trunk/core/constant_inc.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/constant_inc.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/constant_inc.php (original)
+++ mantis/trunk/core/constant_inc.php Mon Jan 18 11:51:09 2010
@@ -21,7 +21,7 @@
 	# $Id$
 	# --------------------------------------------------------
 
-	define( 'MANTIS_VERSION', '1.1.6' );
+	define( 'MANTIS_VERSION', '1.1.8' );
 
 	# --- constants -------------------
 

Modified: mantis/trunk/core/custom_field_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/custom_field_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/custom_field_api.php (original)
+++ mantis/trunk/core/custom_field_api.php Mon Jan 18 11:51:09 2010
@@ -944,27 +944,46 @@
 		$t_length_max		= $row['length_max'];
 		$t_default_value	= $row['default_value'];
 
-		# check for valid value
-		if ( !is_blank( $t_valid_regexp ) ) {
-			if ( !ereg( $t_valid_regexp, $p_value ) ) {
-				return false;
-			}
-		}
-
-		if ( strlen( $p_value ) < $t_length_min ) {
-			return false;
-		}
-
-		/* XXX: validate asterisk version custom field */
-		if ( $c_field_id == 10 && preg_match( '/did not/', $p_value ) ) {
-			return false;
-		}
-
-		if ( ( 0 != $t_length_max ) && ( strlen( $p_value ) > $t_length_max ) ) {
-			return false;
-		}
-
-		return true;
+		$t_valid = true;
+		$t_length = strlen( $p_value );
+		switch ($t_type) {
+			case CUSTOM_FIELD_TYPE_STRING:
+				// validate against regexp
+				if( !is_blank( $t_valid_regexp ) && !is_blank( $p_value ) ) {
+					$t_valid &= ereg( $t_valid_regexp, $p_value );
+				}
+				// check string length
+				$t_valid &= ( 0 == $t_length_min ) || ( $t_length > $t_length_min );
+				$t_valid &= ( 0 == $t_length_max ) || ( $t_length <= $t_length_max );
+				break;
+			case CUSTOM_FIELD_TYPE_NUMERIC:
+				$t_valid &= ( $t_length == 0 ) || is_numeric( $p_value );
+				break;
+			case CUSTOM_FIELD_TYPE_FLOAT:
+				// handle both number and number with decimal
+				$t_valid &= ( $t_length == 0 ) || is_numeric( $p_value ) || is_float( $p_value );
+				break;
+			case CUSTOM_FIELD_TYPE_DATE:
+				// gpc_get_cf for date returns the value from strftime
+				// either false (php >= 5.1)  or -1 (php < 5.1) for failure
+				$t_valid &= ( $p_value == null ) || ( ( $p_value !== false ) && ( $p_value > 0 ) );
+				break;
+			case CUSTOM_FIELD_TYPE_ENUM:
+			case CUSTOM_FIELD_TYPE_EMAIL:
+			case CUSTOM_FIELD_TYPE_CHECKBOX:
+			case CUSTOM_FIELD_TYPE_LIST:
+			case CUSTOM_FIELD_TYPE_MULTILIST:
+			case CUSTOM_FIELD_TYPE_RADIO:
+			default:
+			break;
+		}
+
+ 		/* XXX: validate asterisk version custom field */
+ 		if ( $c_field_id == 10 && preg_match( '/did not/', $p_value ) ) {
+ 			return false;
+		}
+
+		return $t_valid;
 	}
 
 	# --------------------
@@ -1086,40 +1105,11 @@
 	function custom_field_set_value( $p_field_id, $p_bug_id, $p_value ) {
 		$c_field_id	= db_prepare_int( $p_field_id );
 		$c_bug_id	= db_prepare_int( $p_bug_id );
+		$c_value = db_prepare_string( $p_value );
 
 		custom_field_ensure_exists( $p_field_id );
 
-		$t_custom_field_table = config_get( 'mantis_custom_field_table' );
-		$query = "SELECT name, type, possible_values, valid_regexp,
-				  access_level_rw, length_min, length_max, default_value
-				  FROM $t_custom_field_table
-				  WHERE id='$c_field_id'";
-		$result = db_query( $query );
-		$row = db_fetch_array( $result );
-
-		$t_name				= $row['name'];
-		$t_type				= $row['type'];
-		$t_possible_values	= $row['possible_values'];
-		$t_valid_regexp		= $row['valid_regexp'];
-		$t_access_level_rw	= $row['access_level_rw'];
-		$t_length_min		= $row['length_min'];
-		$t_length_max		= $row['length_max'];
-		$t_default_value	= $row['default_value'];
-
-		$c_value	= db_prepare_string( custom_field_value_to_database( $p_value, $t_type ) );
-
-		# check for valid value
-		if ( !is_blank( $t_valid_regexp ) ) {
-			if ( !ereg( $t_valid_regexp, $p_value ) ) {
-				return false;
-			}
-		}
-
-		if ( strlen( $p_value ) < $t_length_min ) {
-			return false;
-		}
-
-		if ( ( 0 != $t_length_max ) && ( strlen( $p_value ) > $t_length_max ) ) {
+		if ( ! custom_field_validate( $p_field_id, $p_value ) ) {
 			return false;
 		}
 

Modified: mantis/trunk/core/email_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/email_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/email_api.php (original)
+++ mantis/trunk/core/email_api.php Mon Jan 18 11:51:09 2010
@@ -390,7 +390,7 @@
 		$t_message = lang_get( 'new_account_greeting' ) . $t_username .
 						lang_get( 'new_account_greeting2' ) . " \n\n" .
 						string_get_confirm_hash_url( $p_user_id, $p_confirm_hash ) . " \n\n" .
-						lang_get( 'new_account_message' ) .
+						lang_get( 'new_account_message' ) . "\n\n" .
 						lang_get( 'new_account_do_not_reply' );
 
 		# Send signup email regardless of mail notification pref

Modified: mantis/trunk/core/form_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/form_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/form_api.php (original)
+++ mantis/trunk/core/form_api.php Mon Jan 18 11:51:09 2010
@@ -33,6 +33,10 @@
  * @return string Security token string
  */
 function form_security_token( $p_form_name ) {
+	if ( OFF == config_get_global( 'form_security_validation' ) ) {
+		return;
+	}
+
 	$t_tokens = session_get( 'form_security_tokens', array() );
 
 	# Create a new array for the form name if necessary
@@ -59,6 +63,10 @@
  * @return string Hidden form element to output
  */
 function form_security_field( $p_form_name ) {
+	if ( OFF == config_get_global( 'form_security_validation' ) ) {
+		return '';
+	}
+
 	$t_string = form_security_token( $p_form_name );
 
 	# Create the form element HTML string for the security token
@@ -75,6 +83,10 @@
  * @return string Hidden form element to output
  */
 function form_security_param( $p_form_name ) {
+	if ( OFF == config_get_global( 'form_security_validation' ) ) {
+		return '';
+	}
+
 	$t_string = form_security_token( $p_form_name );
 
 	# Create the GET parameter to be used in a URL for a secure link
@@ -93,6 +105,10 @@
  * @return boolean Form is valid
  */
 function form_security_validate( $p_form_name ) {
+	if ( OFF == config_get_global( 'form_security_validation' ) ) {
+		return;
+	}
+
 	$t_tokens = session_get( 'form_security_tokens', array() );
 
 	# Short-circuit if we don't have any tokens for the given form name
@@ -141,6 +157,10 @@
  * @param string Form name
  */
 function form_security_purge( $p_form_name ) {
+	if ( OFF == config_get_global( 'form_security_validation' ) ) {
+		return;
+	}
+
 	$t_tokens = session_get( 'form_security_tokens', array() );
 
 	# Short-circuit if we don't have any tokens for the given form name

Modified: mantis/trunk/core/gpc_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/gpc_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/gpc_api.php (original)
+++ mantis/trunk/core/gpc_api.php Mon Jan 18 11:51:09 2010
@@ -116,6 +116,24 @@
 	#===================================
 	# Custom Field Functions
 	#===================================
+
+	# ------------------
+	# see if a custom field variable is set.  Uses gpc_isset().
+	function gpc_isset_custom_field( $p_var_name, $p_custom_field_type ) {
+		switch ($p_custom_field_type ) {
+			case CUSTOM_FIELD_TYPE_DATE:
+				// date field is three dropdowns that default to 0
+				// Dropdowns are always present, so check if they are set
+				return gpc_isset( "custom_field_" . $p_var_name . "_day" ) &&
+					gpc_get_int( "custom_field_" . $p_var_name . "_day", 0 ) != 0 &&
+					gpc_isset( "custom_field_" . $p_var_name . "_month" ) &&
+					gpc_get_int( "custom_field_" . $p_var_name . "_month", 0 ) != 0 &&
+					gpc_isset( "custom_field_" . $p_var_name . "_year" ) &&
+					gpc_get_int( "custom_field_" . $p_var_name . "_year", 0 ) != 0 ;
+			default:
+				return gpc_isset( "custom_field_" . $p_var_name);
+		}
+	}
 
 	# ------------------
 	# Retrieve a custom field variable.  Uses gpc_get().

Modified: mantis/trunk/core/history_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/history_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/history_api.php (original)
+++ mantis/trunk/core/history_api.php Mon Jan 18 11:51:09 2010
@@ -310,7 +310,7 @@
 			case 'os':
 				$t_field_localized = lang_get( 'os' );
 				break;
-			case 'os_version':
+			case 'os_build':
 				$t_field_localized = lang_get( 'os_version' );
 				break;
 			case 'build':

Modified: mantis/trunk/core/html_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/html_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/html_api.php (original)
+++ mantis/trunk/core/html_api.php Mon Jan 18 11:51:09 2010
@@ -418,7 +418,7 @@
 			echo "\t", '<span class="timer"><a href="http://www.mantisbt.org/" title="Free Web Based Bug Tracker">Mantis ', MANTIS_VERSION, '</a>',
 					'[<a href="http://www.mantisbt.org/"  title="Free Web Based Bug Tracker" target="_blank">^</a>]</span>', "\n";
 		}
-		echo "\t", '<address>Copyright &copy; 2000 - 2008 Mantis Group</address>', "\n";
+		echo "\t", '<address>Copyright &copy; 2000 - 2009 Mantis Group</address>', "\n";
 
 		# only display webmaster email is current user is not the anonymous user
 		if ( ! is_page_name( 'login_page.php' ) && !current_user_is_anonymous() ) {
@@ -628,7 +628,7 @@
 				# Add custom options
 				$t_custom_options = prepare_custom_menu_options( 'main_menu_custom_options' );
 				$t_menu_options = array_merge( $t_menu_options, $t_custom_options );
-				if ( config_get('time_tracking_enabled') && config_get('time_tracking_with_billing') )
+				if ( config_get('time_tracking_enabled') && config_get('time_tracking_with_billing') && access_has_global_level( config_get( 'time_tracking_reporting_threshold' ) ) )
 					$t_menu_options[] = '<a href="billing_page.php">' . lang_get( 'time_tracking_billing_link' ) . '</a>';
 
 				# Logout (no if anonymously logged in)

Modified: mantis/trunk/core/print_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/print_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/print_api.php (original)
+++ mantis/trunk/core/print_api.php Mon Jan 18 11:51:09 2010
@@ -874,11 +874,17 @@
 			echo '<option value=""></option>';
 		}
 
+		$t_listed = array();
+
 		foreach( $versions as $version ) {
 			$t_version = string_attribute( $version['version'] );
-			echo "<option value=\"$t_version\"";
-			check_selected( $p_version, $t_version );
-			echo '>', string_shorten( $t_version ), '</option>';
+
+			if ( !in_array( $t_version, $t_listed ) ) {
+				$t_listed[] = $t_version;
+				echo "<option value=\"$t_version\"";
+				check_selected( $p_version, $t_version );
+				echo '>', string_shorten( $t_version ), '</option>';
+			}
 		}
 	}
 	# --------------------

Modified: mantis/trunk/core/session_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/session_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/session_api.php (original)
+++ mantis/trunk/core/session_api.php Mon Jan 18 11:51:09 2010
@@ -1,7 +1,7 @@
 <?php
 # Mantis - a php based bugtracking system
 
-# Copyright (C) 2008 - 2008  Mantis Team   - mantisbt-dev at lists.sourceforge.net
+# Copyright (C) 2008 - 2009  Mantis Team   - mantisbt-dev at lists.sourceforge.net
 
 # Mantis is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -49,11 +49,15 @@
  */
 class MantisPHPSession extends MantisSession {
 	function __construct( $p_session_id=null ) {
+		$this->key = config_get_global( 'session_key' );
+
+		# Save session information where specified or with PHP's default
 		$t_session_save_path = config_get_global( 'session_save_path' );
 		if ( $t_session_save_path ) {
 			session_save_path( $t_session_save_path );
 		}
 
+		# Handle session cookie and caching
 		session_cache_limiter( 'private_no_expire' );
 		if ( isset( $_SERVER['HTTPS'] ) && ( strtolower( $_SERVER['HTTPS'] ) != 'off' ) ) {
 			session_set_cookie_params( 0, config_get( 'cookie_path' ), config_get( 'cookie_domain' ), true );
@@ -61,12 +65,19 @@
 			session_set_cookie_params( 0, config_get( 'cookie_path' ), config_get( 'cookie_domain' ), false );
 		}
 
+		# Handle existent session ID
 		if ( !is_null( $p_session_id ) ) {
 			session_id( $p_session_id );
 		}
 
+		# Initialize the session
 		session_start();
 		$this->id = session_id();
+
+		# Initialize the keyed session store
+		if ( !isset( $_SESSION[ $this->key ] ) ) {
+			$_SESSION[ $this->key ] = array();
+		}
 	}
 
 	# Chain the PHP4 class constructor
@@ -75,8 +86,8 @@
 	}
 
 	function get( $p_name, $p_default=null ) {
-		if ( isset( $_SESSION[ $p_name ] ) ) {
-			return unserialize( $_SESSION[ $p_name ] );
+		if ( isset( $_SESSION[ $this->key ][ $p_name ] ) ) {
+			return unserialize( $_SESSION[ $this->key ][ $p_name ] );
 		}
 
 		if ( func_num_args() > 1 ) {
@@ -88,11 +99,11 @@
 	}
 
 	function set( $p_name, $p_value ) {
-		$_SESSION[ $p_name ] = serialize( $p_value );
+		$_SESSION[ $this->key ][ $p_name ] = serialize( $p_value );
 	}
 
 	function delete( $p_name ) {
-		unset( $_SESSION[ $p_name ] );
+		unset( $_SESSION[ $this->key ][ $p_name ] );
 	}
 
 	function destroy() {
@@ -100,8 +111,7 @@
 			gpc_set_cookie( session_name(), '', time() - 42000 );
 		}
 
-		unset( $_SESSION );
-		session_destroy();
+		unset( $_SESSION[ $this->key ] );
 	}
 }
 

Modified: mantis/trunk/core/user_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/user_api.php?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/core/user_api.php (original)
+++ mantis/trunk/core/user_api.php Mon Jan 18 11:51:09 2010
@@ -162,7 +162,10 @@
 		$t_count = 0;
 		if ( $p_realname <> $p_username ) {
 			# check realname does not match an existing username
-			if ( user_get_id_by_name( $p_realname ) ) {
+			#  but allow it to match the current user
+			$t_target_user = user_get_id_by_name( $p_username );
+			$t_other_user = user_get_id_by_name( $p_realname );
+			if( ( 0 != $t_other_user ) && ( $t_target_user != $t_other_user ) ) {
 				return 0;
 			}
 

Modified: mantis/trunk/doc/ChangeLog
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/doc/ChangeLog?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/doc/ChangeLog (original)
+++ mantis/trunk/doc/ChangeLog Mon Jan 18 11:51:09 2010
@@ -1,4 +1,39 @@
 Mantis ChangeLog
+
+2009.06.08 - 1.1.8
+===================================
+
+Final bugfix and translation update release for the 1.1.x series.
+
+- 0010184: [custom fields] APPLICATION ERROR 0001303 when optional custom date field is left blank (jreese) - resolved.
+- 0010445: [other] Wrong copyright (siebrand) - resolved.
+- 0010448: [localization] Syntax error in polish translation (siebrand) - resolved.
+- 0010405: [localization] Arabic language and RTL (siebrand) - resolved.
+- 0010570: [printing] Printing Bug does not work with configuration $g_show_view= SIMPLE_ONLY; (vboctor) - resolved.
+
+2009.04.20 - 1.1.7
+===================================
+
+Bugfix maintenance release, cleaning up most of the remaining issues with 1.1.x series.
+
+- 0006848: [administration] Bugs in manage_config_*_set.php (grangeway) - resolved.
+- 0009986: [administration] APPLICATION ERROR #2800 using "Delete Project Specific Settings" (jreese) - resolved.
+- 0010235: [api soap] mc_issue_attachment_add corrupts attachments (giallu) - resolved.
+- 0009888: [bugtracker] Issue History Problem... build, os, os_version, and platform are not looking right and are not effected by language files. (jreese) - resolved.
+- 0009999: [bugtracker] APPLICATION ERROR #2800 - While submit a new bug (jreese) - resolved.
+- 0009606: [custom fields] Custom fields not enforced. (thraxisp) - resolved.
+- 0009979: [custom fields] Function gpc_isset always return false for a custom date field (thraxisp) - resolved.
+- 0010035: [custom fields] Custom multi-selection list fields don't allow deselection (thraxisp) - resolved.
+- 0010154: [custom fields] Custom field enum values are getting the first and last characters truncated when displayed. (thraxisp) - resolved.
+- 0010011: [customization] date_submitted is not set properly in bug object (thraxisp) - resolved.
+- 0010200: [email] \n not replaced in registration e-mail (siebrand) - resolved.
+- 0010231: [feature] Assigned bug status cannot be changed to new? (jreese) - resolved.
+- 0010299: [html] Invalid HTML (jreese) - resolved.
+- 0010270: [localization] escaped double quotes in localization files (siebrand) - resolved.
+- 0010187: [security] Using dession destroy and unset for logout (jreese) - resolved.
+- 0010192: [sub-projects] Repeated Target versions (jreese) - resolved.
+- 0010038: [tagging] Problems attaching tags in Chrome (jreese) - resolved.
+- 0010050: [time tracking] All leves have access to billing reports - Access level required to run reports does not function (giallu) - resolved.
 
 2008.12.09 - 1.1.6
 ===================================

Modified: mantis/trunk/images/attachment.png
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/attachment.png?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/blank.gif
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/blank.gif?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/delete.png
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/delete.png?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/dollars.gif
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/dollars.gif?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/favicon.ico
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/favicon.ico?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/fileicons/jpg.gif
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/fileicons/jpg.gif?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/fileicons/mid.gif
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/fileicons/mid.gif?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/fileicons/pdf.gif
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/fileicons/pdf.gif?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/fileicons/wbk.gif
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/fileicons/wbk.gif?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/minus.png
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/minus.png?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/no_avatar.png
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/no_avatar.png?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/plus.png
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/plus.png?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/rel_dependant.png
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/rel_dependant.png?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/rel_duplicate.png
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/rel_duplicate.png?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/rel_related.png
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/rel_related.png?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/images/update.png
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/images/update.png?view=diff&rev=144&r1=143&r2=144
==============================================================================
Binary files - no diff available.

Modified: mantis/trunk/javascript/common.js
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/javascript/common.js?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- mantis/trunk/javascript/common.js (original)
+++ mantis/trunk/javascript/common.js Mon Jan 18 11:51:09 2010
@@ -195,6 +195,9 @@
 	t_tag_separator = document.getElementById('tag_separator').value;
 	t_tag_string = document.getElementById('tag_string');
 	t_tag_select = document.getElementById('tag_select');
+
+	if ( Trim( p_string ) == '' ) { return; }
+
 	if ( t_tag_string.value != '' ) {
 		t_tag_string.value = t_tag_string.value + t_tag_separator + p_string;
 	} else {

Added: mantis/trunk/lang/strings_arabic.txt
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/lang/strings_arabic.txt?view=auto&rev=144
==============================================================================
--- mantis/trunk/lang/strings_arabic.txt (added)
+++ mantis/trunk/lang/strings_arabic.txt Mon Jan 18 11:51:09 2010
@@ -1,0 +1,1070 @@
+<?php
+/** Mantis - a php based bugtracking system
+ *
+ * Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito at 300baud.org
+ * Copyright (C) 2002 - 2008  Mantis Team   - mantisbt-dev at lists.sourceforge.net
+ *
+ * Mantis is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Mantis is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/** Arabic (عربي)
+ *
+ * @ingroup Language
+ * @file
+ *
+ * @author Hussain, kawzaki at yahoo dot com
+ * @author based on mantis 1.1.6 various developers
+ */
+
+# Charset
+$s_charset = 'utf-8';
+
+# Group commands menuitems
+$s_actiongroup_menu_move = 'نقل';
+$s_actiongroup_menu_copy = 'نسخ';
+$s_actiongroup_menu_assign = 'تعيين';
+$s_actiongroup_menu_close = 'اغلاق';
+$s_actiongroup_menu_delete = 'حذف';
+$s_actiongroup_menu_resolve = 'Ù
حلولة';
+$s_actiongroup_menu_update_priority = 'تحديث الأهÙ
ية';
+$s_actiongroup_menu_update_status = 'تحديث الحالية';
+$s_actiongroup_menu_update_view_status = 'تحديث عالة العرض';
+$s_actiongroup_menu_update_category = 'تحديث القسÙ
';
+$s_actiongroup_menu_set_sticky = 'تثبيت/الغاء';
+$s_actiongroup_menu_update_field = 'تحديث %s';
+$s_actiongroup_menu_update_target_version = 'تحديث النسخة الÙ
ستهدفة - Target';
+$s_actiongroup_menu_update_fixed_in_version = 'تحديث الثابت في النسخة - Fixed';
+$s_actiongroup_menu_add_note = 'اضافة Ù
لاحظة';
+$s_actiongroup_menu_attach_tags = 'كلÙ
ات Ù
فتاحية';
+$s_actiongroup_bugs = 'Ù
ع الاختيار...';
+$s_actiongroup_error_issue_is_readonly = 'البلاغ  للقراءة فقط';
+
+# new strings:
+$s_all_projects = 'جÙ
يع الÙ
شاريع';
+$s_move_bugs = 'نقل البلاغ ';
+$s_operation_successful = 'العÙ
لية ناجحة.';
+$s_date_order = 'ترتيب التاريخ';
+$s_print_all_bug_page_link = 'طباعة التقارير';
+$s_csv_export = 'CSV Export';
+$s_login_anonymously = 'تسجيل دخول Ù
تخفي';
+$s_anonymous = 'Ù
تخفي';
+$s_jump_to_bugnotes = 'عرض الÙ
لاحظات';
+$s_public_project_msg = 'Ù
شروع عاÙ
.  ÙŠÙ
كن للجÙ
يع رؤيته.';
+$s_private_project_msg = 'Ù
شروع خاص.  Ù
سÙ
وح للÙ
صرح لهÙ
 فقط';
+$s_access_level_project = 'صلاحية دخول للÙ
شروع';
+$s_view_submitted_bug_link = 'عرض البلاغ  الÙ
رسلة';
+$s_assigned_projects = 'الÙ
شاريع الÙ
عينة';
+$s_unassigned_projects = 'Ù
شاريع بدون Ù
سؤول';
+$s_print = 'طباعة';
+$s_jump = 'انتقال';
+$s_copy_users = 'نسخ الاعضاء';
+$s_copy_categories_from = 'نسخ الانوع Ù
Ù†';
+$s_copy_categories_to = 'نسخ الانواع إلى';

[... 2273 lines stripped ...]



More information about the thirdparty-commits mailing list