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: e82cfe9
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3658921
Choose a head ref
  • 4 commits
  • 59 files changed
  • 1 contributor

Commits on Sep 18, 2011

  1. Remove helper_alternate_class_no_attribute function

    The helper_alternate_class_no_attribute function used to add odd and
    even classes to HTML elements. This is not needed with modern CSS styled
    layouts.
    
    Stylesheets will need to be updated to provide the correct styling now
    that this function has been removed.
    davidhicks committed Sep 18, 2011

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    cca9c64 View commit details
  2. Remove helper_alternate_class function

    The helper_alternate_class function used to add odd and even classes to HTML
    elements. This is not needed with modern CSS styled layouts.
    
    Stylesheets will need to be updated to provide the correct styling now
    that this function has been removed.
    davidhicks committed Sep 18, 2011

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    9d64c8e View commit details
  3. Remove helper_alternate_colors function

    The helper_alternate_colors function used to add odd and even classes to HTML
    elements. This is not needed with modern CSS styled layouts.
    
    Stylesheets will need to be updated to provide the correct styling now
    that this function has been removed.
    davidhicks committed Sep 18, 2011

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    066ad4d View commit details
  4. Fix install script to work with new Database API

    Implementation of the new database API has broken the install script.
    This patch updates the install script to work with the current state of
    the database API. In particular, we now use exceptions for getting
    errors from the database.
    
    Also fixed an XHTML strictness bug with a closing </tr> being
    out-of-place.
    davidhicks committed Sep 18, 2011

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    3658921 View commit details
Showing with 393 additions and 518 deletions.
  1. +2 −2 application/core/authentication_api.php
  2. +0 −66 application/core/helper_api.php
  3. +7 −7 application/core/summary_api.php
  4. +4 −5 docbook/Developers_Guide/en-US/Plugins_Building.xml
  5. +2 −2 docbook/Developers_Guide/en-US/Plugins_Building_Source.xml
  6. +10 −10 public/account_page.php
  7. +16 −16 public/account_prefs_inc.php
  8. +8 −8 public/account_prof_menu_page.php
  9. +6 −6 public/adm_config_report.php
  10. +1 −3 public/adm_permissions_report.php
  11. +1 −1 public/admin/db_stats.php
  12. +1 −1 public/admin/index.php
  13. +100 −120 public/admin/install.php
  14. +1 −1 public/admin/move_db2disk.php
  15. +4 −4 public/billing_inc.php
  16. +1 −3 public/bug_actiongroup_attach_tags_inc.php
  17. +1 −1 public/bug_actiongroup_page.php
  18. +10 −10 public/bug_change_status_page.php
  19. +1 −1 public/bug_reminder_page.php
  20. +24 −24 public/bug_report_page.php
  21. +3 −3 public/bug_revision_view_page.php
  22. +17 −17 public/bug_update_advanced_page.php
  23. +17 −19 public/bug_view_inc.php
  24. +1 −1 public/bugnote_add_inc.php
  25. +2 −2 public/bugnote_stats_inc.php
  26. +1 −1 public/history_inc.php
  27. +4 −4 public/login_page.php
  28. +2 −2 public/login_select_proj_page.php
  29. +2 −2 public/lost_pwd_page.php
  30. +5 −5 public/manage_columns_inc.php
  31. +1 −1 public/manage_config_email_page.php
  32. +3 −3 public/manage_config_work_threshold_page.php
  33. +7 −7 public/manage_config_workflow_page.php
  34. +21 −21 public/manage_custom_field_edit_page.php
  35. +1 −1 public/manage_custom_field_page.php
  36. +5 −5 public/manage_overview_page.php
  37. +2 −4 public/manage_plugin_page.php
  38. +2 −2 public/manage_proj_cat_edit_page.php
  39. +7 −7 public/manage_proj_create_page.php
  40. +14 −30 public/manage_proj_edit_page.php
  41. +2 −2 public/manage_proj_page.php
  42. +5 −5 public/manage_proj_ver_edit_page.php
  43. +3 −3 public/manage_tags_page.php
  44. +8 −8 public/manage_user_create_page.php
  45. +10 −10 public/manage_user_edit_page.php
  46. +2 −8 public/manage_user_page.php
  47. +5 −5 public/news_edit_page.php
  48. +6 −6 public/news_menu_page.php
  49. +3 −3 public/plugins/MantisCoreFormatting/pages/config.php
  50. +7 −7 public/plugins/MantisGraph/pages/config.php
  51. +1 −4 public/print_all_bug_options_inc.php
  52. +1 −2 public/print_all_bug_page.php
  53. +1 −1 public/proj_doc_page.php
  54. +1 −3 public/query_view_page.php
  55. +3 −3 public/signup_page.php
  56. +2 −4 public/tag_attach.php
  57. +6 −6 public/tag_update_page.php
  58. +7 −7 public/tag_view_page.php
  59. +3 −3 public/view_user_page.php
4 changes: 2 additions & 2 deletions application/core/authentication_api.php
Original file line number Diff line number Diff line change
@@ -723,12 +723,12 @@ function auth_reauthenticate_page( $p_user_id, $p_username ) {
?>

<input type="hidden" name="_authenticate" value="1" />
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container">
<label for="username"><span><?php echo lang_get( 'username' );?></span></label>
<span class="input"><input id="username" type="text" disabled="disabled" size="32" maxlength="<?php echo DB_FIELD_SIZE_USERNAME;?>" value="<?php echo string_attribute( $p_username );?>" /></span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container">
<label for="password"><span><?php echo lang_get( 'password' );?></span></label>
<span class="input"><input id="password" type="password" name="password" size="32" maxlength="<?php echo auth_get_password_max_size(); ?>" class="autofocus" /></span>
<span class="label-style"></span>
66 changes: 0 additions & 66 deletions application/core/helper_api.php
Original file line number Diff line number Diff line change
@@ -54,72 +54,6 @@
require_api( 'user_pref_api.php' );
require_api( 'utility_api.php' );

/**
* alternate color function
* If no index is given, continue alternating based on the last index given
* @param int $p_index
* @param string $p_odd_color
* @param string $p_even_color
* @return string
*/
function helper_alternate_colors( $p_index, $p_odd_color, $p_even_color ) {
static $t_index = 1;

if( null !== $p_index ) {
$t_index = $p_index;
}

if( 1 == $t_index++ % 2 ) {
return $p_odd_color;
} else {
return $p_even_color;
}
}

/**
* alternate classes for table rows
* If no index is given, continue alternating based on the last index given
* @param int $p_index
* @param string $p_odd_class default: row-1
* @param string $p_even_class default: row-2
* @return string
*/
function helper_alternate_class( $p_index = null, $p_odd_class = 'row-1', $p_even_class = 'row-2' ) {
static $t_index = 1;

if( null !== $p_index ) {
$t_index = $p_index;
}

if( 1 == $t_index++ % 2 ) {
return "class=\"$p_odd_class\"";
} else {
return "class=\"$p_even_class\"";
}
}

/**
* return alternate classes for rows, no attribute
* If no index is given, continue alternating based on the last index given
* @param int $p_index
* @param string $p_odd_class default: odd
* @param string $p_even_class default: even
* @return string
*/
function helper_alternate_class_no_attribute( $p_index = null, $p_odd_class = 'odd', $p_even_class = 'even' ) {
static $t_index = 1;

if( null !== $p_index ) {
$t_index = $p_index;
}

if( 1 == $t_index++ % 2 ) {
return $p_odd_class;
} else {
return $p_even_class;
}
}

/**
* get the color string for the given status
* @param int $p_status
14 changes: 7 additions & 7 deletions application/core/summary_api.php
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@
require_api( 'utility_api.php' );

function summary_helper_print_row( $p_label, $p_open, $p_resolved, $p_closed, $p_total ) {
printf( '<tr %s>', helper_alternate_class() );
print( '<tr>' );
printf( '<td width="50%%">%s</td>', string_display_line( $p_label ) );
printf( '<td width="12%%" class="right">%s</td>', $p_open );
printf( '<td width="12%%" class="right">%s</td>', $p_resolved );
@@ -276,7 +276,7 @@ function summary_print_by_date( $p_date_array ) {
$t_start_date = mktime( 0, 0, 0, date( 'm' ), ( date( 'd' ) - $t_days ), date( 'Y' ) );
$t_new_bugs_link = '<a class="subtle" href="' . config_get( 'bug_count_hyperlink_prefix' ) . '&amp;' . FILTER_PROPERTY_FILTER_BY_DATE . '=on&amp;' . FILTER_PROPERTY_START_YEAR . '=' . date( 'Y', $t_start_date ) . '&amp;' . FILTER_PROPERTY_START_MONTH . '=' . date( 'm', $t_start_date ) . '&amp;' . FILTER_PROPERTY_START_DAY . '=' . date( 'd', $t_start_date ) . '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=">';

print( "<tr " . helper_alternate_class() . ">\n" );
print( "<tr>\n" );
print( " <td width=\"50%\">" . $t_days . "</td>\n" );

if( $t_new_count > 0 ) {
@@ -359,7 +359,7 @@ function summary_print_by_activity() {
$t_summary = string_display_line( $row['summary'] );
$t_notescount = $row['count'];

print "<tr " . helper_alternate_class() . ">\n";
print "<tr>\n";
print "<td class=\"small\">$t_bugid - $t_summary</td><td class=\"right\">$t_notescount</td>\n";
print "</tr>\n";
}
@@ -401,7 +401,7 @@ function summary_print_by_age() {
$t_summary = string_display_line( $row['summary'] );
$t_days_open = intval(( time() - $row['date_submitted'] ) / SECONDS_PER_DAY );

print "<tr " . helper_alternate_class() . ">\n";
print "<tr>\n";
print "<td class=\"small\">$t_bugid - $t_summary</td><td class=\"right\">$t_days_open</td>\n";
print "</tr>\n";
}
@@ -816,7 +816,7 @@ function summary_print_developer_resolution( $p_resolution_enum_string ) {
# users that aren't actually developers...

if( $t_arr2['total'] > 0 ) {
echo '<tr ' . helper_alternate_class( $t_row_count ) . '>';
echo '<tr>';
$t_row_count++;
echo '<td>';
echo string_display_line( user_get_name( $t_handler_id ) );
@@ -927,7 +927,7 @@ function summary_print_reporter_resolution( $p_resolution_enum_string ) {
if( $t_total_user_bugs > 0 ) {
$t_arr2 = $t_reporter_res_arr[$t_reporter_id];

echo '<tr ' . helper_alternate_class( $t_row_count ) . '>';
echo '<tr>';
$t_row_count++;
echo '<td>';
echo string_display_line( user_get_name( $t_reporter_id ) );
@@ -1051,7 +1051,7 @@ function summary_print_reporter_effectiveness( $p_severity_enum_string, $p_resol
if( $t_total_user_bugs > 0 ) {
$t_arr2 = $t_reporter_ressev_arr[$t_reporter_id];

echo '<tr ' . helper_alternate_class( $t_row_count ) . '>';
echo '<tr>';
$t_row_count++;
echo '<td>';
echo string_display_line( user_get_name( $t_reporter_id ) );
9 changes: 4 additions & 5 deletions docbook/Developers_Guide/en-US/Plugins_Building.xml
Original file line number Diff line number Diff line change
@@ -451,12 +451,12 @@ $t_foo_or_bar = plugin_config_get( 'foo_or_bar' );
&lt;td class="form-title" rowspan="2"&gt;&lt;?php echo plugin_lang_get( 'configuration' ) ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr &lt;?php echo helper_alternate_class() ?&gt;&gt;
&lt;tr&gt;
&lt;td class="category"&gt;&lt;php echo plugin_lang_get( 'foo_or_bar' ) ?&gt;&lt;/td&gt;
&lt;td&gt;&lt;input name="foo_or_bar" value="&lt;?php echo string_attribute( $t_foo_or_bar ) ?&gt;"/&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr &lt;?php echo helper_alternate_class() ?&gt;&gt;
&lt;tr&gt;
&lt;td class="category"&gt;&lt;php echo plugin_lang_get( 'reset' ) ?&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="checkbox" name="reset"/&gt;&lt;/td&gt;
&lt;/tr&gt;
@@ -477,9 +477,8 @@ html_page_bottom();
The two calls to <function>html_page_top()</function> and
<function>html_page_bottom()</function> trigger the standard MantisBT header and
footer portions, respectively, which also displays things such as the menus and
triggers other layout-related events. <function>helper_alternate_class()</function>
generates the CSS classes for alternating row colors in the table. The rest of the
HTML and CSS follows the "standard" MantisBT markup styles for content and layout.
triggers other layout-related events. The rest of the HTML and CSS follows the
"standard" MantisBT markup styles for content and layout.
</para>
</sect2>

4 changes: 2 additions & 2 deletions docbook/Developers_Guide/en-US/Plugins_Building_Source.xml
Original file line number Diff line number Diff line change
@@ -121,12 +121,12 @@ $t_foo_or_bar = plugin_config_get( 'foo_or_bar' );
&lt;td class="form-title" rowspan="2"&gt;&lt;?php echo plugin_lang_get( 'configuration' ) ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr &lt;?php echo helper_alternate_class() ?&gt;&gt;
&lt;tr&gt;
&lt;td class="category"&gt;&lt;php echo plugin_lang_get( 'foo_or_bar' ) ?&gt;&lt;/td&gt;
&lt;td&gt;&lt;input name="foo_or_bar" value="&lt;?php echo string_attribute( $t_foo_or_bar ) ?&gt;"/&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr &lt;?php echo helper_alternate_class() ?&gt;&gt;
&lt;tr&gt;
&lt;td class="category"&gt;&lt;php echo plugin_lang_get( 'reset' ) ?&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="checkbox" name="reset"/&gt;&lt;/td&gt;
&lt;/tr&gt;
20 changes: 10 additions & 10 deletions public/account_page.php
Original file line number Diff line number Diff line change
@@ -125,12 +125,12 @@

if ( !helper_call_custom_function( 'auth_can_change_password', array() ) ) {
# With LDAP --> ?>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container">
<span class="display-label"><span><?php echo lang_get( 'username' ) ?></span></span>
<span class="input"><span class="field-value"><?php echo string_display_line( $u_username ) ?></span></span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container">
<span class="display-label"><span><?php echo lang_get( 'password' ) ?></span></span>
<span class="input"><span class="field-value"><?php echo lang_get( 'no_password_change' ) ?></span></span>
<span class="label-style"></span>
@@ -139,23 +139,23 @@
# Without LDAP
$t_show_update_button = true;
?>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container">
<span class="display-label"><span><?php echo lang_get( 'username' ) ?></span></span>
<span class="input"><span class="field-value"><?php echo string_display_line( $u_username ) ?></span></span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container">
<label for="password" <?php if ( $t_force_pw_reset ) { ?> class="required" <?php } ?>><span><?php echo lang_get( 'password' ) ?></span></label>
<span class="input"><input id="password" type="password" name="password" size="32" maxlength="<?php echo auth_get_password_max_size(); ?>" /></span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container">
<label for="password-confirm" <?php if ( $t_force_pw_reset ) { ?> class="required" <?php } ?>><span><?php echo lang_get( 'confirm_password' ) ?></span></label>
<span class="input"><input id="password-confirm" type="password" name="password_confirm" size="32" maxlength="<?php echo auth_get_password_max_size(); ?>" /></span>
<span class="label-style"></span>
</div><?php
} ?>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container">
<span class="display-label"><span><?php echo lang_get( 'email' ) ?></span></span>
<span class="input"><?php
if ( $t_ldap && ON == config_get( 'use_ldap_email' ) ) {
@@ -169,7 +169,7 @@
</span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>"><?php
<div class="field-container"><?php
if ( $t_ldap && ON == config_get( 'use_ldap_realname' ) ) {
# With LDAP
echo '<span class="display-label"><span>' . lang_get( 'realname' ) . '</span></span>';
@@ -188,20 +188,20 @@
} ?>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container">
<span class="display-label"><span><?php echo lang_get( 'access_level' ) ?></span></span>
<span class="input"><span class="field-value"><?php echo get_enum_element( 'access_levels', $u_access_level ); ?></span></span>
<span class="label-style"></span>
</div>
<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
<div class="field-container">
<span class="display-label"><span><?php echo lang_get( 'access_level_project' ) ?></span></span>
<span class="input"><span class="field-value"><?php echo get_enum_element( 'access_levels', current_user_get_access_level() ); ?></span></span>
<span class="label-style"></span>
</div>
<?php
$t_projects = user_get_assigned_projects( auth_get_current_user_id() );
if( count( $t_projects ) > 0 ) {
echo '<div class="field-container ' . helper_alternate_class_no_attribute() . '">';
echo '<div class="field-container">';
echo '<span class="display-label"><span>' . lang_get( 'assigned_projects' ) . '</span></span>';
echo '<div class="input">';
echo '<ul class="project-list">';
Loading