From df7a7a2777cfeb7213ade9e28a6f67e41c8c801e Mon Sep 17 00:00:00 2001 From: kevin_fourie Date: Wed, 13 Aug 2008 13:27:13 +0000 Subject: [PATCH] Merged in from STABLE trunk... --- plugins/ktstandard/KTWebDAVDashletPlugin.php | 32 +++++++++++++++++++++----------- templates/ktstandard/ktwebdavdashlet/dashlet.smarty | 11 +++++++---- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/plugins/ktstandard/KTWebDAVDashletPlugin.php b/plugins/ktstandard/KTWebDAVDashletPlugin.php index c395006..79d9ce3 100644 --- a/plugins/ktstandard/KTWebDAVDashletPlugin.php +++ b/plugins/ktstandard/KTWebDAVDashletPlugin.php @@ -7,31 +7,31 @@ * Document Management Made Simple * Copyright (C) 2008 KnowledgeTree Inc. * Portions copyright The Jam Warehouse Software (Pty) Limited - * + * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 3 as published by the * Free Software Foundation. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, + * + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, * California 94120-7775, or email info@knowledgetree.com. - * + * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU General Public License version 3. - * + * * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the + * KnowledgeTree" logo and retain the original copyright notice. If the display of the * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original + * must display the words "Powered by KnowledgeTree" and retain the original * copyright notice. * Contributor( s): ______________________________________ * @@ -49,7 +49,7 @@ class KTWebDAVDashletPlugin extends KTPlugin { $res = parent::KTPlugin($sFilename); $this->sFriendlyName = _kt('WebDAV Dashlet Plugin'); return $res; - } + } function setup() { $this->registerDashlet('KTWebDAVDashlet', 'ktstandard.ktwebdavdashlet.dashlet', __FILE__); @@ -61,7 +61,7 @@ class KTWebDAVDashletPlugin extends KTPlugin { class KTWebDAVDashlet extends KTBaseDashlet { var $sClass = "ktInfo"; - + function KTWebDAVDashlet( ) { $this->sTitle = _kt('WebDAV Connection Information'); } @@ -79,8 +79,18 @@ class KTWebDAVDashlet extends KTBaseDashlet { $sURL = $sProtocol . '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $sRoot . "/"; + // Check if this is a commercial installation - before displaying the KT Tools webdav link + // Shortcut: Check if the the wintools plugin exists and set to true. + // Long way: Check that a license is installed - this is only text so having a license is not a requirement. + $isComm = false; + $keyUtil = KT_DIR . '/plugins/wintools/baobabkeyutil.inc.php'; + if(file_exists($keyUtil)){ + $isComm = true; + } + $aTemplateData = array( 'url' => $sURL, + 'hasLicense' => $isComm ); return $oTemplate->render($aTemplateData); } diff --git a/templates/ktstandard/ktwebdavdashlet/dashlet.smarty b/templates/ktstandard/ktwebdavdashlet/dashlet.smarty index 9edd883..026512b 100644 --- a/templates/ktstandard/ktwebdavdashlet/dashlet.smarty +++ b/templates/ktstandard/ktwebdavdashlet/dashlet.smarty @@ -1,6 +1,9 @@
-{i18n arg_appname="$appname"}To connect to #appname# via a third-party WebDAV client, please use the following address{/i18n}:
-{$url}ktwebdav/ktwebdav.php

-{i18n arg_appname="$appname"}To connect with the #appname# Tools Suite, use this address{/i18n}:
-{$url}

+ {i18n arg_appname="$appname"}To connect to #appname# via a third-party WebDAV client, please use the following address{/i18n}:
+ {$url}ktwebdav/ktwebdav.php

+ + {if $hasLicense} + {i18n arg_appname="$appname"}To connect with the #appname# Tools Suite, use this address{/i18n}:
+ {$url}

+ {/if}
\ No newline at end of file -- libgit2 0.21.4