File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ public function register() {
3131
3232 public $ type = 'gitweb ' ;
3333
34- public function url_get_auth ($ url , $ user , $ pass ) {
35- if ( strlen ($ user ) > 0 && strlen ($ pass ) > 0 ) {
36- $ urlParts = preg_split ("/: \\/ \\// " , $ url );
37- $ urlWithCredentials = $ urlParts [0 ] . ":// " . $ user . ": " . $ pass . "@ " .$ urlParts [1 ];
38- return file_get_contents ($ urlWithCredentials );
34+ public function url_get_auth ( $ p_url , $ p_user , $ p_pass ) {
35+ if ( strlen ( $ p_user ) > 0 && strlen ( $ p_pass ) > 0 ) {
36+ $ t_url_parts = preg_split ("/: \\/ \\// " , $ p_url );
37+ $ t_url_with_credentials = $ t_url_parts [0 ] . ":// " . $ p_user . ": " . $ p_pass . "@ " .$ t_url_parts [1 ];
38+ return file_get_contents ( $ t_url_with_credentials );
3939 } else {
40- return url_get ($ url );
40+ return url_get ( $ p_url );
4141 }
4242 }
4343
You can’t perform that action at this time.
0 commit comments