/usr/share/horde/trean/search.php is in php-horde-trean 1.1.4-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | <?php
/**
*
* Copyright 2002-2016 Horde LLC (http://www.horde.org/)
*
* See the enclosed file LICENSE for license information (BSD). If you
* did not receive this file, see http://www.horde.org/licenses/bsdl.php.
*
* @author Mike Cochrane <mike@graftonhall.co.nz>
*/
require_once __DIR__ . '/lib/Application.php';
Horde_Registry::appInit('trean');
$vars = Horde_Variables::getDefaultVariables();
$bookmarks = null;
if (strlen($vars->searchfield)) {
// Get the bookmarks.
try {
$bookmarks = $trean_gateway->searchBookmarks($vars->searchfield);
} catch (Trean_Exception $e) {
$notification->push($e);
}
}
if ($GLOBALS['conf']['content_index']['enabled']) {
$topbar = $GLOBALS['injector']->getInstance('Horde_View_Topbar');
$topbar->search = true;
$topbar->searchAction = Horde::url('search.php');
}
Trean::addFeedLink();
$page_output->header(array(
'title' => _("Search")
));
$notification->notify(array('listeners' => 'status'));
// Display the results.
if (strlen($vars->searchfield)) {
if (!$bookmarks) {
echo '<p><em>' . _("No bookmarks found") . '</em></p>';
} else {
$view = new Trean_View_BookmarkList($bookmarks);
$view->showTagBrowser(false);
echo $view->render(sprintf(_("Search results (%s)"), count($bookmarks)));
}
} else {
echo '<p><em>' . _("No search") . '</em></p>';
}
$page_output->footer();
|