1<?php 2/** 3 * Copyright 2007-2017 Horde LLC (http://www.horde.org/) 4 * 5 * See the enclosed file LICENSE for license information (BSD). If you 6 * did not receive this file, see http://www.horde.org/licenses/bsdl.php. 7 * 8 * @author Jan Schneider <jan@horde.org> 9 */ 10require_once __DIR__ . '/lib/Application.php'; 11Horde_Registry::appInit('whups'); 12 13// Url. 14$url = Horde::url('', true); 15 16// Name. 17$name = $registry->get('name', 'whups') . ' (' . $url . ')'; 18 19// Icon. 20$icon = base64_encode(file_get_contents($registry->get('themesfs', 'whups') . '/default/graphics/whups.png')); 21 22// Charset. 23header('Content-Type: text/xml; charset=UTF-8'); 24echo <<<PAYLOAD 25<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> 26 <ShortName>$name</ShortName> 27 <SearchForm>$url</SearchForm> 28 <Url type="text/html" 29 method="get" 30 template="${url}ticket/"> 31 <Param name="id" value="{searchTerms}"/> 32 </Url> 33 <Image height="16" width="16">data:image/png;base64,$icon</Image> 34 <InputEncoding>UTF-8</InputEncoding> 35 36</OpenSearchDescription> 37PAYLOAD; 38