X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=73c441e26aaaabd8c47d0c46a552214d9c2d07a4;hb=25c0c5d4ad9e155dd5329e197c7a19212d20b578;hp=9a65224af9bfd4e3d8ae19b5f7b97c67734b6038;hpb=26c5c7991af3b27f079b5494def31707bfe1054a;p=friendica.git
diff --git a/include/text.php b/include/text.php
index 9a65224af9..73c441e26a 100644
--- a/include/text.php
+++ b/include/text.php
@@ -20,6 +20,10 @@ function replace_macros($s,$r) {
$stamp1 = microtime(true);
$a = get_app();
+
+ // pass $baseurl to all templates
+ $r['$baseurl'] = $a->get_baseurl();
+
$t = $a->template_engine();
try {
@@ -939,6 +943,9 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
if($class)
$class = ' ' . $class;
+ if ($contact["addr"] == "")
+ $contact["addr"] = $contact["url"];
+
$url = $contact['url'];
$sparkle = '';
$redir = false;
@@ -962,7 +969,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
. (($click) ? ' fakelink' : '') . '" '
. (($redir) ? ' target="redir" ' : '')
. (($url) ? ' href="' . $url . '"' : '') . $click
- . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
+ . '" title="' . $contact['name'] . ' [' . $contact['addr'] . ']" alt="' . $contact['name']
. '" >'. $contact['name'] . '' . "\r\n";
}
else {
@@ -970,7 +977,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
. (($click) ? ' fakelink' : '') . '" '
. (($redir) ? ' target="redir" ' : '')
. (($url) ? ' href="' . $url . '"' : '') . $click . ' >' . "\r\n";
}
}}
@@ -998,12 +1005,15 @@ function search($s,$id='search-box',$url='/search',$save = false, $aside = true)
'$savedsearch' => feature_enabled(local_user(),'savedsearch'),
);
- if (!$aside)
+ if (!$aside) {
$values['$searchoption'] = array(
t("Full Text"),
t("Tags"),
- t("Contacts"),
- t("Forums"));
+ t("Contacts"));
+
+ if (get_config('system','poco_local_search'))
+ $values['$searchoption'][] = t("Forums");
+ }
return replace_macros(get_markup_template('searchbox.tpl'), $values);
}}
@@ -1017,8 +1027,9 @@ if(! function_exists('valid_email')) {
*/
function valid_email($x){
- if(get_config('system','disable_email_validation'))
- return true;
+ // Removed because Fabio told me so.
+ //if(get_config('system','disable_email_validation'))
+ // return true;
if(preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/',$x))
return true;
@@ -1407,9 +1418,6 @@ function prepare_body(&$item,$attach = false, $preview = false) {
put_item_in_cache($item, true);
$s = $item["rendered-html"];
- require_once("mod/proxy.php");
- $s = proxy_parse_html($s);
-
$prep_arr = array('item' => $item, 'html' => $s, 'preview' => $preview);
call_hooks('prepare_body', $prep_arr);
$s = $prep_arr['html'];
@@ -1502,7 +1510,7 @@ function prepare_body(&$item,$attach = false, $preview = false) {
if($x) {
$s = preg_replace('/\