<?php
-
/**
* Opensearch action class.
*
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-if (!defined('STATUSNET')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
* Class handler.
*
* @param array $args query arguments
- *
+ *
* @return boolean false if user doesn't exist
*/
function handle($args)
$short_name = '';
if ($type == 'people') {
$type = 'peoplesearch';
+ // TRANS: ShortName in the OpenSearch interface when trying to find users.
$short_name = _('People Search');
} else {
$type = 'noticesearch';
+ // TRANS: ShortName in the OpenSearch interface when trying to find notices.
$short_name = _('Notice Search');
}
header('Content-Type: application/opensearchdescription+xml');
$this->element('Url', array('type' => 'text/html', 'method' => 'get',
'template' => str_replace('---', '{searchTerms}', common_local_url($type, array('q' => '---')))));
$this->element('Image', array('height' => 16, 'width' => 16, 'type' => 'image/vnd.microsoft.icon'), common_path('favicon.ico'));
- $this->element('Image', array('height' => 50, 'width' => 50, 'type' => 'image/png'), theme_path('logo.png'));
+ $this->element('Image', array('height' => 50, 'width' => 50, 'type' => 'image/png'), Theme::path('logo.png'));
$this->element('AdultContent', null, 'false');
$this->element('Language', null, common_language());
$this->element('OutputEncoding', null, 'UTF-8');
return true;
}
}
-