foreach ($templates as $template) {
if ($template->move($f_current_folder, $f_destination_folder)) {
$searchKey = $template->getName();
$replacementKey = ltrim($f_destination_folder
. '/' . basename($template->getName()), '/');
if ($template->getType() != $nonTplTypeId) {
$searchKey = ' ' . $searchKey;
$replacementKey = ' ' . $replacementKey;
}
$replaceObj = new FileTextSearch();
$replaceObj->setExtensions(array('tpl','css'));
$replaceObj->setSearchKey($searchKey);
$replaceObj->setReplacementKey($replacementKey);
$replaceObj->findReplace($Campsite['TEMPLATE_DIRECTORY']);
Template::UpdateOnChange($template->getName(),
$f_destination_folder
. '/'
. basename($template->getName()));
}
}
// Clear compiled templates
require_once($GLOBALS['g_campsiteDir']."/template_engine/classes/CampTemplate.php");
CampTemplate::singleton()->clear_compiled_tpl();
camp_html_add_msg(getGS("Template(s) moved."), "ok");
camp_html_goto_page($url);
}
}
} // END perform the action
$crumbs = array();
$crumbs[] = array(getGS("Configure"), "");