Conditions | 4 |
Paths | 6 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
14 | function testUrl($url) { |
||
15 | try { |
||
16 | $result = file_get_contents($url); |
||
17 | $data = json_decode($result); |
||
18 | // public link mount is only supported in ownCloud 7+ |
||
19 | return is_object($data) and !empty($data->version) and version_compare($data->version, '7.0.0', '>='); |
||
20 | } catch (Exception $e) { |
||
21 | return false; |
||
22 | } |
||
23 | } |
||
24 | |||
32 |