Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2780288622c4
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c8f77fbae331
Choose a head ref
  • 2 commits
  • 42 files changed
  • 1 contributor

Commits on Oct 8, 2012

  1. fix css property

    mantis committed Oct 8, 2012
    Copy the full SHA
    c1945f2 View commit details

Commits on Oct 9, 2012

  1. PHPdoc

    mantis committed Oct 9, 2012
    Copy the full SHA
    c8f77fb View commit details
2 changes: 1 addition & 1 deletion bug_monitor_add.php
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@
}

if ( user_is_anonymous( $t_user_id ) ) {
throw new MantisBT\Exception\Protected_Account();
throw new MantisBT\Exception\User\ProtectedUser();
}

bug_ensure_exists( $f_bug_id );
2 changes: 1 addition & 1 deletion bug_monitor_delete.php
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@
}

if ( user_is_anonymous( $t_user_id ) ) {
throw new MantisBT\Exception\Protected_Account();
throw new MantisBT\Exception\User\ProtectedUser();
}

bug_ensure_exists( $f_bug_id );
16 changes: 8 additions & 8 deletions core.php
Original file line number Diff line number Diff line change
@@ -161,7 +161,7 @@ function get_mantis_url() {
/**
* Define an API inclusion function to replace require_once
*
* @param string api file name
* @param string $p_api_name api file name
*/
function require_api( $p_api_name ) {
static $s_api_included;
@@ -181,7 +181,7 @@ function require_api( $p_api_name ) {
/**
* Define an API inclusion function to replace require_once
*
* @param string lib file name
* @param string $p_library_name lib file name
*/
function require_lib( $p_library_name ) {
static $s_libraries_included;
@@ -201,13 +201,13 @@ function require_lib( $p_library_name ) {
/**
* Define an autoload function to automatically load classes when referenced
*
* @param string class name
* @param string $p_class class name
*/
function __autoload( $className ) {
function __autoload( $p_class ) {
global $MantisConfig;

if( strstr( $className, 'MantisBT\Exception' ) ) {
$t_parts = explode( '\\', $className);
if( strstr( $p_class, 'MantisBT\Exception' ) ) {
$t_parts = explode( '\\', $p_class);
$t_class = array_pop($t_parts);
array_shift($t_parts);
$t_count = sizeof( $t_parts );
@@ -219,7 +219,7 @@ function __autoload( $className ) {
}
}

$t_parts = explode( '_', $className );
$t_parts = explode( '_', $p_class );
$t_count = sizeof( $t_parts );
$t_class = $t_parts[$t_count-1];
$t_name = implode( DIRECTORY_SEPARATOR, $t_parts ) . DIRECTORY_SEPARATOR;
@@ -240,7 +240,7 @@ function __autoload( $className ) {
return;
}

$t_require_path = $MantisConfig->class_path . $className . '.class.php';
$t_require_path = $MantisConfig->class_path . $p_class . '.class.php';

if ( file_exists( $t_require_path ) ) {
require_once( $t_require_path );
87 changes: 42 additions & 45 deletions core/bug_api.php
Original file line number Diff line number Diff line change
@@ -437,8 +437,8 @@ function bug_copy( $p_bug_id, $p_target_project_id = null, $p_copy_custom_fields
* Moves an issue from a project to another.
*
* @todo Validate with sub-project / category inheritance scenarios.
* @param int p_bug_id The bug to be moved.
* @param int p_target_project_id The target project to move the bug to.
* @param int $p_bug_id The bug to be moved.
* @param int $p_target_project_id The target project to move the bug to.
* @access public
*/
function bug_move( $p_bug_id, $p_target_project_id ) {
@@ -468,8 +468,7 @@ function bug_move( $p_bug_id, $p_target_project_id ) {

/**
* Delete all bugs associated with a project
* @param array p_project_id integer representing a projectid
* @return bool always true
* @param array $p_project_id integer representing a projectid
* @access public
* @uses database_api.php
*/
@@ -485,16 +484,14 @@ function bug_delete_all( $p_project_id ) {
# @todo should we check the return value of each bug_delete() and
# return false if any of them return false? Presumable bug_delete()
# will eventually trigger an error on failure so it won't matter...

return true;
}



/**
* Returns an object representing the specified bug
* @param int p_bug_id integer representing bug id
* @param bool p_get_extended included extended information (including bug_text)
* @param int $p_bug_id integer representing bug id
* @param bool $p_get_extended included extended information (including bug_text)
* @return MantisBug Bug Object
* @access public
*/
@@ -505,7 +502,7 @@ function bug_get( $p_bug_id, $p_get_extended = false ) {

/**
* Convert row [from database] to bug object
* @param array bug database row
* @param array $p_row bug database row
* @return MantisBug
*/
function bug_row_to_object( $p_row ) {
@@ -517,8 +514,8 @@ function bug_row_to_object( $p_row ) {
/**
* return the specified field of the given bug
* if the field does not exist, display a warning and return ''
* @param int p_bug_id integer representing bug id
* @param string p_fieldname field name
* @param int $p_bug_id integer representing bug id
* @param string $p_field_name field name
* @return string
* @access public
* @throws MantisBT\Exception\Database\FieldNotFound
@@ -536,8 +533,8 @@ function bug_get_field( $p_bug_id, $p_field_name ) {
/**
* return the bug summary
* this is a wrapper for the custom function
* @param int p_bug_id integer representing bug id
* @param int p_context representing SUMMARY_CAPTION, SUMMARY_FIELD
* @param int $p_bug_id integer representing bug id
* @param int $p_context representing SUMMARY_CAPTION, SUMMARY_FIELD
* @return string
* @access public
* @uses helper_api.php
@@ -549,7 +546,7 @@ function bug_format_summary( $p_bug_id, $p_context ) {
/**
* return the timestamp for the most recent time at which a bugnote
* associated with the bug was modified
* @param int p_bug_id integer representing bug id
* @param int $p_bug_id integer representing bug id
* @return bool|int false or timestamp in integer format representing newest bugnote timestamp
* @access public
* @uses database_api.php
@@ -572,7 +569,7 @@ function bug_get_newest_bugnote_timestamp( $p_bug_id ) {
* return the timestamp for the most recent time at which a bugnote
* associated with the bug was modified and the total bugnote
* count in one db query
* @param int p_bug_id integer representing bug id
* @param int $p_bug_id integer representing bug id
* @return object consisting of bugnote stats
* @access public
* @uses database_api.php
@@ -611,7 +608,7 @@ function bug_get_bugnote_stats( $p_bug_id ) {
* Get array of attachments associated with the specified bug id. The array will be
* sorted in terms of date added (ASC). The array will include the following fields:
* id, title, diskfile, filename, filesize, file_type, date_added, user_id.
* @param int p_bug_id integer representing bug id
* @param int $p_bug_id integer representing bug id
* @return array array of results or null
* @access public
* @uses database_api.php
@@ -735,10 +732,10 @@ function bug_set_field( $p_bug_id, $p_field_name, $p_value ) {

/**
* assign the bug to the given user
* @param MantisBug Bug Object
* @param int User id
* @param string bugnote text
* @param bool indicate whether bugnote is private
* @param MantisBug $p_bug Bug Object
* @param int $p_user_id User id
* @param string $p_bugnote_text bugnote text
* @param bool $p_bugnote_private indicate whether bugnote is private
* @return null
* @access public
* @uses database_api.php
@@ -784,10 +781,10 @@ function bug_assign( $p_bug, $p_user_id, $p_bugnote_text = '', $p_bugnote_privat

/**
* close the given bug
* @param BugData Bug Object
* @param string bugnote text
* @param bool bugnote private
* @param string time tracking
* @param MantisBug $p_bug Bug Object
* @param string $p_bugnote_text bugnote text
* @param bool $p_bugnote_private bugnote private
* @param string $p_time_tracking time tracking
* @return bool (always true)
* @access public
*/
@@ -807,14 +804,14 @@ function bug_close( $p_bug, $p_bugnote_text = '', $p_bugnote_private = false, $p

/**
* resolve the given bug
* @param MantisBug Bug Object
* @param int resolution
* @param string fixed in version
* @param string bugnote text
* @param int duplicate id
* @param int handler id
* @param bool private bugnote
* @param string time tracking
* @param MantisBug $p_bug Bug Object
* @param int $p_resolution resolution
* @param string $p_fixed_in_version fixed in version
* @param string $p_bugnote_text bugnote text
* @param int $p_duplicate_id duplicate id
* @param int $p_handler_id handler id
* @param bool $p_bugnote_private private bugnote
* @param string $p_time_tracking time tracking
* @return bool (alawys true)
* @access public
*/
@@ -894,10 +891,10 @@ function bug_resolve( $p_bug, $p_resolution, $p_fixed_in_version = '', $p_bugnot

/**
* reopen the given bug
* @param int p_bug_id
* @param string p_bugnote_text
* @param string p_time_tracking
* @param bool p_bugnote_private
* @param int $p_bug_id
* @param string $p_bugnote_text
* @param string $p_time_tracking
* @param bool $p_bugnote_private
* @return bool (always true)
* @access public
* @uses database_api.php
@@ -921,7 +918,7 @@ function bug_reopen( $p_bug_id, $p_bugnote_text = '', $p_time_tracking = '0:00',

/**
* updates the last_updated field
* @param int p_bug_id integer representing bug ids
* @param int $p_bug_id integer representing bug ids
* @return bool (always true)
* @access public
* @uses database_api.php
@@ -937,9 +934,9 @@ function bug_update_date( $p_bug_id ) {

/**
* enable monitoring of this bug for the user
* @param int p_bug_id integer representing bug ids
* @param int p_user_id integer representing user ids
* @return true if successful, false if unsuccessful
* @param int $p_bug_id integer representing bug ids
* @param int $p_user_id integer representing user ids
* @return bool true if successful, false if unsuccessful
* @access public
* @uses database_api.php
* @uses history_api.php
@@ -1004,8 +1001,8 @@ function bug_get_monitors( $p_bug_id ) {

/**
* Copy list of users monitoring a bug to the monitor list of a second bug
* @param int p_source_bug_id integer representing the bug ID of the source bug
* @param int p_dest_bug_id integer representing the bug ID of the destination bug
* @param int $p_source_bug_id integer representing the bug ID of the source bug
* @param int $p_dest_bug_id integer representing the bug ID of the destination bug
* @return bool (always true)
* @access public
* @uses database_api.php
@@ -1032,8 +1029,8 @@ function bug_monitor_copy( $p_source_bug_id, $p_dest_bug_id ) {
/**
* disable monitoring of this bug for the user
* if $p_user_id = null, then bug is unmonitored for all users.
* @param int p_bug_id integer representing bug ids
* @param int p_user_id integer representing user ids
* @param int $p_bug_id integer representing bug ids
* @param int $p_user_id integer representing user ids
* @return bool (always true)
* @access public
* @uses database_api.php
@@ -1062,7 +1059,7 @@ function bug_unmonitor( $p_bug_id, $p_user_id ) {

/**
* Pads the bug id with the appropriate number of zeros.
* @param int p_bug_id
* @param int $p_bug_id
* @return string
* @access public
* @uses config_api.php
22 changes: 11 additions & 11 deletions core/bug_group_action_api.php
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ function bug_group_action_print_bottom() {
/**
* Print the list of selected issues and the legend for the status colors.
*
* @param $p_bug_ids_array An array of issue ids.
* @param array $p_bug_ids_array An array of issue ids.
*/
function bug_group_action_print_bug_list( $p_bug_ids_array ) {
$t_legend_position = config_get( 'status_legend_position' );
@@ -119,7 +119,7 @@ function bug_group_action_print_bug_list( $p_bug_ids_array ) {
* Print the array of issue ids via hidden fields in the form to be passed on to
* the bug action group action page.
*
* @param $p_bug_ids_array An array of issue ids.
* @param array $p_bug_ids_array An array of issue ids.
*/
function bug_group_action_print_hidden_fields( $p_bug_ids_array ) {
foreach( $p_bug_ids_array as $t_bug_id ) {
@@ -132,7 +132,7 @@ function bug_group_action_print_hidden_fields( $p_bug_ids_array ) {
* and the submit button. This ends up calling action_<action>_print_fields()
* from bug_actiongroup_<action>_inc.php
*
* @param $p_action The custom action name without the "EXT_" prefix.
* @param string $p_action The custom action name without the "EXT_" prefix.
*/
function bug_group_action_print_action_fields( $p_action ) {
$t_function_name = 'action_' . $p_action . '_print_fields';
@@ -143,7 +143,7 @@ function bug_group_action_print_action_fields( $p_action ) {
* Prints some title text for the custom action page. This ends up calling
* action_<action>_print_title() from bug_actiongroup_<action>_inc.php
*
* @param $p_action The custom action name without the "EXT_" prefix.
* @param string $p_action The custom action name without the "EXT_" prefix.
*/
function bug_group_action_print_title( $p_action ) {
$t_function_name = 'action_' . $p_action . '_print_title';
@@ -154,10 +154,10 @@ function bug_group_action_print_title( $p_action ) {
* Validates the combination of an action and a bug. This ends up calling
* action_<action>_validate() from bug_actiongroup_<action>_inc.php
*
* @param $p_action The custom action name without the "EXT_" prefix.
* @param $p_bug_id The id of the bug to validate the action on.
* @param string $p_action The custom action name without the "EXT_" prefix.
* @param int $p_bug_id The id of the bug to validate the action on.
*
* @returns true|array true if action can be applied or array of ( bug_id => reason for failure to validate )
* @returns bool|array true if action can be applied or array of ( bug_id => reason for failure to validate )
*/
function bug_group_action_validate( $p_action, $p_bug_id ) {
$t_function_name = 'action_' . $p_action . '_validate';
@@ -168,9 +168,9 @@ function bug_group_action_validate( $p_action, $p_bug_id ) {
* Executes an action on a bug. This ends up calling
* action_<action>_process() from bug_actiongroup_<action>_inc.php
*
* @param $p_action The custom action name without the "EXT_" prefix.
* @param $p_bug_id The id of the bug to validate the action on.
* @returns true|array Action can be applied., ( bug_id => reason for failure to process )
* @param string $p_action The custom action name without the "EXT_" prefix.
* @param int $p_bug_id The id of the bug to validate the action on.
* @returns bool|array Action can be applied., ( bug_id => reason for failure to process )
*/
function bug_group_action_process( $p_action, $p_bug_id ) {
$t_function_name = 'action_' . $p_action . '_process';
@@ -180,7 +180,7 @@ function bug_group_action_process( $p_action, $p_bug_id ) {
/**
* Get a list of bug group actions available to the current user for one or
* more projects.
* @param array An array containing one or more project IDs
* @param array $p_project_ids An array containing one or more project IDs
* @return null
*/
function bug_group_action_get_commands( $p_project_ids = null ) {
4 changes: 2 additions & 2 deletions core/bugnote_api.php
Original file line number Diff line number Diff line change
@@ -171,7 +171,7 @@ function bugnote_is_user_reporter( $p_bugnote_id, $p_user_id ) {
* @param int $p_date_submitted date submitted (defaults to now())
* @param int $p_last_modified last modification date (defaults to now())
* @param bool $p_skip_bug_update skip bug last modification update (useful when importing bugs/bugnotes)
* @return false|int false or indicating bugnote id added
* @return bool|int false or indicating bugnote id added
* @access public
* @throws MantisBT\Exception\Field\EmptyField
*/
@@ -337,7 +337,7 @@ function bugnote_get_latest_id( $p_bug_id ) {
* Bugnotes are sorted by date_submitted according to 'bugnote_order' configuration setting.
* Return BugnoteData class object with raw values from the tables except the field
* last_modified - it is UNIX_TIMESTAMP.
* @param BugData $p_bug Bug Object
* @param MantisBug $p_bug Bug Object
* @param int $p_user_bugnote_order sort order
* @param int $p_user_bugnote_limit number of bugnotes to display to user
* @param int $p_user_id user id
Loading