Skip to content

Commit

Permalink
Fixes #78: Encourage customers to add payment and end trial.
Browse files Browse the repository at this point in the history
Conflicts:
	library/disposable
	view_all_bug_page.php
  • Loading branch information
vboctor committed Nov 3, 2014
1 parent eda7369 commit e48ad0a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/mantishub_api.php
Expand Up @@ -21,6 +21,18 @@ function mantishub_impersonation() {
return $t_impersonation == 1;
}

function mantishub_top_message() {
global $g_mantishub_info_trial;

if ( $g_mantishub_info_trial && current_user_is_administrator() ) {
$t_issues_count = mantishub_table_row_count( db_get_table( 'mantis_bug_table' ) );

if ( $t_issues_count >= 5 ) {
echo '<div style="background-color: #fff494; z-index: 10; position: absolute; right: 5px; top: 5px; text-align: right;"><b>Trial Version:</b> Click <a href="http://www.mantishub.com/docs/faq.html#how-do-i-add-payment-method" target="_blank">here</a> to convert to paid and enable daily backups.</div>';
}
}
}

/**
* Get the username of an enabled administrator account.
* @returns user name.
Expand Down
1 change: 1 addition & 0 deletions view_all_bug_page.php
Expand Up @@ -108,6 +108,7 @@
html_meta_redirect( 'view_all_bug_page.php' . $t_query, current_user_get_pref( 'refresh_delay' ) * 60 );
}

mantishub_top_message();
html_page_top2();

print_recently_visited();
Expand Down

0 comments on commit e48ad0a

Please sign in to comment.