Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Remove versioning support from com_categories #186

Merged
merged 1 commit into from
Jul 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions app/administrator/components/com_categories/models/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,6 @@ class CategoriesModelCategory extends JModelAdmin
*/
protected $text_prefix = 'COM_CATEGORIES';

/**
* The type alias for this content type. Used for content version history.
*
* @var string
* @since 3.2
*/
public $typeAlias = null;

/**
* Override parent constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @see JModelLegacy
* @since 3.2
*/
public function __construct($config = array())
{
parent::__construct($config);
$extension = JFactory::getApplication()->input->get('extension', 'com_content');
$this->typeAlias = $extension . '.category';
}

/**
* Method to test whether a record can be deleted.
*
Expand Down Expand Up @@ -680,9 +657,6 @@ public function saveorder($idArray = null, $lft_array = null)
*/
protected function batchCopy($value, $pks, $contexts)
{
$type = new JUcmType;
$this->type = $type->getTypeByAlias($this->typeAlias);

// $value comes as {parent_id}.{extension}
$parts = explode('.', $value);
$parentId = (int) JArrayHelper::getValue($parts, 0, 1);
Expand Down Expand Up @@ -876,9 +850,7 @@ protected function batchCopy($value, $pks, $contexts)
protected function batchMove($value, $pks, $contexts)
{
$parentId = (int) $value;
$type = new JUcmType;
$this->type = $type->getTypeByAlias($this->typeAlias);


$db = $this->getDbo();
$query = $db->getQuery(true);
$extension = JFactory::getApplication()->input->get('extension', '', 'word');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@
hint="JFIELD_ALIAS_PLACEHOLDER"
size="45"/>

<field
name="version_note"
type="text"
label="JGLOBAL_FIELD_VERSION_NOTE_LABEL"
description="JGLOBAL_FIELD_VERSION_NOTE_DESC"
class="span12"
size="45" />

<field
name="note"
type="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,6 @@ protected function addToolbar()
}
else
{
if ($componentParams->get('save_history', 0) && $user->authorise('core.edit'))
{
$typeAlias = $extension . '.category';
JToolbarHelper::versions($typeAlias, $this->item->id);
}

JToolbarHelper::cancel('category.cancel', 'JTOOLBAR_CLOSE');
}

Expand All @@ -185,6 +179,7 @@ protected function addToolbar()
{
$url = null;
}

JToolbarHelper::help($ref_key, $componentParams->exists('helpURL'), $url, $component);
}
}