Browse Source

Fixes

pull/3/head
M@d D3n 5 years ago
parent
commit
8e7952ea79
  1. 10
      class/class.core.php
  2. 6
      functions/func.breadcrumbs.php
  3. 6
      functions/func.logs.php

10
class/class.core.php

@ -730,6 +730,16 @@
$main_content $main_content
); );
// GetField
$main_content = preg_replace_callback(
'/\[tag:get:([a-zA-Z0-9-_]+)(|:([0-9]+))+?\]/',
function ($match) {
return get_field($match[1], $match[3]);
},
$main_content
);
$main_content = str_replace('[tag:docdate]', translate_date(strftime(DATE_FORMAT, $this->curentdoc->document_published)), $main_content); $main_content = str_replace('[tag:docdate]', translate_date(strftime(DATE_FORMAT, $this->curentdoc->document_published)), $main_content);
$main_content = str_replace('[tag:doctime]', translate_date(strftime(TIME_FORMAT, $this->curentdoc->document_published)), $main_content); $main_content = str_replace('[tag:doctime]', translate_date(strftime(TIME_FORMAT, $this->curentdoc->document_published)), $main_content);
$main_content = str_replace('[tag:humandate]', human_date($this->curentdoc->document_published), $main_content); $main_content = str_replace('[tag:humandate]', human_date($this->curentdoc->document_published), $main_content);

6
functions/func.breadcrumbs.php

@ -55,6 +55,8 @@
$lang_home_alias = getDocument($home_id); $lang_home_alias = getDocument($home_id);
$number = 1;
$search = [ $search = [
'[name]', '[name]',
'[link]', '[link]',
@ -166,7 +168,7 @@
$bread_crumb .= $bread_sepparator; $bread_crumb .= $bread_sepparator;
} }
unset($search, $replace, $link, $number, $row_doc); unset($search, $replace, $link, $row_doc);
} }
} }
} }
@ -175,7 +177,7 @@
if ((isset($AVE_Core->curentdoc->bread_link_box_last) && $AVE_Core->curentdoc->bread_link_box_last == 0)) if ((isset($AVE_Core->curentdoc->bread_link_box_last) && $AVE_Core->curentdoc->bread_link_box_last == 0))
$bread_crumb .= ''; $bread_crumb .= '';
else if (get_settings('bread_link_box_last') == 1 || (isset($AVE_Core->curentdoc->bread_link_box_last) && $AVE_Core->curentdoc->bread_link_box_last == 1)) else if (get_settings('bread_link_box_last') == 1 || (isset($AVE_Core->curentdoc->bread_link_box_last) && $AVE_Core->curentdoc->bread_link_box_last == 1))
$bread_crumb .= sprintf($bread_self_box, $current->document_breadcrum_title); $bread_crumb .= str_replace('[count]', $number+1, sprintf($bread_self_box, $current->document_breadcrum_title));
if (! $noprint) if (! $noprint)
$crumbs[$curent_document] = sprintf($bread_box, $bread_crumb); $crumbs[$curent_document] = sprintf($bread_box, $bread_crumb);

6
functions/func.logs.php

@ -32,7 +32,7 @@
$logdata[]=array( $logdata[]=array(
'log_time' => time(), 'log_time' => time(),
'log_ip' => $_SERVER['REMOTE_ADDR'], 'log_ip' => $_SERVER['REMOTE_ADDR'],
'log_url' => $_SERVER['QUERY_STRING'], 'log_url' => $_SERVER['REQUEST_URI'],
'log_user_id' => (isset($_SESSION['user_id']) ? $_SESSION['user_id'] : '0'), 'log_user_id' => (isset($_SESSION['user_id']) ? $_SESSION['user_id'] : '0'),
'log_user_name' => (isset($_SESSION['user_name']) ? $_SESSION['user_name'] : 'Anonymous'), 'log_user_name' => (isset($_SESSION['user_name']) ? $_SESSION['user_name'] : 'Anonymous'),
'log_text' => $message, 'log_text' => $message,
@ -65,7 +65,7 @@
$logsql[] = array( $logsql[] = array(
'log_time' => time(), 'log_time' => time(),
'log_ip' => $_SERVER['REMOTE_ADDR'], 'log_ip' => $_SERVER['REMOTE_ADDR'],
'log_url' => $_SERVER['QUERY_STRING'], 'log_url' => $_SERVER['REQUEST_URI'],
'log_user_id' => $_SESSION['user_id'], 'log_user_id' => $_SESSION['user_id'],
'log_user_name' => $_SESSION['user_name'], 'log_user_name' => $_SESSION['user_name'],
'log_text' => $message 'log_text' => $message
@ -96,7 +96,7 @@
$log404[] = array( $log404[] = array(
'log_time' => time(), 'log_time' => time(),
'log_ip' => @$_SERVER['REMOTE_ADDR'], 'log_ip' => @$_SERVER['REMOTE_ADDR'],
'log_query' => @$_SERVER['QUERY_STRING'], 'log_query' => @$_SERVER['REQUEST_URI'],
'log_user_agent' => @$_SERVER['HTTP_USER_AGENT'], 'log_user_agent' => @$_SERVER['HTTP_USER_AGENT'],
'log_user_referer' => (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''), 'log_user_referer' => (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''),
'log_request_uri' => @$_SERVER['REQUEST_URI'] 'log_request_uri' => @$_SERVER['REQUEST_URI']

Loading…
Cancel
Save