When using Joomla! versioning feature, we are able to fix a number of history limit in configuration.
This history limit is only applied of the component context eg: com_banners.
If you want to got (wanna keep using banners component for exemple) only 10 history limit for banner and 5 for client (dunno if this could be real) this is not possible.
Adding another context, eg:
<field
name="history_limit.banner"
type="text"
filter="integer"
label="JGLOBAL_HISTORY_LIMIT_OPTIONS_LABEL"
description="JGLOBAL_HISTORY_LIMIT_OPTIONS_DESC"
default="5"
/>
This possibility could help in third application (got some component who need this new feature), also maybe in actual joomla component; just want to know (got some feedback) if people agree with that.
Or maybe im wrong and there is another way.
// Load history_limit config from extension.
$aliasParts = explode('.', $this->typeAlias);
$context = (isset($aliasParts[1]))?'.'.$aliasParts[1]:'';
if ($maxVersions = JComponentHelper::getParams($aliasParts[0])->get('history_limit'.$context, 0))
{
$historyTable->deleteOldVersions($maxVersions);
}
PLUS checking if only get('history_limit', 0))
for B/C
Category | ⇒ | Feature Request |
Labels |
Added:
?
|
As you have code to fix the problem. Can you send your changes as Pull Request? If you need help try this doc: https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests else let us know what you need
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-06-19 15:04:12 |
Closed_By | ⇒ | Devportobello |
I don't think we need that anywhere in core. But if it's
then I don't see why we can't add it.