瀏覽代碼

Added New Branch Setting

own3mall 5 年之前
父節點
當前提交
666eec996a
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      modules/update/update.php
  2. 1 1
      modules/update/updating.php

+ 1 - 1
modules/update/update.php

@@ -66,7 +66,7 @@ function exec_ogp_module()
 	// GitHub URL
 	if(function_exists("getOGPGitHubURL") && function_exists("getOGPGitHubURLUnstrict") && function_exists("getGitHubOrganization")){
 		$gitHubUsername = $settings["custom_github_update_username"];	
-		$gitHubBranch = $settings["custom_github_update_branch_name"];	
+		$gitHubBranch = (!empty($settings['custom_github_update_branch_name']) ? $settings['custom_github_update_branch_name'] : 'master');
 		$gitHubURL = getOGPGitHubURL($gitHubUsername, REPONAME, $gitHubBranch);
 		$gitHubOrganization = getGitHubOrganization($gitHubURL);
 	}else{

+ 1 - 1
modules/update/updating.php

@@ -50,7 +50,7 @@ function exec_ogp_module()
 	// GitHub URL
 	if(function_exists("getOGPGitHubURL") && function_exists("getOGPGitHubURLUnstrict")){
 		$gitHubUsername = $settings["custom_github_update_username"];	
-		$gitHubBranch = $settings["custom_github_update_branch_name"];	
+		$gitHubBranch = (!empty($settings['custom_github_update_branch_name']) ? $settings['custom_github_update_branch_name'] : 'master');
 		$gitHubURL = getOGPGitHubURL($gitHubUsername, REPONAME, $gitHubBranch);
 	}else{
 		$gitHubURL = "https://github.com/OpenGamePanel/";