aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 985cc922c..4fc917bcc 100644
--- a/boot.php
+++ b/boot.php
@@ -355,10 +355,10 @@ function load_translation_table($lang) {
if(! function_exists('t')) {
function t($s) {
-
+
$a = get_app();
- if($a->strings[$s])
+ if(x($a->strings,$s))
return $a->strings[$s];
return $s;
}}
@@ -1427,3 +1427,14 @@ function contact_block() {
}}
+if(! function_exists('search')) {
+function search($s) {
+ $a = get_app();
+ $o = '<div id="search-box">';
+ $o .= '<form action="' . $a->get_baseurl() . '/search' . '" method="get" >';
+ $o .= '<input type="text" name="search" id="search-text" value="' . $s .'" />';
+ $o .= '<input type="submit" name="submit" id="search-submit" value="' . t('Search') . '" />';
+ $o .= '</form></div>';
+ return $o;
+}}
+