User tests: Successful: Unsuccessful:
Based on a JSE question: http://joomla.stackexchange.com/questions/2501/where-is-the-copy-template-button-in-template-manager-in-j3-3-1-after-update
If you uninstall Hathor, the "Copy Template" and "Rename File" buttons in the template manager is no longer showing up. This is because the current check explicitely checks for 0. The database query however returns null if Hathor is uninstalled.
The check is needed because Hathor has special overrides where those features are offered in a accordion instead of a button. Thus the button should be hidden if Hathor is the active template.
Since we can get the active template name using the API JFactory::getApplication()->getTemplate() I have changed the code to use this, only showing the button if it's not "hathor".
I also removed the model method getHathor and the view property hathor because they are no longer needed. With this approach it should even use one less database query.
I applied your fix on a website with this issue and it does fix it.
Tested. This PR fixes the problem!
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-07-09 20:52:43 |
After looking why we even have this check, I have updated the PR to remove the whole
getHathorand$this->hathorstuff and changed the check to useJFactory::getApplication()->getTemplate()instead of an own database query.Updated also PR description.