diff --git a/Source/pages/checkin.php b/Source/pages/checkin.php index a17e846..f7b9f8c 100755 --- a/Source/pages/checkin.php +++ b/Source/pages/checkin.php @@ -66,13 +66,11 @@ $t_repo = $t_predata['repo']; $f_data = $t_predata['data']; } else { - $f_repo_name = gpc_get_string( 'repo_name' ); + $f_repo_name = gpc_get_string('repo_name',''); $f_data = gpc_get_string( 'data' ); - # Try to find the repository by name $t_repo = SourceRepo::load_by_name( $f_repo_name ); } - # Repo not found if ( is_null( $t_repo ) ) { die( plugin_lang_get( 'invalid_repo' ) ); diff --git a/SourceGithub/SourceGithub.php b/SourceGithub/SourceGithub.php index 0803644..5261d5c 100644 --- a/SourceGithub/SourceGithub.php +++ b/SourceGithub/SourceGithub.php @@ -210,7 +210,8 @@ $t_commits[] = $t_commit['id']; } - $t_branch = $p_data['ref_name']; + $t_refData = split('/',$p_data['ref']); + $t_branch = $t_refData[2]; return $this->import_commits( $p_repo, $t_commits, $t_branch ); }