Skip to content
Browse files

clear cache directory

  • Loading branch information...
1 parent 973e66e commit 173f6fedd4df6f794af290eae22064d27703299e @haraldpdl haraldpdl committed
Showing with 10 additions and 0 deletions.
  1. +10 −0 catalog/install/templates/pages/install_4.php
View
10 catalog/install/templates/pages/install_4.php
@@ -79,6 +79,16 @@
osc_db_query('update ' . TABLE_CONFIGURATION . ' set configuration_value = "' . $dir_fs_document_root . 'includes/work/" where configuration_key = "DIR_FS_CACHE"');
osc_db_query('update ' . TABLE_CONFIGURATION . ' set configuration_value = "' . $dir_fs_document_root . 'includes/work/" where configuration_key = "SESSION_WRITE_DIRECTORY"');
+ if ($handle = opendir($dir_fs_document_root . 'includes/work/')) {
+ while (false !== ($filename = readdir($handle))) {
+ if (substr($filename, strrpos($filename, '.')) == '.cache') {
+ @unlink($dir_fs_document_root . 'includes/work/' . $filename);
+ }
+ }
+
+ closedir($handle);
+ }
+
$http_url = parse_url($HTTP_POST_VARS['HTTP_WWW_ADDRESS']);
$http_server = $http_url['scheme'] . '://' . $http_url['host'];
$http_catalog = $http_url['path'];

0 comments on commit 173f6fe

Please sign in to comment.
Something went wrong with that request. Please try again.