Commit 8a44f8e062626e88a2a8a3dd094514399d669503

Authored by Megan Watson
1 parent 656aa634

KTS-3642

"Problem with dropbox Beta Assigning the return value of new by reference is deprecated"
Fixed. Added a check on the uploads directory, if it doesn't exist it will be created.

Committed by: Megan Watson
Reviewed by: Conrad Vermeulen



git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9383 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 24 additions and 11 deletions
setup/postcheckup.php
@@ -6,31 +6,31 @@ @@ -6,31 +6,31 @@
6 * Document Management Made Simple 6 * Document Management Made Simple
7 * Copyright (C) 2008 KnowledgeTree Inc. 7 * Copyright (C) 2008 KnowledgeTree Inc.
8 * Portions copyright The Jam Warehouse Software (Pty) Limited 8 * Portions copyright The Jam Warehouse Software (Pty) Limited
9 - * 9 + *
10 * This program is free software; you can redistribute it and/or modify it under 10 * This program is free software; you can redistribute it and/or modify it under
11 * the terms of the GNU General Public License version 3 as published by the 11 * the terms of the GNU General Public License version 3 as published by the
12 * Free Software Foundation. 12 * Free Software Foundation.
13 - * 13 + *
14 * This program is distributed in the hope that it will be useful, but WITHOUT 14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * details. 17 * details.
18 - * 18 + *
19 * You should have received a copy of the GNU General Public License 19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 - *  
22 - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, 21 + *
  22 + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco,
23 * California 94120-7775, or email info@knowledgetree.com. 23 * California 94120-7775, or email info@knowledgetree.com.
24 - * 24 + *
25 * The interactive user interfaces in modified source and object code versions 25 * The interactive user interfaces in modified source and object code versions
26 * of this program must display Appropriate Legal Notices, as required under 26 * of this program must display Appropriate Legal Notices, as required under
27 * Section 5 of the GNU General Public License version 3. 27 * Section 5 of the GNU General Public License version 3.
28 - * 28 + *
29 * In accordance with Section 7(b) of the GNU General Public License version 3, 29 * In accordance with Section 7(b) of the GNU General Public License version 3,
30 * these Appropriate Legal Notices must retain the display of the "Powered by 30 * these Appropriate Legal Notices must retain the display of the "Powered by
31 - * KnowledgeTree" logo and retain the original copyright notice. If the display of the 31 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
32 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices 32 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
33 - * must display the words "Powered by KnowledgeTree" and retain the original 33 + * must display the words "Powered by KnowledgeTree" and retain the original
34 * copyright notice. 34 * copyright notice.
35 * Contributor( s): ______________________________________ 35 * Contributor( s): ______________________________________
36 * 36 *
@@ -42,6 +42,16 @@ require_once(&#39;../config/dmsDefaults.php&#39;); @@ -42,6 +42,16 @@ require_once(&#39;../config/dmsDefaults.php&#39;);
42 42
43 function writablePath($name, $path) { 43 function writablePath($name, $path) {
44 $ret = sprintf('<tr><td>%s (%s)</td><td>', $name, $path); 44 $ret = sprintf('<tr><td>%s (%s)</td><td>', $name, $path);
  45 +
  46 + // Ensure the path is a full/absolute path
  47 + $path = KTUtil::isAbsolutePath($path) ? $path : KT_DIR . $path;
  48 +
  49 + // Check if the directory exists and create it if it doesn't
  50 + if(!file_exists($path)){
  51 + mkdir($path, 0755);
  52 + }
  53 +
  54 + // Check if directory is writable
45 if (is_writable($path)) { 55 if (is_writable($path)) {
46 $ret .= sprintf('<font color="green"><b>Writeable</b></font>'); 56 $ret .= sprintf('<font color="green"><b>Writeable</b></font>');
47 } else { 57 } else {
@@ -71,8 +81,11 @@ that things are still set up correctly.&lt;/p&gt; @@ -71,8 +81,11 @@ that things are still set up correctly.&lt;/p&gt;
71 81
72 <table width="50%"> 82 <table width="50%">
73 <tbody> 83 <tbody>
74 - <?php echo writablePath('Log directory', $default->logDirectory)?>  
75 - <?php echo writablePath('Document directory', $default->documentRoot)?> 84 + <?php
  85 + echo writablePath('Log directory', $default->logDirectory);
  86 + echo writablePath('Document directory', $default->documentRoot);
  87 + echo writablePath('Webservice uploads directory', $default->uploadDirectory);
  88 + ?>
76 </tbody> 89 </tbody>
77 </table> 90 </table>
78 91