Bladeren bron

Allow Complex Branch Names (#601)

OwN-3m-All 3 jaren geleden
bovenliggende
commit
bab21bd265
1 gewijzigde bestanden met toevoegingen van 1 en 7 verwijderingen
  1. 1 7
      modules/update/update.php

+ 1 - 7
modules/update/update.php

@@ -46,12 +46,6 @@ function check_file($local_path, $remote_url)
 	}
 }
 
-function urlProperEncode($string) {
-	$entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%25', '%23', '%5B', '%5D');
-	$replacements = array('!', '*', "'", "(", ")", ";", ":", "@", "&", "=", "+", "$", ",", "/", "?", "%", "#", "[", "]");
-	return str_replace($entities, $replacements, urlencode($string));
-}
-
 function exec_ogp_module()
 {
 	global $db, $settings;
@@ -79,7 +73,7 @@ function exec_ogp_module()
 		$gitHubURL = "https://github.com/OpenGamePanel/";
 	}
 	
-	$gitHubBranchName = urlProperEncode(!empty($settings['custom_github_update_branch_name']) ? $settings['custom_github_update_branch_name'] : 'master');
+	$gitHubBranchName = urlencode(!empty($settings['custom_github_update_branch_name']) ? $settings['custom_github_update_branch_name'] : 'master');
 	
 	define('RSS_REMOTE_PATH', $gitHubURL . REPONAME . '/commits/' . $gitHubBranchName . '.atom');
 	define('MODULE_PATH', 'modules/'.$_GET['m'].'/');