Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

repo urls don't need to be updated

Make repo urls parameter conditional on VersioncontrolRepository::update(),
specially for changes out of repo add/edit form.

For example, after retrieving commits we maybe need to update some repository
status, like updated timestamp on git backend and do not need to update repo
urls.
  • Loading branch information...
commit 6c243566063a93eac867ac7b5b201f2ac907204b 1 parent c6a78ca
@marvil07 authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 includes/VersioncontrolRepository.php
View
10 includes/VersioncontrolRepository.php
@@ -238,12 +238,14 @@ public function isAccountAuthorized($uid) {
* An array of repository viewer URLs. How this array looks like is
* defined by the corresponding URL backend.
*/
- public function update($repository_urls) {
+ public function update($repository_urls=NULL) {
drupal_write_record('versioncontrol_repositories', $this, 'repo_id');
- $repository_urls['repo_id'] = $this->repo_id; // for drupal_write_record()
- drupal_write_record('versioncontrol_repository_urls', $repository_urls, 'repo_id');
- unset($repository_urls['repo_id']);
+ if (!is_null($repository_urls)) {
+ $repository_urls['repo_id'] = $this->repo_id; // for drupal_write_record()
+ drupal_write_record('versioncontrol_repository_urls', $repository_urls, 'repo_id');
+ unset($repository_urls['repo_id']);
+ }
// Auto-add commit info from $commit['[xxx]_specific'] into the database.
$vcs = $this->vcs;
Please sign in to comment.
Something went wrong with that request. Please try again.