diff --git a/Source/lang/strings_english.txt b/Source/lang/strings_english.txt
index 830eca5..71720c2 100644
--- a/Source/lang/strings_english.txt
+++ b/Source/lang/strings_english.txt
@@ -39,6 +39,7 @@
$s_plugin_Source_date_end = 'Ending Date';
$s_plugin_Source_message = 'Message';
$s_plugin_Source_filename = 'Filename';
+$s_plugin_Source_ported = 'Ported';
$s_plugin_Source_issue = 'Issue';
$s_plugin_Source_issues = 'Issues';
@@ -57,6 +58,8 @@
$s_plugin_Source_permalink = 'Permalink';
$s_plugin_Source_select_one = '(Select one)';
$s_plugin_Source_select_any = '[any]';
+$s_plugin_Source_pending = 'Pending';
+$s_plugin_Source_na = 'N/A';
$s_plugin_Source_back = 'Back to Index';
$s_plugin_Source_import_full = 'Import Everything';
diff --git a/Source/pages/update.php b/Source/pages/update.php
new file mode 100644
index 0000000..05c351d
--- /dev/null
+++ b/Source/pages/update.php
@@ -0,0 +1,38 @@
+load_branches();
+
+if ( plugin_config_get( 'enable_porting' ) ) {
+ $f_ported = gpc_get_string( 'ported', '' );
+
+ if ( 0 == $f_ported || in_array( $f_ported, $t_repo->branches ) ) {
+ $t_changeset->ported = $f_ported;
+ }
+}
+
+$t_changeset->save();
+
+print_successful_redirect( plugin_page( 'view', true ) . '&id=' . $t_changeset->id );
+
diff --git a/Source/pages/view.php b/Source/pages/view.php
index 99828cc..332c94d 100644
--- a/Source/pages/view.php
+++ b/Source/pages/view.php
@@ -12,6 +12,7 @@
# GNU General Public License for more details.
access_ensure_global_level( plugin_config_get( 'view_threshold' ) );
+$t_can_update = access_has_project_level( plugin_config_get( 'update_threshold' ) );
$f_changeset_id = gpc_get_int( 'id' );
$f_offset = gpc_get_int( 'offset', 0 );
@@ -22,10 +23,13 @@
bug_cache_array_rows( $t_changeset->bugs );
$t_repos = SourceRepo::load_by_changesets( $t_changeset );
-if ( count( $t_repos ) > 0 ) {
- $t_repo = array_shift( $t_repos );
+if ( count( $t_repos ) < 1 ) {
+ trigger_error( ERROR_GENERIC, ERROR );
}
+$t_repo = array_shift( $t_repos );
+$t_repo->load_branches();
+
if ( $t_changeset->parent ) {
$t_changeset_parent = SourceChangeset::load_by_revision( $t_repo, $t_changeset->parent );
} else {
@@ -34,15 +38,28 @@
$t_type = SourceType($t_repo->type);
+$t_use_porting = plugin_config_get( 'enable_porting' );
+
+$t_columns =
+ ( $t_use_porting ? 1 : 0 ) +
+ 4;
+
+$t_update_form = $t_use_porting || false;
+
html_page_top1( plugin_lang_get( 'title' ) );
html_page_top2();
?>
-