packages: dokuwiki-plugin-smblink/dokuwiki-plugin-smblink.spec, dokuwiki-pl...

glen glen at pld-linux.org
Sat Jul 24 23:49:23 CEST 2010


Author: glen                         Date: Sat Jul 24 21:49:23 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- remove unneccessary cruft, making plugin usable for all browsers

---- Files affected:
packages/dokuwiki-plugin-smblink:
   dokuwiki-plugin-smblink.spec (1.3 -> 1.4) , syntax.1.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/dokuwiki-plugin-smblink/dokuwiki-plugin-smblink.spec
diff -u packages/dokuwiki-plugin-smblink/dokuwiki-plugin-smblink.spec:1.3 packages/dokuwiki-plugin-smblink/dokuwiki-plugin-smblink.spec:1.4
--- packages/dokuwiki-plugin-smblink/dokuwiki-plugin-smblink.spec:1.3	Sun May 16 01:01:31 2010
+++ packages/dokuwiki-plugin-smblink/dokuwiki-plugin-smblink.spec	Sat Jul 24 23:49:18 2010
@@ -3,11 +3,12 @@
 Summary:	Plugin to make Windows Share Links globally accessible
 Name:		dokuwiki-plugin-%{plugin}
 Version:	20090209
-Release:	1
+Release:	2
 License:	GPL v2
 Group:		Applications/WWW
 Source0:	http://doku-smblink.googlecode.com/files/smblink.zip
 # Source0-md5:	b880e7d257904050c97396ffbd7a9d5e
+Patch0:		syntax.1.patch
 URL:		http://wiki.splitbrain.org/plugin:smblink
 BuildRequires:	rpmbuild(macros) >= 1.553
 BuildRequires:	unzip
@@ -30,6 +31,7 @@
 %setup -qc
 mv %{plugin}/* .
 %undos *.php
+%patch0 -p0
 
 version=$(awk -F"'" '/date/{print $4}' syntax.php)
 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
@@ -70,6 +72,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.4  2010/07/24 21:49:18  glen
+- remove unneccessary cruft, making plugin usable for all browsers
+
 Revision 1.3  2010/05/15 23:01:31  sparky
 - BR: unzip
 

================================================================
Index: packages/dokuwiki-plugin-smblink/syntax.1.patch
diff -u /dev/null packages/dokuwiki-plugin-smblink/syntax.1.patch:1.1
--- /dev/null	Sat Jul 24 23:49:23 2010
+++ packages/dokuwiki-plugin-smblink/syntax.1.patch	Sat Jul 24 23:49:18 2010
@@ -0,0 +1,49 @@
+*** syntax.php	2009-02-09 17:08:04.000000000 +0200
+--- syntax_t-verssion.php	2010-04-30 12:11:50.000000000 +0300
+***************
+*** 78,102 ****
+          } else {
+              $link['class'] = 'media';
+          }
+!         //Format the link for smb (Linux or Win-Firefox)
+          //Just replace all \ with / to get something like smb://host/path/to/file
+!         $smburl='smb:' . str_replace('\\', '/', $url);
+!         //If we're using linux, then smb:// protocol works fine.
+!         if (strstr($_SERVER['HTTP_USER_AGENT'], 'Linux')) {
+!             $url = $smburl;
+!         } else {
+!             //If we're not on linux, we might be using IE, so...
+!             //Replace the \\ with the file:/// protocol and put the \\ back in
+!             $url = str_replace('\\\\', 'file:///\\\\', $url);
+!             //Use javascript to change the link in Firefox to the smb url.
+!             $link['more'] =
+!                 'onclick="if(document.all == null){' .
+!                     "parent.location='".$smburl."';" .
+!                 '}" ' .
+!                 'onkeypress="if(document.all == null){' .
+!                     "parent.location='".$smburl."';" .
+!                 '}"';
+!         }
+  
+          $link['url'] = $url;
+  
+--- 78,96 ----
+          } else {
+              $link['class'] = 'media';
+          }
+! 
+          //Just replace all \ with / to get something like smb://host/path/to/file
+!         $smburl='smb:' . str_replace('\\', '/', $url);
+!         //Replace the \\ with the file:/// protocol and put the \\ back in
+!         $url = str_replace('\\\\', 'file:///\\\\', $url);
+!         //Use javascript to change the link in other browsers then IE to the smb url.
+!         $link['more'] =
+!             'onclick="if(!(/Internet Explorer/.test(navigator.appName))){' .
+!                 " window.location.href='".$smburl."';" .
+!             '}" ' .
+!             'onkeypress="if(!(/Internet Explorer/.test(navigator.appName))){' .
+!                 " window.location.href='".$smburl."';" .
+!             '}"';
+  
+          $link['url'] = $url;
+  
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/dokuwiki-plugin-smblink/dokuwiki-plugin-smblink.spec?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list