You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
885 B

<?php
// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
/**
* @param $installer
* @return void|bool
*/
function upgrade_20170127_remove_templates_c_tiki($installer)
{
$dir_handle = false;
$dirname = 'templates_c';
if (is_dir($dirname)) {
$dir_handle = opendir($dirname);
}
if (! $dir_handle) {
return;
}
while ($file = readdir($dir_handle)) {
if ($file != "." && $file != "..") {
if (! is_dir($dirname . "/" . $file)) {
unlink($dirname . "/" . $file);
} else {
rmdir($dirname . '/' . $file);
}
}
}
closedir($dir_handle);
rmdir($dirname);
}