Merge branch 'master' into zvi

This commit is contained in:
zotlabs
2018-11-13 20:37:52 -08:00
12 changed files with 230 additions and 168 deletions

View File

@@ -619,6 +619,19 @@ function attribute_contains($attr, $s) {
return false;
}
/**
* @brief Log to syslog
*
* @param string $msg Message to log
* @param int $priority - compatible with syslog
*/
function hz_syslog($msg, $priority = LOG_INFO) {
openlog("hz-log", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog($priority, $msg);
closelog();
}
/**
* @brief Logging function for Hubzilla.
*
@@ -1048,7 +1061,7 @@ function micropro($contact, $redirect = false, $class = '', $mode = false) {
function search($s,$id='search-box',$url='/search',$save = false) {
return replace_macros(get_markup_template('searchbox.tpl'),array(
'$s' => $s,
'$s' => htmlspecialchars($s),
'$id' => $id,
'$action_url' => z_root() . $url,
'$search_label' => t('Search'),