mirror of
https://github.com/avecms/AVE.cms.git
synced 2025-01-22 07:20:07 +00:00
Fixes
This commit is contained in:
parent
7b345fe374
commit
fad753268c
@ -156,16 +156,17 @@
|
||||
*/
|
||||
function get_field_alias ($id)
|
||||
{
|
||||
global $AVE_DB;
|
||||
global $AVE_DB, $fields_data;
|
||||
|
||||
static $alias_field_id = array();
|
||||
if (! isset($fields_data))
|
||||
static $fields_data = [];
|
||||
|
||||
if (isset($alias_field_id[$id]))
|
||||
return $alias_field_id[$id];
|
||||
if (isset($fields_data[$id]))
|
||||
return $fields_data[$id]['alias'];
|
||||
|
||||
$alias_field_id[$id] = $AVE_DB->Query("SELECT rubric_field_alias FROM " . PREFIX . "_rubric_fields WHERE Id=" . intval($id))->GetCell();
|
||||
$fields_data[$id]['alias'] = $AVE_DB->Query("SELECT rubric_field_alias FROM " . PREFIX . "_rubric_fields WHERE Id=" . intval($id))->GetCell();
|
||||
|
||||
return $alias_field_id[$id];
|
||||
return $fields_data[$id]['alias'];
|
||||
}
|
||||
|
||||
|
||||
@ -181,7 +182,7 @@
|
||||
{
|
||||
global $AVE_DB;
|
||||
|
||||
static $alias_field_id = array();
|
||||
static $alias_field_id = [];
|
||||
|
||||
if (isset($alias_field_id[$rubric_id][$alias]))
|
||||
return $alias_field_id[$rubric_id][$alias];
|
||||
@ -214,7 +215,7 @@
|
||||
{
|
||||
global $AVE_DB;
|
||||
|
||||
static $alias_field_id = array();
|
||||
static $alias_field_id = [];
|
||||
|
||||
if (isset($alias_field_id[$id]))
|
||||
return $alias_field_id[$id];
|
||||
@ -408,7 +409,7 @@
|
||||
*/
|
||||
function get_document_fields ($document_id, $values = null)
|
||||
{
|
||||
global $AVE_DB, $AVE_Core; //$request_documents
|
||||
global $AVE_DB, $AVE_Core, $fields_data; //$request_documents
|
||||
|
||||
if (defined('USE_STATIC_FIELDS') && USE_STATIC_FIELDS)
|
||||
static $document_fields = [];
|
||||
@ -512,6 +513,8 @@
|
||||
|
||||
$document_fields[$row['document_id']][$row['rubric_field_id']] = $row;
|
||||
$document_fields[$row['document_id']][$row['rubric_field_alias']] = $row['rubric_field_id'];
|
||||
|
||||
$fields_data[$row['rubric_field_id']]['alias'] = $row['rubric_field_alias'];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@
|
||||
//-- Шаблоны
|
||||
write_htaccess_deny(BASE_DIR . '/templates/' . DEFAULT_THEME_FOLDER . '/include/');
|
||||
|
||||
global $AVE_DB;
|
||||
global $AVE_DB, $fields_data;
|
||||
|
||||
//-- Класс для работы с MySQL (Global $AVE_DB)
|
||||
require_once (BASE_DIR . '/class/class.database.php');
|
||||
|
Loading…
x
Reference in New Issue
Block a user