diff --git includes/VersioncontrolRepository.php includes/VersioncontrolRepository.php index a27d1ab..a42ffe9 100644 --- includes/VersioncontrolRepository.php +++ includes/VersioncontrolRepository.php @@ -370,11 +370,11 @@ abstract class VersioncontrolRepository implements VersioncontrolEntityInterface $plugin = $this->getPlugin('webviewer_url_handler', 'webviewer_url_handlers'); $class_name = ctools_plugin_get_class($plugin, 'handler'); if (!class_exists($class_name)) { - throw new Exception("Plugin 'webviewer_url_handler' of type 'webviewer_url_handlers' does not contain a valid class name in handler slot 'handler'", E_WARNING); + throw new Exception("Plugin '{$this->plugins['webviewer_url_handler']}' of type 'webviewer_url_handlers' does not contain a valid class name in handler slot 'handler'", E_WARNING); return FALSE; } $this->pluginInstances['webviewer_url_handler'] = new $class_name( - $this, $this->data['versioncontrol']['base_url'], $plugin['url_templates'] + $this, $this->data['webviewer_base_url'], $plugin['url_templates'] ); } return $this->pluginInstances['webviewer_url_handler']; @@ -414,7 +414,7 @@ abstract class VersioncontrolRepository implements VersioncontrolEntityInterface $class_name = ctools_plugin_get_class($plugin, $class_type); if (!class_exists($class_name)) { - throw new Exception("Plugin '$plugin_name' of type '$plugin_type' does not contain a valid class name in handler slot '$class_type'", E_WARNING); + throw new Exception("Plugin '$plugin_slot' of type '$plugin_type' does not contain a valid class name in handler slot '$class_type'", E_WARNING); return FALSE; } diff --git tests/VersioncontrolTestCase.test tests/VersioncontrolTestCase.test index 430d5d8..fa258f2 100644 --- tests/VersioncontrolTestCase.test +++ tests/VersioncontrolTestCase.test @@ -149,13 +149,12 @@ abstract class VersioncontrolTestCase extends DrupalWebTestCase { 'auth_handler' => 'ffa', 'author_mapper' => 'simple_mail', 'committer_mapper' => 'simple_mail', - //FIXME use a general commitlog url handler - 'webviewer_url_handler' => 'gitweb', + 'webviewer_url_handler' => 'none', ); $data += $default_data; - if (!isset($data['data']['versioncontrol']['base_url'])) { - $data['data']['versioncontrol']['base_url'] = ''; + if (!isset($data['webviewer_base_url'])) { + $data['data']['webviewer_base_url'] = ''; } foreach ($default_plugins as $plugin_slot => $default_plugin) { if (empty($data['plugins'][$plugin_slot])) { diff --git versioncontrol.admin.inc versioncontrol.admin.inc index 003711c..c5ef9ba 100644 --- versioncontrol.admin.inc +++ versioncontrol.admin.inc @@ -460,7 +460,7 @@ function versioncontrol_admin_repository_edit_submit($form, &$form_state) { $repository = $backends[$form['#vcs']]->buildEntity('repo', $repository); } - $repository->data['versioncontrol']['base_url'] = $form_state['values']['base_url']; + $repository->data['webviewer_base_url'] = $form_state['values']['base_url']; // Let other modules alter the repository array. foreach (module_implements('versioncontrol_repository_submit') as $module) { diff --git versioncontrol.install versioncontrol.install index 86f7cff..e416b39 100644 --- versioncontrol.install +++ versioncontrol.install @@ -1151,7 +1151,7 @@ function versioncontrol_update_6312() { while ($row = db_fetch_object($result)) { $data = unserialize($row->data); unset($data['versioncontrol']['url_handler']); - $data['versioncontrol']['base_url'] = ''; + $data['webviewer_base_url'] = ''; $data = serialize($row->data); db_query('UPDATE {versioncontrol_repositories} SET data = %s WHERE repo_id = %d', $row->data, $row->repo_id); }