Page MenuHomeIn-Portal Phabricator

D95.id229.diff
No OneTemporary

File Metadata

Created
Sat, Jun 28, 7:20 PM

D95.id229.diff

Index: core/units/helpers/page_helper.php
===================================================================
--- core/units/helpers/page_helper.php
+++ core/units/helpers/page_helper.php
@@ -177,8 +177,10 @@
$editing_mode = $this->Application->GetVar('editing_mode'); // not in a EDITING_MODE constant, while in admin console
$revision_clause = $table_name . 'RevisionNumber = ' . $live_revision_number . ' AND ' . $table_name . 'IsDraft = 0';
- if ( $this->Application->GetVar('preview') || $editing_mode == EDITING_MODE_CONTENT ) {
- $revision_clause = '(' . $table_name . 'CreatedById = ' . $user_id . ' AND ' . $table_name . 'IsDraft = 1) OR (' . $revision_clause . ')';
+ if ( $this->Application->ConfigValue('EnablePageContentRevisionControl') ) {
+ if ( $this->Application->GetVar('preview') || $editing_mode == EDITING_MODE_CONTENT ) {
+ $revision_clause = '(' . $table_name . 'CreatedById = ' . $user_id . ' AND ' . $table_name . 'IsDraft = 1) OR (' . $revision_clause . ')';
+ }
}
}

Event Timeline