diff --git a/plugins/ktcore/KTColumns.inc.php b/plugins/ktcore/KTColumns.inc.php index d1e2d3c..87c258c 100644 --- a/plugins/ktcore/KTColumns.inc.php +++ b/plugins/ktcore/KTColumns.inc.php @@ -6,31 +6,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): ______________________________________ */ @@ -117,7 +117,7 @@ class AdvancedTitleColumn extends AdvancedColumn { }else{ $iDocId = $aDataRow["document"]->getId(); } - + $url = KTBrowseUtil::getUrlForDocument($iDocId); if($aDataRow['document']->isSymbolicLink()){ $aDataRow['document']->switchToRealCore(); @@ -171,10 +171,10 @@ class AdvancedTitleColumn extends AdvancedColumn { } else { $contenttype = $this->_mimeHelper($aDataRow["document"]->getMimeTypeId()); $link = $this->renderDocumentLink($aDataRow); - + //Render an image instead of the size in case of a shortcut - if($aDataRow['document']->isSymbolicLink()){ - return sprintf('%s ', $contenttype, $link); + if($aDataRow['document']->isSymbolicLink()){ + return sprintf('%s', $contenttype, $link); }else{ $size = $this->prettySize($aDataRow["document"]->getSize()); return sprintf('%s (%s)', $contenttype, $link, $size); @@ -416,7 +416,7 @@ class AdvancedSingleSelectionColumn extends AdvancedSelectionColumn { return ' '; } - $return = 'show_folders && $this->show_documents){ $return .= 'onClick="forceSingleSelect(this)" '; } diff --git a/resources/css/kt-contenttypes.css b/resources/css/kt-contenttypes.css index b08e3d6..fb51789 100644 --- a/resources/css/kt-contenttypes.css +++ b/resources/css/kt-contenttypes.css @@ -1,7 +1,7 @@ -/* +/* Getting Mime-type CSS right is a bit tricky here. the idea is that you apply these to a span, as follows: - + My Filename */ .contenttype { @@ -17,15 +17,25 @@ } .contenttype.office { background-image: url(../../resources/mimetypes/office.png); } +.contenttype.office.shortcut { background-image: url(../../resources/mimetypes/shortcuts/office.png); } .contenttype.word { background-image: url(../../resources/mimetypes/word.png); } +.contenttype.word.shortcut { background-image: url(../../resources/mimetypes/shortcuts/word.png); } .contenttype.database { background-image: url(../../resources/mimetypes/database.png); } +.contenttype.database.shortcut { background-image: url(../../resources/mimetypes/shortcuts/database.png); } .contenttype.excel { background-image: url(../../resources/mimetypes/excel.png); } +.contenttype.excel.shortcut { background-image: url(../../resources/mimetypes/shortcuts/excel.png); } .contenttype.openoffice { background-image: url(../../resources/mimetypes/openoffice.png); } +.contenttype.openoffice.shortcut { background-image: url(../../resources/mimetypes/shortcuts/openoffice.png); } .contenttype.opendocument { background-image: url(../../resources/mimetypes/openoffice.png); } +.contenttype.opendocument.shortcut { background-image: url(../../resources/mimetypes/shortcuts/openoffice.png); } .contenttype.pdf { background-image: url(../../resources/mimetypes/pdf.png); } +.contenttype.pdf.shortcut { background-image: url(../../resources/mimetypes/shortcuts/pdf.png); } .contenttype.image { background-image: url(../../resources/mimetypes/image.png); } +.contenttype.image.shortcut { background-image: url(../../resources/mimetypes/shortcuts/image.png); } .contenttype.compressed { background-image: url(../../resources/mimetypes/zip.png); } +.contenttype.compressed.shortcut { background-image: url(../../resources/mimetypes/shortcuts/zip.png); } .contenttype.html { background-image: url(../../resources/mimetypes/html.png); } +.contenttype.html.shortcut { background-image: url(../../resources/mimetypes/shortcuts/html.png); } .contenttype.txt, .contenttype.text, diff --git a/resources/css/kt-framing.css b/resources/css/kt-framing.css index a35598a..8a85a3c 100644 --- a/resources/css/kt-framing.css +++ b/resources/css/kt-framing.css @@ -2019,6 +2019,21 @@ hr { display: block; } +.collapse +{ + padding-left: 20px; + border: 0px; + background: url(../graphics/plus.gif) no-repeat; +} + + +.expand +{ + padding-left: 20px; + border: 0px; + background: url(../graphics/minus.gif) no-repeat; +} + /* -------------------------- iframe browse ------------------------ */ diff --git a/resources/mimetypes/shortcuts/access.png b/resources/mimetypes/shortcuts/access.png new file mode 100755 index 0000000..3454205 --- /dev/null +++ b/resources/mimetypes/shortcuts/access.png diff --git a/resources/mimetypes/shortcuts/code.png b/resources/mimetypes/shortcuts/code.png new file mode 100755 index 0000000..807e92f --- /dev/null +++ b/resources/mimetypes/shortcuts/code.png diff --git a/resources/mimetypes/shortcuts/database.png b/resources/mimetypes/shortcuts/database.png new file mode 100755 index 0000000..34adc9b --- /dev/null +++ b/resources/mimetypes/shortcuts/database.png diff --git a/resources/mimetypes/shortcuts/excel.png b/resources/mimetypes/shortcuts/excel.png new file mode 100755 index 0000000..c0c5cb3 --- /dev/null +++ b/resources/mimetypes/shortcuts/excel.png diff --git a/resources/mimetypes/shortcuts/flash.png b/resources/mimetypes/shortcuts/flash.png new file mode 100755 index 0000000..6e5d7c8 --- /dev/null +++ b/resources/mimetypes/shortcuts/flash.png diff --git a/resources/mimetypes/shortcuts/html.png b/resources/mimetypes/shortcuts/html.png new file mode 100755 index 0000000..684508f --- /dev/null +++ b/resources/mimetypes/shortcuts/html.png diff --git a/resources/mimetypes/shortcuts/image.png b/resources/mimetypes/shortcuts/image.png new file mode 100755 index 0000000..b7ee30c --- /dev/null +++ b/resources/mimetypes/shortcuts/image.png diff --git a/resources/mimetypes/shortcuts/office.png b/resources/mimetypes/shortcuts/office.png new file mode 100755 index 0000000..5c6e79a --- /dev/null +++ b/resources/mimetypes/shortcuts/office.png diff --git a/resources/mimetypes/shortcuts/openoffice.png b/resources/mimetypes/shortcuts/openoffice.png new file mode 100755 index 0000000..c711ace --- /dev/null +++ b/resources/mimetypes/shortcuts/openoffice.png diff --git a/resources/mimetypes/shortcuts/pdf.png b/resources/mimetypes/shortcuts/pdf.png new file mode 100755 index 0000000..8ddadb2 --- /dev/null +++ b/resources/mimetypes/shortcuts/pdf.png diff --git a/resources/mimetypes/shortcuts/php.png b/resources/mimetypes/shortcuts/php.png new file mode 100755 index 0000000..bfe3cf1 --- /dev/null +++ b/resources/mimetypes/shortcuts/php.png diff --git a/resources/mimetypes/shortcuts/run.png b/resources/mimetypes/shortcuts/run.png new file mode 100755 index 0000000..eac1730 --- /dev/null +++ b/resources/mimetypes/shortcuts/run.png diff --git a/resources/mimetypes/shortcuts/vector-image.png b/resources/mimetypes/shortcuts/vector-image.png new file mode 100755 index 0000000..f7f5987 --- /dev/null +++ b/resources/mimetypes/shortcuts/vector-image.png diff --git a/resources/mimetypes/shortcuts/word.png b/resources/mimetypes/shortcuts/word.png new file mode 100755 index 0000000..0e89c8c --- /dev/null +++ b/resources/mimetypes/shortcuts/word.png diff --git a/resources/mimetypes/shortcuts/zip.png b/resources/mimetypes/shortcuts/zip.png new file mode 100755 index 0000000..1b17c28 --- /dev/null +++ b/resources/mimetypes/shortcuts/zip.png diff --git a/rss.php b/rss.php index 693f72e..a9a5ca8 100644 --- a/rss.php +++ b/rss.php @@ -6,48 +6,39 @@ * 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): ______________________________________ */ require_once('config/dmsDefaults.php'); require_once(KT_LIB_DIR .'/authentication/DBAuthenticator.inc'); +require_once(KT_LIB_DIR .'/authentication/authenticationutil.inc.php'); require_once(KT_DIR. '/plugins/rssplugin/KTrss.inc.php'); -require_once(KT_LIB_DIR . '/browse/browseutil.inc.php'); - -// widget includes. -require_once(KT_LIB_DIR . "/widgets/portlet.inc.php"); -require_once(KT_LIB_DIR . "/widgets/fieldsetDisplay.inc.php"); -require_once(KT_LIB_DIR . "/widgets/FieldsetDisplayRegistry.inc.php"); -require_once(KT_LIB_DIR . "/actions/documentaction.inc.php"); -require_once(KT_LIB_DIR . "/browse/browseutil.inc.php"); - -require_once(KT_LIB_DIR . '/mime.inc.php'); // workaround to get http authentication working in cgi mode $altinfo = KTUtil::arrayGet( $_SERVER, 'kt_auth', KTUtil::arrayGet( $_SERVER, 'REDIRECT_kt_auth')); @@ -146,6 +137,12 @@ if (!validateUser($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) { // Validate user credentials function validateUser($username, $password){ - return DBAuthenticator::checkPassword($username, $password); + //return DBAuthenticator::checkPassword($username, $password); + $oUser =& User::getByUsername($username); + if(PEAR::isError($oUser) || is_a($oUser, 'KTEntityNoObjects')){ + return false; + } + + return KTAuthenticationUtil::checkPassword($oUser, $password); } ?> \ No newline at end of file diff --git a/templates/ktcore/configsettings.smarty b/templates/ktcore/configsettings.smarty index 6ef0600..e264c38 100644 --- a/templates/ktcore/configsettings.smarty +++ b/templates/ktcore/configsettings.smarty @@ -3,14 +3,16 @@ function toggleSettingsDisplay(id) { var el = document.getElementById(id); - var visible = el.style.visibility; + var head = document.getElementById(id+'_head'); - if(visible == 'visible'){ + if(el.style.visibility == 'visible'){ el.style.visibility = 'hidden'; el.style.display = 'none'; + head.className = 'collapse'; }else{ el.style.visibility = 'visible'; el.style.display = 'block'; + head.className = 'expand'; } } {/literal} @@ -26,10 +28,12 @@ {foreach from=$groupList item=groupItem} {assign var=group value=$groupItem.name} -

{$group}

+

+ {$group} +

{$groupItem.description} -
+
{* *} @@ -47,13 +51,12 @@
-
{/foreach} {/if} - +

\ No newline at end of file