Changeset View
Changeset View
Standalone View
Standalone View
core/units/categories/categories_event_handler.php
Show First 20 Lines • Show All 1849 Lines • ▼ Show 20 Line(s) | |||||
if ($object->GetChangedFields()) { | if ($object->GetChangedFields()) { | ||||
$object->SetDBField('Modified_date', $now); | $object->SetDBField('Modified_date', $now); | ||||
$object->SetDBField('Modified_time', $now); | $object->SetDBField('Modified_time', $now); | ||||
} | } | ||||
$object->setRequired('PageCacheKey', $object->GetDBField('OverridePageCacheKey')); | $object->setRequired('PageCacheKey', $object->GetDBField('OverridePageCacheKey')); | ||||
$object->SetDBField('Template', $this->_stripTemplateExtension( $object->GetDBField('Template') )); | $object->SetDBField('Template', $this->_stripTemplateExtension( $object->GetDBField('Template') )); | ||||
if ($object->GetDBField('Type') == PAGE_TYPE_TEMPLATE) { | $category_type = $object->GetDBField('Type'); | ||||
if ( $category_type != $object->GetOriginalField('Type') ) { | |||||
Lint: Generic.WhiteSpace.ScopeIndent.IncorrectExact: Line indented incorrectly; expected 2 tabs, found 3 | |||||
if ( $category_type == PAGE_TYPE_TEMPLATE ) { | |||||
Line indented incorrectly; expected 3 tabs, found 4 Lint: Generic.WhiteSpace.ScopeIndent.IncorrectExact: Line indented incorrectly; expected 3 tabs, found 4 | |||||
$object->SetDBField('ThemeId', $this->_getCurrentThemeId()); | |||||
if (!$this->_templateFound($object->GetDBField('Template'), $object->GetDBField('ThemeId'))) { | if ( !$this->_templateFound($object->GetDBField('Template'), $object->GetDBField('ThemeId')) ) { | ||||
Line indented incorrectly; expected 4 tabs, found 5 Lint: Generic.WhiteSpace.ScopeIndent.IncorrectExact: Line indented incorrectly; expected 4 tabs, found 5 | |||||
$object->SetError('Template', 'template_file_missing', 'la_error_TemplateFileMissing'); | $object->SetError('Template', 'template_file_missing', 'la_error_TemplateFileMissing'); | ||||
} | } | ||||
Line indented incorrectly; expected 4 tabs, found 5 Lint: Generic.WhiteSpace.ScopeIndent.IncorrectExact: Line indented incorrectly; expected 4 tabs, found 5 | |||||
} | } | ||||
Line indented incorrectly; expected 3 tabs, found 4 Lint: Generic.WhiteSpace.ScopeIndent.IncorrectExact: Line indented incorrectly; expected 3 tabs, found 4 | |||||
else { | |||||
Line indented incorrectly; expected 3 tabs, found 4 Lint: Generic.WhiteSpace.ScopeIndent.IncorrectExact: Line indented incorrectly; expected 3 tabs, found 4 | |||||
$object->SetDBField('ThemeId', 0); | |||||
} | |||||
Line indented incorrectly; expected 3 tabs, found 4 Lint: Generic.WhiteSpace.ScopeIndent.IncorrectExact: Line indented incorrectly; expected 3 tabs, found 4 | |||||
} | |||||
$this->_saveTitleField($object, 'Title'); | $this->_saveTitleField($object, 'Title'); | ||||
$this->_saveTitleField($object, 'MenuTitle'); | $this->_saveTitleField($object, 'MenuTitle'); | ||||
$root_category = $this->Application->getBaseCategory(); | $root_category = $this->Application->getBaseCategory(); | ||||
if ( file_exists(FULL_PATH . '/themes') && ($object->GetDBField('ParentId') == $root_category) && ($object->GetDBField('Template') == CATEGORY_TEMPLATE_INHERIT) ) { | if ( file_exists(FULL_PATH . '/themes') && ($object->GetDBField('ParentId') == $root_category) && ($object->GetDBField('Template') == CATEGORY_TEMPLATE_INHERIT) ) { | ||||
// there are themes + creating top level category | // there are themes + creating top level category | ||||
▲ Show 20 Lines • Show All 1280 Lines • Show Last 20 Lines |
Line indented incorrectly; expected 2 tabs, found 3