diff --git a/SourceGitweb/SourceGitweb.php b/SourceGitweb/SourceGitweb.php index 5a1d27d..72cb7a3 100644 --- a/SourceGitweb/SourceGitweb.php +++ b/SourceGitweb/SourceGitweb.php @@ -138,10 +138,36 @@ if ( is_blank( $t_branch ) ) { $t_branch = 'master'; } + + if ($t_branch != '*') + { + $t_branches = map( 'trim', explode( ',', $t_branch ) ); + } + else + { + $t_heads_url = $this->uri_base( $p_repo ) . 'a=heads'; + $t_branches_input = url_get( $t_heads_url ); + + $t_branches_input = str_replace( array(PHP_EOL, '<', '>', ' '), array('', '<', '>', ' '), $t_branches_input ); + + $t_branches_input_p1 = strpos( $t_branches_input, '' ); + $t_branches_input_p2 = strpos( $t_branches_input, '