static function clearSmartyCompiledFiles($path = null) { $root_directory = vglobal('root_directory'); if ($path == null) { $path = $root_directory . 'cache/templates_c/'; } if (file_exists($path) && is_dir($path)) { $mydir = @opendir($path); while (false !== ($file = readdir($mydir))) { if ($file != "." && $file != ".." && $file != ".svn") { //chmod($path.$file, 0777); if (is_dir($path . $file)) { chdir('.'); clear_smarty_cache($path . $file . '/'); //rmdir($path.$file) or DIE("couldn't delete $path$file<br />"); // No need to delete the directories. } else { // Delete only files ending with .tpl.php if (strripos($file, '.tpl.php') == strlen($file) - strlen('.tpl.php')) { unlink($path . $file) or die("couldn't delete {$path}{$file}<br />"); } } } } @closedir($mydir); } }
/** Function to carry out all the necessary actions after migration */ function perform_post_migration_activities() { //After applying all the DB Changes,Here we clear the Smarty cache files clear_smarty_cache(); //Writing tab data in flat file create_tab_data_file(); create_parenttab_data_file(); }