[Pkg-owncloud-commits] [php-sabredav] 03/12: add button to export an addressbook in the browser

David Prévot taffit at moszumanska.debian.org
Mon Jun 1 22:42:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag 3.0.0-beta3
in repository php-sabredav.

commit a5cf6ac9c30e644cc1ffd7522029b5ed0befa0a6
Author: Markus Engelbrecht <github at enbre.com>
Date:   Fri May 29 16:43:59 2015 +0200

    add button to export an addressbook in the browser
---
 lib/CardDAV/VCFExportPlugin.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/CardDAV/VCFExportPlugin.php b/lib/CardDAV/VCFExportPlugin.php
index fe5ef0e..19f19e7 100644
--- a/lib/CardDAV/VCFExportPlugin.php
+++ b/lib/CardDAV/VCFExportPlugin.php
@@ -38,7 +38,11 @@ class VCFExportPlugin extends DAV\ServerPlugin {
 
         $this->server = $server;
         $this->server->on('method:GET', [$this, 'httpGet'], 90);
-
+        $server->on('browserButtonActions', function($path, $node, &$actions) {
+            if ($node instanceof IAddressBook) {
+                $actions .= '<a href="' . htmlspecialchars($path, ENT_QUOTES, 'UTF-8') . '?export"><span class="oi" data-glyph="book"></span></a>';
+            }
+        });
     }
 
     /**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list