diff --git a/SourceSVN/SourceSVN.php b/SourceSVN/SourceSVN.php index cf6bd57..e31a0fd 100644 --- a/SourceSVN/SourceSVN.php +++ b/SourceSVN/SourceSVN.php @@ -19,7 +19,6 @@ public function register() { $this->name = lang_get( 'plugin_SourceSVN_title' ); $this->description = lang_get( 'plugin_SourceSVN_description' ); - $this->page = 'config_page'; $this->version = '0.14'; $this->requires = array( @@ -46,6 +45,8 @@ public $type = 'svn'; + public $configuration = true; + public function show_type() { return lang_get( 'plugin_SourceSVN_svn' ); } @@ -119,6 +120,50 @@ return $p_repo; } + private static $config_form_handled = false; + + public function update_config_form() { + # Prevent more than one SVN class from outputting form elements. + if ( !SourceSVNPlugin::$config_form_handled ) { + SourceSVNPlugin::$config_form_handled = true; + + $t_svnpath = config_get( 'plugin_SourceSVN_svnpath', '' ); + +?> +> + + + +svn_call( $p_repo ); @@ -218,7 +263,7 @@ if ( is_null( $s_binary ) || $p_reset ) { if ( is_null( $p_path ) ) { - $t_path = config_get( 'plugin_SourceSVN_svnpath' ); + $t_path = config_get( 'plugin_SourceSVN_svnpath', '' ); } else { $t_path = $p_path; } @@ -237,10 +282,10 @@ return $s_binary = $t_binary; } - } else { - # Generic pathless call - return $s_binary = 'svn'; } + + # Generic pathless call + $s_binary = 'svn'; } return $s_binary; diff --git a/SourceSVN/pages/config_page.php b/SourceSVN/pages/config_page.php deleted file mode 100644 index cf3261b..0000000 --- a/SourceSVN/pages/config_page.php +++ /dev/null @@ -1,45 +0,0 @@ - - -
-
- - - - - - - -> - - - - - - - - -
-
- -