Commit 40ed47b9323dd2afaecca454d3940f7f8894bccf

Authored by Jarrett Jordaan
1 parent 992bb1ca

PT-2492070 : Folder Actions update.

Committed by: Jarrett Jordaan

Reviewed by: Megan Watson
plugins/ktcore/KTFolderActions.php
... ... @@ -162,10 +162,9 @@ class KTFolderAddFolderAction extends KTFolderAction {
162 162 * @return unknown
163 163 */
164 164 function folderTemplateOptions() {
165   - if (KTPluginUtil::pluginIsActive('fs.FolderTemplatesPlugin.plugin')) { // Check if folder templates plugin is active
166   - $oRegistry =& KTPluginRegistry::getSingleton();
167   - $oPlugin =& $oRegistry->getPlugin('fs.FolderTemplatesPlugin.plugin'); // Get a handle on the plugin
168   - return $oPlugin->getTemplates();
  165 + if (KTPluginUtil::pluginIsActive('folder.templates.plugin')) { // Check if folder templates plugin is active
  166 + require_once(FolderTemplatesPlugin_DIR . DIRECTORY_SEPARATOR. "FolderTemplate.inc.php");
  167 + return FolderTemplateRenders::getTemplates();
169 168 }
170 169  
171 170 return false;
... ... @@ -216,11 +215,9 @@ class KTFolderAddFolderAction extends KTFolderAction {
216 215 }
217 216  
218 217 function applyTemplate($rootId, $templateId) {
219   - if (KTPluginUtil::pluginIsActive('fs.FolderTemplatesPlugin.plugin')) { // Check if folder templates plugin is active
220   - $oRegistry =& KTPluginRegistry::getSingleton();
221   - $oPlugin =& $oRegistry->getPlugin('fs.FolderTemplatesPlugin.plugin'); // Get a handle on the plugin
222   - // How to get current user.
223   - return $oPlugin->applyFolderTemplate($rootId, $templateId);
  218 + if (KTPluginUtil::pluginIsActive('folder.templates.plugin')) { // Check if folder templates plugin is active
  219 + require_once(FolderTemplatesPlugin_DIR . DIRECTORY_SEPARATOR ."FolderTemplate.inc.php");
  220 + return FolderTemplates::applyFolderTemplate($rootId, $templateId);
224 221 }
225 222 }
226 223 }
... ...