diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql index c374049226927..a0e5f65b784f6 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql @@ -10,6 +10,7 @@ CREATE TABLE IF NOT EXISTS `#__workflows` ( `description` text NOT NULL, `extension` varchar(50) NOT NULL, `default` tinyint(1) NOT NULL DEFAULT 0, + `core` tinyint(1) NOT NULL DEFAULT 0, `ordering` int(11) NOT NULL DEFAULT 0, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `created_by` int(10) NOT NULL DEFAULT 0, @@ -30,8 +31,8 @@ CREATE TABLE IF NOT EXISTS `#__workflows` ( -- Dumping data for table `#__workflows` -- -INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `ordering`, `created`, `created_by`, `modified`, `modified_by`) VALUES -(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0); +INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `core`, `ordering`, `created`, `created_by`, `modified`, `modified_by`) VALUES +(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0); -- -- Table structure for table `#__workflow_associations` diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql index acd26ecfc34ce..28c2c3c34cdc1 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql @@ -10,6 +10,7 @@ CREATE TABLE IF NOT EXISTS "#__workflows" ( "description" text NOT NULL, "extension" varchar(50) NOT NULL, "default" smallint NOT NULL DEFAULT 0, + "core" smallint NOT NULL DEFAULT 0, "ordering" bigint NOT NULL DEFAULT 0, "created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, "created_by" bigint DEFAULT 0 NOT NULL, @@ -27,8 +28,8 @@ CREATE INDEX "#__workflows_idx_created_by" ON "#__workflows" ("created_by"); CREATE INDEX "#__workflows_idx_modified" ON "#__workflows" ("modified"); CREATE INDEX "#__workflows_idx_modified_by" ON "#__workflows" ("modified_by"); -INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "ordering", "created", "created_by", "modified", "modified_by") VALUES -(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, '1970-01-01 00:00:00', 0, '1970-01-01 00:00:00', 0); +INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "core", "ordering", "created", "created_by", "modified", "modified_by") VALUES +(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, '1970-01-01 00:00:00', 0, '1970-01-01 00:00:00', 0); -- -- Table structure for table "#__workflow_associations" diff --git a/administrator/components/com_workflow/Controller/StageController.php b/administrator/components/com_workflow/Controller/StageController.php index b227d947ce0a3..3c106a703c8e1 100644 --- a/administrator/components/com_workflow/Controller/StageController.php +++ b/administrator/components/com_workflow/Controller/StageController.php @@ -90,6 +90,15 @@ protected function allowAdd($data = array()) { $user = Factory::getUser(); + $model = $this->getModel('Workflow'); + + $workflow = $model->getItem($this->workflowId); + + if ($workflow->core) + { + return false; + } + return $user->authorise('core.create', $this->extension); } @@ -108,6 +117,19 @@ protected function allowEdit($data = array(), $key = 'id') $recordId = isset($data[$key]) ? (int) $data[$key] : 0; $user = Factory::getUser(); + $model = $this->getModel(); + + $item = $model->getItem($recordId); + + $model = $this->getModel('Workflow'); + + $workflow = $model->getItem($item->workflow_id); + + if ($workflow->core) + { + return false; + } + // Check "edit" permission on record asset (explicit or inherited) if ($user->authorise('core.edit', $this->extension . '.stage.' . $recordId)) { diff --git a/administrator/components/com_workflow/Controller/TransitionController.php b/administrator/components/com_workflow/Controller/TransitionController.php index 7e24d3114ecd1..6a13a869074bb 100644 --- a/administrator/components/com_workflow/Controller/TransitionController.php +++ b/administrator/components/com_workflow/Controller/TransitionController.php @@ -90,6 +90,15 @@ protected function allowAdd($data = array()) { $user = Factory::getUser(); + $model = $this->getModel('Workflow'); + + $workflow = $model->getItem($this->workflowId); + + if ($workflow->core) + { + return false; + } + return $user->authorise('core.create', $this->extension); } @@ -108,6 +117,19 @@ protected function allowEdit($data = array(), $key = 'id') $recordId = isset($data[$key]) ? (int) $data[$key] : 0; $user = Factory::getUser(); + $model = $this->getModel(); + + $item = $model->getItem($recordId); + + $model = $this->getModel('Workflow'); + + $workflow = $model->getItem($item->workflow_id); + + if ($workflow->core) + { + return false; + } + // Check "edit" permission on record asset (explicit or inherited) if ($user->authorise('core.edit', $this->extension . '.transition.' . $recordId)) { diff --git a/administrator/components/com_workflow/Controller/WorkflowController.php b/administrator/components/com_workflow/Controller/WorkflowController.php index 195bc15b105b0..ef369c1446881 100644 --- a/administrator/components/com_workflow/Controller/WorkflowController.php +++ b/administrator/components/com_workflow/Controller/WorkflowController.php @@ -89,6 +89,13 @@ protected function allowEdit($data = array(), $key = 'id') $recordId = isset($data[$key]) ? (int) $data[$key] : 0; $user = Factory::getUser(); + $record = $this->getModel()->getItem($recordId); + + if (!empty($record->id) && $record->core) + { + return false; + } + // Check "edit" permission on record asset (explicit or inherited) if ($user->authorise('core.edit', $this->extension . '.workflow.' . $recordId)) { @@ -98,9 +105,6 @@ protected function allowEdit($data = array(), $key = 'id') // Check "edit own" permission on record asset (explicit or inherited) if ($user->authorise('core.edit.own', $this->extension . '.workflow.' . $recordId)) { - // Need to do a lookup from the model to get the owner - $record = $this->getModel()->getItem($recordId); - return !empty($record) && $record->created_by == $user->id; } diff --git a/administrator/components/com_workflow/Model/StageModel.php b/administrator/components/com_workflow/Model/StageModel.php index fb55830f09816..726cf70abbdd1 100644 --- a/administrator/components/com_workflow/Model/StageModel.php +++ b/administrator/components/com_workflow/Model/StageModel.php @@ -117,10 +117,12 @@ public function save($data) */ protected function canDelete($record) { - if (empty($record->id) || $record->published != -2) - { - $this->setError(Text::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED')); + $table = $this->getTable('Workflow', 'Administrator'); + + $table->load($record->workflow_id); + if (empty($record->id) || $record->published != -2 || $table->core) + { return false; } @@ -156,6 +158,15 @@ protected function canEditState($record) $app = Factory::getApplication(); $extension = $app->getUserStateFromRequest('com_workflow.state.filter.extension', 'extension', null, 'cmd'); + $table = $this->getTable('Workflow', 'Administrator'); + + $table->load($record->workflow_id); + + if ($table->core) + { + return false; + } + // Check for existing workflow. if (!empty($record->id)) { diff --git a/administrator/components/com_workflow/Model/StagesModel.php b/administrator/components/com_workflow/Model/StagesModel.php index 7ec1e046bd15d..0768a6235c780 100644 --- a/administrator/components/com_workflow/Model/StagesModel.php +++ b/administrator/components/com_workflow/Model/StagesModel.php @@ -185,4 +185,25 @@ public function getListQuery() return $query; } + + /** + * Returns a workflow object + * + * @return object The workflow + * + * @since __DEPLOY_VERSION__ + */ + public function getWorkflow() + { + $table = $this->getTable('Workflow', 'Administrator'); + + $workflowId = (int) $this->getState('filter.workflow_id'); + + if ($workflowId > 0) + { + $table->load($workflowId); + } + + return (object) $table->getProperties(); + } } diff --git a/administrator/components/com_workflow/Model/TransitionModel.php b/administrator/components/com_workflow/Model/TransitionModel.php index 763a573fa53fe..f3ff69b17d874 100644 --- a/administrator/components/com_workflow/Model/TransitionModel.php +++ b/administrator/components/com_workflow/Model/TransitionModel.php @@ -54,7 +54,11 @@ public function populateState() */ protected function canDelete($record) { - if (empty($record->id) || $record->published != -2) + $table = $this->getTable('Workflow', 'Administrator'); + + $table->load($record->workflow_id); + + if (empty($record->id) || $record->published != -2 || $table->core) { return false; } @@ -80,6 +84,15 @@ protected function canEditState($record) $app = Factory::getApplication(); $extension = $app->getUserStateFromRequest('com_workflow.transition.filter.extension', 'extension', null, 'cmd'); + $table = $this->getTable('Workflow', 'Administrator'); + + $table->load($record->workflow_id); + + if ($table->core) + { + return false; + } + // Check for existing workflow. if (!empty($record->id)) { diff --git a/administrator/components/com_workflow/Model/TransitionsModel.php b/administrator/components/com_workflow/Model/TransitionsModel.php index 92a080ab094ab..3f5912415e07e 100644 --- a/administrator/components/com_workflow/Model/TransitionsModel.php +++ b/administrator/components/com_workflow/Model/TransitionsModel.php @@ -232,4 +232,26 @@ public function getFilterForm($data = array(), $loadData = true) return $form; } + + /** + * Returns a workflow object + * + * @return object The workflow + * + * @since __DEPLOY_VERSION__ + */ + public function getWorkflow() + { + $table = $this->getTable('Workflow', 'Administrator'); + + $workflowId = (int) $this->getState('filter.workflow_id'); + + if ($workflowId > 0) + { + $table->load($workflowId); + } + + return (object) $table->getProperties(); + } + } diff --git a/administrator/components/com_workflow/Model/WorkflowModel.php b/administrator/components/com_workflow/Model/WorkflowModel.php index 54e43a9d9258b..3ec310fbd6831 100644 --- a/administrator/components/com_workflow/Model/WorkflowModel.php +++ b/administrator/components/com_workflow/Model/WorkflowModel.php @@ -347,7 +347,7 @@ public function setDefault($pk, $value = 1) */ protected function canDelete($record) { - if (empty($record->id) || $record->published != -2) + if (empty($record->id) || $record->published != -2 || $record->core) { return false; } @@ -368,6 +368,11 @@ protected function canEditState($record) { $user = Factory::getUser(); + if (!empty($record->core)) + { + return false; + } + // Check for existing workflow. if (!empty($record->id)) { diff --git a/administrator/components/com_workflow/Model/WorkflowsModel.php b/administrator/components/com_workflow/Model/WorkflowsModel.php index a54ac50f8b7f9..d136bc6bc0b60 100644 --- a/administrator/components/com_workflow/Model/WorkflowsModel.php +++ b/administrator/components/com_workflow/Model/WorkflowsModel.php @@ -195,6 +195,7 @@ public function getListQuery() 'w.published', 'w.ordering', 'w.default', + 'w.core', 'w.created_by', 'w.description', 'u.name' diff --git a/administrator/components/com_workflow/View/Stages/HtmlView.php b/administrator/components/com_workflow/View/Stages/HtmlView.php index 60d6f8157abbe..1f44be6f09b49 100644 --- a/administrator/components/com_workflow/View/Stages/HtmlView.php +++ b/administrator/components/com_workflow/View/Stages/HtmlView.php @@ -73,6 +73,14 @@ class HtmlView extends BaseHtmlView */ public $activeFilters; + /** + * The current workflow + * + * @var object + * @since __DEPLOY_VERSION__ + */ + protected $workflow; + /** * The ID of current workflow * @@ -109,11 +117,12 @@ public function display($tpl = null) $this->state = $this->get('State'); $this->stages = $this->get('Items'); $this->pagination = $this->get('Pagination'); - $this->filterForm = $this->get('FilterForm'); - $this->activeFilters = $this->get('ActiveFilters'); + $this->filterForm = $this->get('FilterForm'); + $this->activeFilters = $this->get('ActiveFilters'); - $this->workflowID = $this->state->get('filter.workflow_id'); - $this->extension = $this->state->get('filter.extension'); + $this->workflow = $this->get('Workflow'); + $this->workflowID = $this->workflow->id; + $this->extension = $this->workflow->extension; WorkflowHelper::addSubmenu('stages'); @@ -150,12 +159,14 @@ protected function addToolbar() ToolbarHelper::title(Text::sprintf('COM_WORKFLOW_STAGES_LIST', $this->escape($workflow)), 'address contact'); - if ($canDo->get('core.create')) + $isCore = $this->workflow->core; + + if ($canDo->get('core.create') && !$isCore) { ToolbarHelper::addNew('stage.add'); } - if ($canDo->get('core.edit.state')) + if ($canDo->get('core.edit.state') && !$isCore) { ToolbarHelper::publishList('stages.publish'); ToolbarHelper::unpublishList('stages.unpublish'); @@ -167,11 +178,11 @@ protected function addToolbar() ToolbarHelper::checkin('stages.checkin', 'JTOOLBAR_CHECKIN', true); } - if ($this->state->get('filter.published') === '-2' && $canDo->get('core.delete')) + if ($this->state->get('filter.published') === '-2' && $canDo->get('core.delete') && !$isCore) { ToolbarHelper::deleteList(Text::_('COM_WORKFLOW_ARE_YOU_SURE'), 'stages.delete'); } - elseif ($canDo->get('core.edit.state')) + elseif ($canDo->get('core.edit.state') && !$isCore) { ToolbarHelper::trash('stages.trash'); } diff --git a/administrator/components/com_workflow/View/Transitions/HtmlView.php b/administrator/components/com_workflow/View/Transitions/HtmlView.php index dd4db5c8be70d..bcb3be576c19e 100644 --- a/administrator/components/com_workflow/View/Transitions/HtmlView.php +++ b/administrator/components/com_workflow/View/Transitions/HtmlView.php @@ -71,6 +71,14 @@ class HtmlView extends BaseHtmlView */ public $activeFilters; + /** + * The current workflow + * + * @var object + * @since __DEPLOY_VERSION__ + */ + protected $workflow; + /** * The ID of current workflow * @@ -110,8 +118,9 @@ public function display($tpl = null) $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); - $this->workflowID = $this->state->get('filter.workflow_id'); - $this->extension = $this->state->get('filter.extension'); + $this->workflow = $this->get('Workflow'); + $this->workflowID = $this->workflow->id; + $this->extension = $this->workflow->extension; WorkflowHelper::addSubmenu('transitions'); @@ -137,22 +146,24 @@ protected function addToolbar() ToolbarHelper::title(Text::sprintf('COM_WORKFLOW_TRANSITIONS_LIST', $this->escape($workflow)), 'address contact'); - if ($canDo->get('core.create')) + $isCore = $this->workflow->core; + + if ($canDo->get('core.create') && !$isCore) { ToolbarHelper::addNew('transition.add'); } - if ($canDo->get('core.edit.state')) + if ($canDo->get('core.edit.state') && !$isCore) { ToolbarHelper::publishList('transitions.publish'); ToolbarHelper::unpublishList('transitions.unpublish'); } - if ($this->state->get('filter.published') === '-2' && $canDo->get('core.delete')) + if ($this->state->get('filter.published') === '-2' && $canDo->get('core.delete') && !$isCore) { ToolbarHelper::deleteList(Text::_('COM_WORKFLOW_ARE_YOU_SURE'), 'transitions.delete'); } - elseif ($canDo->get('core.edit.state')) + elseif ($canDo->get('core.edit.state') && !$isCore) { ToolbarHelper::trash('transitions.trash'); } diff --git a/administrator/components/com_workflow/View/Workflow/HtmlView.php b/administrator/components/com_workflow/View/Workflow/HtmlView.php index 846e33b0fda32..bd3367bfe53cd 100644 --- a/administrator/components/com_workflow/View/Workflow/HtmlView.php +++ b/administrator/components/com_workflow/View/Workflow/HtmlView.php @@ -130,7 +130,7 @@ protected function addToolbar() // Since it's an existing record, check the edit permission, or fall back to edit own if the owner. $itemEditable = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by == $userId); - if ($itemEditable) + if ($itemEditable && !$this->item->core) { $toolbarButtons = [['apply', 'workflow.apply'], ['save', 'workflow.save']]; diff --git a/administrator/components/com_workflow/tmpl/stages/default.php b/administrator/components/com_workflow/tmpl/stages/default.php index c580c306216d6..534ba078ce4d6 100644 --- a/administrator/components/com_workflow/tmpl/stages/default.php +++ b/administrator/components/com_workflow/tmpl/stages/default.php @@ -30,6 +30,8 @@ $saveOrder = ($listOrder == 's.ordering'); +$isCore = $this->workflow->core; + if ($saveOrder) { $saveOrderingUrl = 'index.php?option=com_workflow&task=stages.saveOrderAjax&workflow_id=' . (int) $this->workflowID . '&extension=' . $this->escape($this->extension) . '&' . Session::getFormToken() . '=1'; @@ -87,10 +89,10 @@ stages as $i => $item): $edit = Route::_('index.php?option=com_workflow&task=stage.edit&id=' . $item->id . '&workflow_id=' . (int) $this->workflowID . '&extension=' . $this->extension); - $canEdit = $user->authorise('core.edit', $this->extension . '.stage.' . $item->id); + $canEdit = $user->authorise('core.edit', $this->extension . '.stage.' . $item->id) && !$isCore; // @TODO set proper checkin fields $canCheckin = true || $user->authorise('core.admin', 'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0; - $canChange = $user->authorise('core.edit.stage', $this->extension . '.stage.' . $item->id) && $canCheckin; + $canChange = $user->authorise('core.edit.stage', $this->extension . '.stage.' . $item->id) && $canCheckin && !$isCore; ?> diff --git a/administrator/components/com_workflow/tmpl/transitions/default.php b/administrator/components/com_workflow/tmpl/transitions/default.php index 900180b39af5e..7f0a11ec7f3a3 100644 --- a/administrator/components/com_workflow/tmpl/transitions/default.php +++ b/administrator/components/com_workflow/tmpl/transitions/default.php @@ -30,6 +30,8 @@ $saveOrder = ($listOrder == 't.ordering'); +$isCore = $this->workflow->core; + if ($saveOrder) { $saveOrderingUrl = 'index.php?option=com_workflow&task=transitions.saveOrderAjax&workflow_id=' . (int) $this->workflowID . '&extension=' . $this->escape($this->extension) . '&' . Session::getFormToken() . '=1'; @@ -87,10 +89,10 @@ transitions as $i => $item): $edit = Route::_('index.php?option=com_workflow&task=transition.edit&id=' . $item->id . '&workflow_id=' . (int) $this->workflowID . '&extension=' . $this->extension); - $canEdit = $user->authorise('core.edit', $this->extension . '.transition.' . $item->id); + $canEdit = $user->authorise('core.edit', $this->extension . '.transition.' . $item->id) && !$isCore; // @TODO set proper checkin fields $canCheckin = true || $user->authorise('core.admin', 'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0; - $canChange = $user->authorise('core.edit.state', $this->extension . '.transition.' . $item->id) && $canCheckin; ?> + $canChange = $user->authorise('core.edit.state', $this->extension . '.transition.' . $item->id) && $canCheckin && !$isCore; ?> id . '&extension=' . $extension); $edit = Route::_('index.php?option=com_workflow&task=workflow.edit&id=' . $item->id . '&extension=' . $extension); - $canEdit = $user->authorise('core.edit', $extension . '.workflow.' . $item->id); + $isCore = !empty($item->core); + $canEdit = $user->authorise('core.edit', $extension . '.workflow.' . $item->id) && !$isCore; // @TODO set proper checkin fields $canCheckin = true || $user->authorise('core.admin', 'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0; - $canEditOwn = $user->authorise('core.edit.own', $extension . '.workflow.' . $item->id) && $item->created_by == $userId; - $canChange = $user->authorise('core.edit.state', $extension . '.workflow.' . $item->id) && $canCheckin; + $canEditOwn = $user->authorise('core.edit.own', $extension . '.workflow.' . $item->id) && $item->created_by == $userId && !$isCore; + $canChange = $user->authorise('core.edit.state', $extension . '.workflow.' . $item->id) && $canCheckin && !$isCore; ?> diff --git a/installation/sql/mysql/joomla.sql b/installation/sql/mysql/joomla.sql index 42bd3362e109b..c097498a5e5a3 100644 --- a/installation/sql/mysql/joomla.sql +++ b/installation/sql/mysql/joomla.sql @@ -1967,6 +1967,7 @@ CREATE TABLE IF NOT EXISTS `#__workflows` ( `description` text NOT NULL, `extension` varchar(50) NOT NULL, `default` tinyint(1) NOT NULL DEFAULT 0, + `core` tinyint(1) NOT NULL DEFAULT 0, `ordering` int(11) NOT NULL DEFAULT 0, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `created_by` int(10) NOT NULL DEFAULT 0, @@ -1986,8 +1987,8 @@ CREATE TABLE IF NOT EXISTS `#__workflows` ( -- Dumping data for table `#__workflows` -- -INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `ordering`, `created`, `created_by`, `modified`, `modified_by`) VALUES -(1, 56, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0); +INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `core`, `ordering`, `created`, `created_by`, `modified`, `modified_by`) VALUES +(1, 56, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0); -- -- Table structure for table `#__workflow_associations` diff --git a/installation/sql/postgresql/joomla.sql b/installation/sql/postgresql/joomla.sql index 0af077145d6d7..e5c91d6b48fa7 100644 --- a/installation/sql/postgresql/joomla.sql +++ b/installation/sql/postgresql/joomla.sql @@ -1964,6 +1964,7 @@ CREATE TABLE IF NOT EXISTS "#__workflows" ( "description" text NOT NULL, "extension" varchar(50) NOT NULL, "default" smallint NOT NULL DEFAULT 0, + "core" smallint NOT NULL DEFAULT 0, "ordering" bigint NOT NULL DEFAULT 0, "created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, "created_by" bigint DEFAULT 0 NOT NULL, @@ -1981,8 +1982,8 @@ CREATE INDEX "#__workflows_idx_created_by" ON "#__workflows" ("created_by"); CREATE INDEX "#__workflows_idx_modified" ON "#__workflows" ("modified"); CREATE INDEX "#__workflows_idx_modified_by" ON "#__workflows" ("modified_by"); -INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "ordering", "created", "created_by", "modified", "modified_by") VALUES -(1, 56, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, '1970-01-01 00:00:00', 0, '1970-01-01 00:00:00', 0); +INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "core", "ordering", "created", "created_by", "modified", "modified_by") VALUES +(1, 56, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, '1970-01-01 00:00:00', 0, '1970-01-01 00:00:00', 0); SELECT setval('#__workflows_id_seq', 2, false);