File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,7 @@ public function parseLogRevisions(SimpleXMLElement $xml)
41
41
}
42
42
43
43
// href contains r1 and r2 as query parameters
44
- $ href = (string )$ anchor ['href ' ];
45
- $ pos = strpos ($ href , '? ' );
46
- if ($ pos === false ) {
47
- continue ;
48
- }
49
-
50
- $ args = array ();
51
- parse_str (substr ($ href , $ pos + 1 ), $ args );
44
+ $ args = $ this ->linkParameters ((string )$ anchor ['href ' ]);
52
45
53
46
// all links containing r2 are links to previous revision
54
47
if (isset ($ args ['r2 ' ])) {
@@ -58,4 +51,16 @@ public function parseLogRevisions(SimpleXMLElement $xml)
58
51
59
52
return $ revisions ;
60
53
}
54
+
55
+ private function linkParameters ($ href )
56
+ {
57
+ $ args = array ();
58
+ $ pos = strpos ($ href , '? ' );
59
+
60
+ if ($ pos !== false ) {
61
+ parse_str (substr ($ href , $ pos + 1 ), $ args );
62
+ }
63
+
64
+ return $ args ;
65
+ }
61
66
}
You can’t perform that action at this time.
0 commit comments