Commit f77904755854dcbf8f2918a2d36a92acaa3744ef

Authored by kevin_fourie
1 parent 3a651a0b

Synced STABLE trunk with 3.5.2d bugfix branch.

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8585 c91229c3-7414-0410-bfa2-8a42b809f60b
bin/luceneserver/msvcr71.dll 0 → 100644
No preview for this file type
search2/bin/cronCleanup.php 0 → 100644
  1 +<?php
  2 +
  3 +/**
  4 + * $Id:$
  5 + *
  6 + * KnowledgeTree Community Edition
  7 + * Document Management Made Simple
  8 + * Copyright (C) 2008 KnowledgeTree Inc.
  9 + * Portions copyright The Jam Warehouse Software (Pty) Limited
  10 + *
  11 + * This program is free software; you can redistribute it and/or modify it under
  12 + * the terms of the GNU General Public License version 3 as published by the
  13 + * Free Software Foundation.
  14 + *
  15 + * This program is distributed in the hope that it will be useful, but WITHOUT
  16 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  17 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  18 + * details.
  19 + *
  20 + * You should have received a copy of the GNU General Public License
  21 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22 + *
  23 + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco,
  24 + * California 94120-7775, or email info@knowledgetree.com.
  25 + *
  26 + * The interactive user interfaces in modified source and object code versions
  27 + * of this program must display Appropriate Legal Notices, as required under
  28 + * Section 5 of the GNU General Public License version 3.
  29 + *
  30 + * In accordance with Section 7(b) of the GNU General Public License version 3,
  31 + * these Appropriate Legal Notices must retain the display of the "Powered by
  32 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
  33 + * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
  34 + * must display the words "Powered by KnowledgeTree" and retain the original
  35 + * copyright notice.
  36 + * Contributor( s): ______________________________________
  37 + *
  38 + */
  39 +
  40 +chdir(dirname(__FILE__));
  41 +require_once(realpath('../../config/dmsDefaults.php'));
  42 +
  43 +$config = KTConfig::getSingleton();
  44 +$temp_dir =$config->get("urls/tmpDirectory");
  45 +
  46 +
  47 +cleanupTempDirectory($temp_dir);
  48 +
  49 +function cleanupTempDirectory($dir)
  50 +{
  51 + if (!is_dir($dir))
  52 + {
  53 + return;
  54 + }
  55 + $dir = str_replace('\\','/', $dir);
  56 +
  57 + $dh = opendir($dir);
  58 + while (($name = readdir($dh)) !== false)
  59 + {
  60 + if (substr($name, 0, 9) != 'ktindexer')
  61 + {
  62 + continue;
  63 + }
  64 + unlink($dir . '/' . $name);
  65 + }
  66 + closedir($dh);
  67 +}
  68 +
  69 +
  70 +
  71 +?>
0 \ No newline at end of file 72 \ No newline at end of file