Commit 5b50ea88aad69981c4d0f3818d5ddda265a98b9f

Authored by Megan Watson
1 parent 6782e221

KTS-3305

"Disk/Folder Utilization dashlets have wrong URLs"
Fixed. The dispatcherUrl was being appended to itself.

Committed by: Megan Watson
Reviewed by: Conrad Vermeulen



git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@8393 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/housekeeper/DiskUsageDashlet.inc.php
... ... @@ -7,31 +7,31 @@
7 7 * Document Management Made Simple
8 8 * Copyright (C) 2008 KnowledgeTree Inc.
9 9 * Portions copyright The Jam Warehouse Software (Pty) Limited
10   - *
  10 + *
11 11 * This program is free software; you can redistribute it and/or modify it under
12 12 * the terms of the GNU General Public License version 3 as published by the
13 13 * Free Software Foundation.
14   - *
  14 + *
15 15 * This program is distributed in the hope that it will be useful, but WITHOUT
16 16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 17 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18 18 * details.
19   - *
  19 + *
20 20 * You should have received a copy of the GNU General Public License
21 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,
  22 + *
  23 + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco,
24 24 * California 94120-7775, or email info@knowledgetree.com.
25   - *
  25 + *
26 26 * The interactive user interfaces in modified source and object code versions
27 27 * of this program must display Appropriate Legal Notices, as required under
28 28 * Section 5 of the GNU General Public License version 3.
29   - *
  29 + *
30 30 * In accordance with Section 7(b) of the GNU General Public License version 3,
31 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
  32 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
33 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
  34 + * must display the words "Powered by KnowledgeTree" and retain the original
35 35 * copyright notice.
36 36 * Contributor( s): ______________________________________
37 37 */
... ... @@ -169,13 +169,12 @@ class DiskUsageDashlet extends KTBaseDashlet
169 169 $rootUrl = $config->get('KnowledgeTree/rootUrl');
170 170  
171 171 $dispatcherURL = $oPlugin->getURLPath('HouseKeeperDispatcher.php');
172   - if (!empty($rootUrl)) $dispatcherURL .= $rootUrl . $dispatcherURL;
173   - if ( substr( $dispatcherURL, 0,1 ) == '/' || substr( $dispatcherURL, 0,1 ) == '\\')
  172 + if (!empty($rootUrl)) $dispatcherURL = $rootUrl . $dispatcherURL;
  173 + $dispatcherURL = str_replace( '\\', '/', $dispatcherURL);
  174 + if ( substr( $dispatcherURL, 0,1 ) != '/')
174 175 {
175   - $dispatcherURL = substr($dispatcherURL,1);
  176 + $dispatcherURL = '/'.$dispatcherURL;
176 177 }
177   - $dispatcherURL = str_replace( '\\', '/', $dispatcherURL);
178   -
179 178  
180 179 $aTemplateData = array(
181 180 'context' => $this,
... ...
plugins/housekeeper/FolderUsageDashlet.inc.php
... ... @@ -7,31 +7,31 @@
7 7 * Document Management Made Simple
8 8 * Copyright (C) 2008 KnowledgeTree Inc.
9 9 * Portions copyright The Jam Warehouse Software (Pty) Limited
10   - *
  10 + *
11 11 * This program is free software; you can redistribute it and/or modify it under
12 12 * the terms of the GNU General Public License version 3 as published by the
13 13 * Free Software Foundation.
14   - *
  14 + *
15 15 * This program is distributed in the hope that it will be useful, but WITHOUT
16 16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 17 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18 18 * details.
19   - *
  19 + *
20 20 * You should have received a copy of the GNU General Public License
21 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,
  22 + *
  23 + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco,
24 24 * California 94120-7775, or email info@knowledgetree.com.
25   - *
  25 + *
26 26 * The interactive user interfaces in modified source and object code versions
27 27 * of this program must display Appropriate Legal Notices, as required under
28 28 * Section 5 of the GNU General Public License version 3.
29   - *
  29 + *
30 30 * In accordance with Section 7(b) of the GNU General Public License version 3,
31 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
  32 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
33 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
  34 + * must display the words "Powered by KnowledgeTree" and retain the original
35 35 * copyright notice.
36 36 * Contributor( s): ______________________________________
37 37 */
... ... @@ -156,13 +156,13 @@ class FolderUsageDashlet extends KTBaseDashlet
156 156 $rootUrl = $config->get('KnowledgeTree/rootUrl');
157 157  
158 158 $dispatcherURL = $oPlugin->getURLPath('HouseKeeperDispatcher.php');
159   - if (!empty($rootUrl)) $dispatcherURL .= $rootUrl . $dispatcherURL;
160   - if ( substr( $dispatcherURL, 0,1 ) == '/' || substr( $dispatcherURL, 0,1 ) == '\\')
  159 + if (!empty($rootUrl)) $dispatcherURL = $rootUrl . $dispatcherURL;
  160 + $dispatcherURL = str_replace( '\\', '/', $dispatcherURL);
  161 + if ( substr( $dispatcherURL, 0,1 ) != '/')
161 162 {
162   - $dispatcherURL = substr($dispatcherURL,1);
  163 + $dispatcherURL = '/'.$dispatcherURL;
163 164 }
164   - $dispatcherURL = str_replace( '\\', '/', $dispatcherURL);
165   -
  165 +
166 166 $this->getUsage();
167 167  
168 168 $aTemplateData = array(
... ...