diff --git a/Source/Source.API.php b/Source/Source.API.php index 0101152..3c4f68d 100644 --- a/Source/Source.API.php +++ b/Source/Source.API.php @@ -422,7 +422,7 @@ */ function load_mappings() { if ( count( $this->mappings ) < 1 ) { - $this->mappings = SourceMapping::load_by_repo( $this ); + $this->mappings = SourceMapping::load_by_repo( $this->id ); } return $this->mappings; @@ -1128,11 +1128,11 @@ * @param object Repository object * @param array Mapping objects */ - static function load_by_repo( $p_repo ) { + static function load_by_repo( $p_repo_id ) { $t_branch_table = plugin_table( 'branch' ); $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_result = db_query_bound( $t_query, array( $p_repo_id ) ); $t_mappings = array();