diff --git a/Source/Source.API.php b/Source/Source.API.php
index b59b470..cf8453c 100644
--- a/Source/Source.API.php
+++ b/Source/Source.API.php
@@ -1084,6 +1084,20 @@
}
/**
+ * Delete a branch mapping.
+ */
+ function delete() {
+ $t_branch_table = plugin_table( 'branch' );
+
+ if ( !$this->_new ) {
+ $t_query = "DELETE FROM $t_branch_table WHERE repo_id=" . db_param() . ' AND branch=' . db_param();
+ db_query_bound( $t_query, array( $this->repo_id, $this->branch ) );
+
+ $this->_new = true;
+ }
+ }
+
+ /**
* Load a group of mapping objects for a given repository.
* @param object Repository object
* @param array Mapping objects
@@ -1091,7 +1105,7 @@
static function load_by_repo( $p_repo ) {
$t_branch_table = plugin_table( 'branch' );
- $t_query = "SELECT * FROM $t_branch_table WHERE repo_id=" . db_param();
+ $t_query = "SELECT * FROM $t_branch_table WHERE repo_id=" . db_param() . ' ORDER BY branch';
$t_result = db_query_bound( $t_query, array( $p_repo->id ) );
$t_mappings = array();
diff --git a/Source/pages/repo_manage_page.php b/Source/pages/repo_manage_page.php
index 4b523bc..d06bbb0 100644
--- a/Source/pages/repo_manage_page.php
+++ b/Source/pages/repo_manage_page.php
@@ -22,7 +22,7 @@
function display_strategies( $p_type=null ) {
if ( is_null( $p_type ) ) {
- echo '';
+ echo '';
}
echo '