Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6c24356

Browse files
committed
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.
1 parent c6a78ca commit 6c24356

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎includes/VersioncontrolRepository.php‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,14 @@ public function isAccountAuthorized($uid) {
238238
* An array of repository viewer URLs. How this array looks like is
239239
* defined by the corresponding URL backend.
240240
*/
241-
public function update($repository_urls) {
241+
public function update($repository_urls=NULL) {
242242
drupal_write_record('versioncontrol_repositories', $this, 'repo_id');
243243

244-
$repository_urls['repo_id'] = $this->repo_id; // for drupal_write_record()
245-
drupal_write_record('versioncontrol_repository_urls', $repository_urls, 'repo_id');
246-
unset($repository_urls['repo_id']);
244+
if (!is_null($repository_urls)) {
245+
$repository_urls['repo_id'] = $this->repo_id; // for drupal_write_record()
246+
drupal_write_record('versioncontrol_repository_urls', $repository_urls, 'repo_id');
247+
unset($repository_urls['repo_id']);
248+
}
247249

248250
// Auto-add commit info from $commit['[xxx]_specific'] into the database.
249251
$vcs = $this->vcs;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /