Skip to content

Commit 9b4e964

Browse files
authored
Merge pull request #879 from dzhuryn/1.4.x
Фикс генерации урл
2 parents 9aa1c93 + 4265bc4 commit 9b4e964

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

assets/lib/MODxAPI/modResource.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,9 @@ public function save($fire_events = false, $clearCache = false)
626626
if (!empty($this->groupIds)) {
627627
$this->setDocumentGroups($this->id, $this->groupIds);
628628
}
629+
630+
$this->modx->getAliasListing($this->id);
631+
629632
$this->invokeEvent('OnDocFormSave', array(
630633
'mode' => $this->mode,
631634
'id' => isset($this->id) ? $this->id : '',

manager/includes/document.parser.class.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4222,14 +4222,15 @@ public function getAliasListing($id)
42224222
if (isset($this->aliasListing[$id])) {
42234223
$out = $this->aliasListing[$id];
42244224
} else {
4225-
$q = $this->db->query("SELECT id,alias,isfolder,parent FROM " . $this->getFullTableName("site_content") . " WHERE id=" . (int)$id);
4225+
$q = $this->db->query("SELECT id,alias,isfolder,parent,alias_visible FROM " . $this->getFullTableName("site_content") . " WHERE id=" . (int)$id);
42264226
if ($this->db->getRecordCount($q) == '1') {
42274227
$q = $this->db->getRow($q);
42284228
$this->aliasListing[$id] = array(
42294229
'id' => (int)$q['id'],
42304230
'alias' => $q['alias'] == '' ? $q['id'] : $q['alias'],
42314231
'parent' => (int)$q['parent'],
42324232
'isfolder' => (int)$q['isfolder'],
4233+
'alias_visible' => (int)$q['alias_visible'],
42334234
);
42344235
if ($this->aliasListing[$id]['parent'] > 0) {
42354236
//fix alias_path_usage

0 commit comments

Comments
 (0)