]>
Commit | Line | Data |
---|---|---|
70e7e35a ER |
1 | *** syntax.php 2009-02-09 17:08:04.000000000 +0200 |
2 | --- syntax_t-verssion.php 2010-04-30 12:11:50.000000000 +0300 | |
3 | *************** | |
4 | *** 78,102 **** | |
5 | } else { | |
6 | $link['class'] = 'media'; | |
7 | } | |
8 | ! //Format the link for smb (Linux or Win-Firefox) | |
9 | //Just replace all \ with / to get something like smb://host/path/to/file | |
10 | ! $smburl='smb:' . str_replace('\\', '/', $url); | |
11 | ! //If we're using linux, then smb:// protocol works fine. | |
12 | ! if (strstr($_SERVER['HTTP_USER_AGENT'], 'Linux')) { | |
13 | ! $url = $smburl; | |
14 | ! } else { | |
15 | ! //If we're not on linux, we might be using IE, so... | |
16 | ! //Replace the \\ with the file:/// protocol and put the \\ back in | |
17 | ! $url = str_replace('\\\\', 'file:///\\\\', $url); | |
18 | ! //Use javascript to change the link in Firefox to the smb url. | |
19 | ! $link['more'] = | |
20 | ! 'onclick="if(document.all == null){' . | |
21 | ! "parent.location='".$smburl."';" . | |
22 | ! '}" ' . | |
23 | ! 'onkeypress="if(document.all == null){' . | |
24 | ! "parent.location='".$smburl."';" . | |
25 | ! '}"'; | |
26 | ! } | |
27 | ||
28 | $link['url'] = $url; | |
29 | ||
30 | --- 78,96 ---- | |
31 | } else { | |
32 | $link['class'] = 'media'; | |
33 | } | |
34 | ! | |
35 | //Just replace all \ with / to get something like smb://host/path/to/file | |
36 | ! $smburl='smb:' . str_replace('\\', '/', $url); | |
37 | ! //Replace the \\ with the file:/// protocol and put the \\ back in | |
38 | ! $url = str_replace('\\\\', 'file:///\\\\', $url); | |
39 | ! //Use javascript to change the link in other browsers then IE to the smb url. | |
40 | ! $link['more'] = | |
41 | ! 'onclick="if(!(/Internet Explorer/.test(navigator.appName))){' . | |
42 | ! " window.location.href='".$smburl."';" . | |
43 | ! '}" ' . | |
44 | ! 'onkeypress="if(!(/Internet Explorer/.test(navigator.appName))){' . | |
45 | ! " window.location.href='".$smburl."';" . | |
46 | ! '}"'; | |
47 | ||
48 | $link['url'] = $url; | |
49 |