Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: mod/mitem.php view/nl/strings.php
This commit is contained in:
commit
018e702281
@ -245,6 +245,9 @@ function comanche_widget($name, $text) {
|
||||
}
|
||||
}
|
||||
|
||||
if(file_exists('widget/' . trim($name) . '.php'))
|
||||
require_once('widget/' . trim($name) . '.php');
|
||||
|
||||
$func = 'widget_' . trim($name);
|
||||
if (function_exists($func))
|
||||
return $func($vars);
|
||||
|
@ -159,12 +159,25 @@ function t($s, $ctx = '') {
|
||||
if (x($a->strings, $cs)) {
|
||||
$t = $a->strings[$cs];
|
||||
|
||||
return is_array($t) ? $t[0] : $t;
|
||||
return ((is_array($t)) ? translate_product($t[0]) : translate_product($t));
|
||||
}
|
||||
|
||||
return $s;
|
||||
return translate_product($s);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief translate product name
|
||||
* Merging strings from different project names is problematic so we'll do that with a string replacement
|
||||
*/
|
||||
|
||||
function translate_product($s) {
|
||||
|
||||
return str_replace(array('$product','$Product'),array(RED_PLATFORM,ucfirst(RED_PLATFORM)),$s);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
|
@ -603,7 +603,7 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
|
||||
$scaled = str_replace($scale_replace[0], $scale_replace[1], $mtch[3]);
|
||||
else
|
||||
$scaled = $mtch[3];
|
||||
$i = z_fetch_url($scaled);
|
||||
$i = z_fetch_url($scaled,true);
|
||||
|
||||
|
||||
$cache = get_config('system','itemcache');
|
||||
@ -613,7 +613,10 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
|
||||
}
|
||||
|
||||
// guess mimetype from headers or filename
|
||||
|
||||
$type = guess_image_type($mtch[3],$i['header']);
|
||||
if(strpos($type,'image') === false)
|
||||
continue;
|
||||
|
||||
if($i['success']) {
|
||||
$ph = photo_factory($i['body'], $type);
|
||||
|
@ -2244,7 +2244,7 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag, $d
|
||||
// The '=' is needed to not replace color codes if the code is also used as a tag
|
||||
// Much better would be to somehow completely avoiding things in e.g. [color]-tags.
|
||||
// This would allow writing things like "my favourite tag=#foobar".
|
||||
$body = preg_replace('/(?<![a-zA-Z0-9=])'.preg_quote($tag).'/', $newtag, $body);
|
||||
$body = preg_replace('/(?<![a-zA-Z0-9=])'.preg_quote($tag,'/').'/', $newtag, $body);
|
||||
$replaced = true;
|
||||
}
|
||||
//is the link already in str_tags?
|
||||
|
@ -15,6 +15,7 @@ function probe_content(&$a) {
|
||||
if(x($_GET,'addr')) {
|
||||
$channel = $a->get_channel();
|
||||
$addr = trim($_GET['addr']);
|
||||
$do_import = ((intval($_GET['import']) && is_site_admin()) ? true : false);
|
||||
$res = zot_finger($addr,$channel,false);
|
||||
$o .= '<pre>';
|
||||
if($res['success'])
|
||||
@ -29,6 +30,8 @@ function probe_content(&$a) {
|
||||
$o .= sprintf( t('Fetching URL returns error: %1$s'),$res['error'] . "\r\n\r\n");
|
||||
|
||||
}
|
||||
if($do_import && $j)
|
||||
$x = import_xchan($j);
|
||||
if($j && $j['permissions'] && $j['permissions']['iv'])
|
||||
$j['permissions'] = json_decode(crypto_unencapsulate($j['permissions'],$channel['channel_prvkey']),true);
|
||||
$o .= str_replace("\n",'<br />',print_r($j,true));
|
||||
|
@ -1 +1 @@
|
||||
2015-05-10.1028
|
||||
2015-05-12.1030
|
||||
|
Reference in New Issue
Block a user