diff --git a/Source/Source.php b/Source/Source.php index 87bb276..3d491d2 100644 --- a/Source/Source.php +++ b/Source/Source.php @@ -25,6 +25,7 @@ $this->version = plugin_lang_get( 'version' ); $this->requires = array( 'MantisCore' => '1.2.0', + 'Meta' => '0.1', ); $this->page = 'manage_config_page'; diff --git a/SourceGithub/SourceGithub.php b/SourceGithub/SourceGithub.php index 61cc29e..e54586c 100644 --- a/SourceGithub/SourceGithub.php +++ b/SourceGithub/SourceGithub.php @@ -17,18 +17,6 @@ require_once( config_get( 'core_path' ) . 'json_api.php' ); -if ( !function_exists( 'sgh_map' ) ) { - function sgh_map( $func, $list ) { - $new_list = array(); - - foreach( $list as $key => $item ) { - $new_list[$key] = call_user_func( 'trim', $item ); - } - - return $new_list; - } -} - class SourceGithubPlugin extends MantisSourcePlugin { function register() { $this->name = lang_get( 'plugin_SourceGithub_title' ); @@ -38,6 +26,7 @@ $this->requires = array( 'MantisCore' => '1.2.0', 'Source' => '0.11', + 'Meta' => '0.1', ); $this->author = 'John Reese'; @@ -256,7 +245,7 @@ $t_branch = 'master'; } - $t_branches = sgh_map( 'trim', explode( ',', $t_branch ) ); + $t_branches = map( 'trim', explode( ',', $t_branch ) ); foreach( $t_branches as $t_branch ) { $t_result = $this->import_commits( $p_repo, $this->uri_base( $p_repo ), $t_branch, $t_branch );