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)
4141 }
4242
4343 // 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 ' ]);
5245
5346 // all links containing r2 are links to previous revision
5447 if (isset ($ args ['r2 ' ])) {
@@ -58,4 +51,16 @@ public function parseLogRevisions(SimpleXMLElement $xml)
5851
5952 return $ revisions ;
6053 }
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+ }
6166}
You can’t perform that action at this time.
0 commit comments