diff --git a/.htaccess b/.htaccess
index c5fbb1d..f7c094c 100644
--- a/.htaccess
+++ b/.htaccess
@@ -95,6 +95,11 @@ php_value max_execution_time 0
php_value error_reporting 5
+# Workaround for mod_auth when running php cgi
+
+RewriteEngine on
+RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
+
#
#RewriteEngine On
diff --git a/dmsctl.sh b/dmsctl.sh
index ada34fb..d09758d 100755
--- a/dmsctl.sh
+++ b/dmsctl.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Boot KnowledgeTree services
# chkconfig: 2345 55 25
@@ -6,6 +6,8 @@
#
# processname: ktdms
+cd $(dirname $0)
+
HOSTNAME=`hostname`
RETVAL=0
PID=""
@@ -16,6 +18,14 @@ INSTALL_PATH=`pwd`
JAVABIN=/usr/bin/java
ZEND_DIR=/usr/local/zend
+if [ -f /etc/zce.rc ];then
+ . /etc/zce.rc
+else
+ echo "/etc/zce.rc doesn't exist!"
+ exit 1;
+fi
+
+
# OpenOffice
SOFFICEFILE=soffice
SOFFICE_PIDFILE=$INSTALL_PATH/var/log/soffice.bin.pid
@@ -279,6 +289,24 @@ noserver() {
help
}
+firstrun() {
+ echo "Initializing DMS for the first time, exporting ZEND paths"
+ if grep --quiet LD_LIBRARAY_PATH /etc/zce.rc ; then
+ echo "Nothing to be done ..."
+ else
+ echo "PATH=/usr/local/zend/bin:$PATH" >> /etc/zce.rc
+ if [ -z $LD_LIBRARY_PATH ] ; then
+ echo "LD_LIBRARY_PATH=$ZEND_DIR/lib" >> /etc/zce.rc
+ else
+ echo "LD_LIBRARY_PATH=$ZEND_DIR/lib:$LD_LIBRARY_PATH" >> /etc/zce.rc
+ fi
+ fi
+
+ touch $INSTALL_PATH/var/bin/.dmsinit.lock
+
+ $ZEND_DIR/bin/zendctl.sh restart
+}
+
[ $# -lt 1 ] && help
if [ ! -z ${2} ]; then
@@ -291,6 +319,8 @@ if [ "x$3" != "x" ]; then
MYSQL_PASSWORD=$3
fi
+# Are we running for first time
+[[ -e $INSTALL_PATH/var/bin/.dmsinit.lock ]] || firstrun
case $1 in
help) help
@@ -302,6 +332,7 @@ case $1 in
start_soffice
start_lucene
start_scheduler
+ #[[ -e $ZEND_DIR/bin/zendctl.sh ]] && $ZEND_DIR/bin/zendctl.sh restart
fi
;;
stop) if [ "${SERVER}" != "all" ]; then
@@ -327,4 +358,4 @@ case $1 in
;;
esac
-exit $ERROR
\ No newline at end of file
+exit $ERROR
diff --git a/ktwebdav/lib/KTWebDAVServer.inc.php b/ktwebdav/lib/KTWebDAVServer.inc.php
index 631849b..a11450b 100644
--- a/ktwebdav/lib/KTWebDAVServer.inc.php
+++ b/ktwebdav/lib/KTWebDAVServer.inc.php
@@ -372,6 +372,11 @@ class KTWebDAVServer extends HTTP_WebDAV_Server
{
$this->ktwebdavLog('Entering _check_auth...', 'info', true);
+ // Workaround for mod_auth when running php cgi
+ if(!isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['HTTP_AUTHORIZATION'])){
+ list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
+ }
+
if (method_exists($this, 'checkAuth')) {
// PEAR style method name
return $this->checkAuth(@$_SERVER['AUTH_TYPE'],
diff --git a/rss.php b/rss.php
index 42465d9..bd46dde 100644
--- a/rss.php
+++ b/rss.php
@@ -5,7 +5,7 @@
* KnowledgeTree Community Edition
* Document Management Made Simple
* Copyright (C) 2008, 2009 KnowledgeTree Inc.
- *
+ *
*
* 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
@@ -40,6 +40,9 @@ 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');
+// Workaround for mod_auth when running php cgi
+list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
+
// workaround to get http authentication working in cgi mode
$altinfo = KTUtil::arrayGet( $_SERVER, 'kt_auth', KTUtil::arrayGet( $_SERVER, 'REDIRECT_kt_auth'));
if ( !empty( $altinfo) && !isset( $_SERVER['PHP_AUTH_USER'])) {
diff --git a/templates/ktcore/ktoffice_i18n.smarty b/templates/ktcore/ktoffice_i18n.smarty
index b4c91c8..9fc0755 100644
--- a/templates/ktcore/ktoffice_i18n.smarty
+++ b/templates/ktcore/ktoffice_i18n.smarty
@@ -1,4 +1,3 @@
-
/*
* Javascript (actual translations);
*/
@@ -18,15 +17,19 @@ function _(trans_string) {
//strings for file: main.js
-i18n['Upload'] = '{i18n}Upload{/i18n}';
+i18n['Upload succeeded'] = '{i18n}Upload succeeded{/i18n}';
-i18n['Upload cancelled'] = '{i18n}Upload cancelled{/i18n}';
+i18n['Document type changed'] = '{i18n}Document type changed{/i18n}';
i18n['Upload failed'] = '{i18n}Upload failed{/i18n}';
i18n['Your document has not been saved.'] = '{i18n}Your document has not been saved.{/i18n}';
-i18n['Upload succeeded'] = '{i18n}Upload succeeded{/i18n}';
+i18n['A newer version of this document is available. Would you like to open it instead?'] = '{i18n}A newer version of this document is available. Would you like to open it instead?{/i18n}';
+
+i18n['Upload'] = '{i18n}Upload{/i18n}';
+
+i18n['Upload cancelled'] = '{i18n}Upload cancelled{/i18n}';
i18n['Your document has been saved.'] = '{i18n}Your document has been saved.{/i18n}';
@@ -68,7 +71,7 @@ i18n['The check-out has been cancelled.'] = '{i18n}The check-out has been cancel
i18n['Properties could not be saved.'] = '{i18n}Properties could not be saved.{/i18n}';
-i18n['Properties has been saved.'] = '{i18n}Properties has been saved.{/i18n}';
+i18n['Properties have been saved.'] = '{i18n}Properties have been saved.{/i18n}';
i18n['Login failed'] = '{i18n}Login failed{/i18n}';
@@ -84,19 +87,19 @@ i18n['Please verify your
Internet connection,
and try again.'] = '{i
//strings for file: classes/commentsWindow.js
-i18n['Cancelling edit of document (check-in] = '{i18n}Cancelling edit of document (check-i{/i18n}n;
+i18n['Cancelling edit of document (check-in)'] = '{i18n}Cancelling edit of document (check-in){/i18n}';
i18n['Provide a reason for cancelling this edit.
'] = '{i18n}Provide a reason for cancelling this edit.
{/i18n}';
-i18n['Continue Editing (check-out] = '{i18n}Continue Editing (check-ou{/i18n}t;
+i18n['Continue Editing (check-out)'] = '{i18n}Continue Editing (check-out){/i18n}';
i18n['Provide a reason for this edit.
'] = '{i18n}Provide a reason for this edit.
{/i18n}';
-i18n['Editing Document (check-out] = '{i18n}Editing Document (check-ou{/i18n}t;
+i18n['Editing Document (check-out)'] = '{i18n}Editing Document (check-out){/i18n}';
i18n['Provide a reason for editing this document.
'] = '{i18n}Provide a reason for editing this document.
{/i18n}';
-i18n['Saving Document (check-in] = '{i18n}Saving Document (check-i{/i18n}n;
+i18n['Saving Document (check-in)'] = '{i18n}Saving Document (check-in){/i18n}';
i18n['For historical purposes, describe the changes you made to this document.
'] = '{i18n}For historical purposes, describe the changes you made to this document.
{/i18n}';
@@ -168,12 +171,28 @@ i18n['Login'] = '{i18n}Login{/i18n}';
i18n['Document already open'] = '{i18n}Document already open{/i18n}';
+i18n['Unable to delete folder'] = '{i18n}Unable to delete folder{/i18n}';
+
+i18n['Delete Folder'] = '{i18n}Delete Folder{/i18n}';
+
+i18n['This will delete this folder.
Are you sure you want to continue?'] = '{i18n}This will delete this folder.
Are you sure you want to continue?{/i18n}';
+
+i18n['Unable to Delete Folder'] = '{i18n}Unable to Delete Folder{/i18n}';
+
+i18n['This folder contains other documents/folders
and may not be deleted.'] = '{i18n}This folder contains other documents/folders
and may not be deleted.{/i18n}';
+
i18n['Introduction'] = '{i18n}Introduction{/i18n}';
i18n['The requested action has not been implemented'] = '{i18n}The requested action has not been implemented{/i18n}';
i18n['Any unsaved changes will be lost! Are you sure you want to continue?'] = '{i18n}Any unsaved changes will be lost! Are you sure you want to continue?{/i18n}';
+i18n['Error'] = '{i18n}Error{/i18n}';
+
+i18n['Please close all open editors.'] = '{i18n}Please close all open editors.{/i18n}';
+
+i18n['Warning'] = '{i18n}Warning{/i18n}';
+
i18n['Do you want to add the currently open Office document as a new version of [-doctitle-]?'] = '{i18n}Do you want to add the currently open Office document as a new version of [-doctitle-]?{/i18n}';
i18n['Are you sure you want to cancel your edit?'] = '{i18n}Are you sure you want to cancel your edit?{/i18n}';
@@ -190,6 +209,16 @@ i18n['Save'] = '{i18n}Save{/i18n}';
i18n['Adds your open Office document to KnowledgeTree. You must have \'write\' permissions on the folder.'] = '{i18n}Adds your open Office document to KnowledgeTree. You must have \'write\' permissions on the folder.{/i18n}';
+i18n['Add Folder'] = '{i18n}Add Folder{/i18n}';
+
+i18n['Provides an interface to create a new folder under the current folder. You must have \'add\' permissions on the folder.'] = '{i18n}Provides an interface to create a new folder under the current folder. You must have \'add\' permissions on the folder.{/i18n}';
+
+i18n['Rename Folder'] = '{i18n}Rename Folder{/i18n}';
+
+i18n['Provides an interface to rename the current folder. You must have \'rename\' permissions on the folder.'] = '{i18n}Provides an interface to rename the current folder. You must have \'rename\' permissions on the folder.{/i18n}';
+
+i18n['Provides an interface to delete the current folder. You must have \'delete\' permissions on the folder.'] = '{i18n}Provides an interface to delete the current folder. You must have \'delete\' permissions on the folder.{/i18n}';
+
i18n['New folder'] = '{i18n}New folder{/i18n}';
i18n['Saves active document to a new folder. You must have \'write\' permissions on the folder.'] = '{i18n}Saves active document to a new folder. You must have \'write\' permissions on the folder.{/i18n}';
@@ -276,10 +305,6 @@ i18n['All error reports are submitted anonymously.\r\n\r\nTo help us resolve thi
i18n['Viewing'] = '{i18n}Viewing{/i18n}';
-i18n["Click 'Save Properties' to save your changes."] = "{i18n}Click 'Save Properties' to save your changes.{/i18n}";
-
-i18n['Document type changed'] = '{i18n}Document type changed{/i18n}';
-
i18n['Document type could not be changed'] = '{i18n}Document type could not be changed{/i18n}';
i18n['Document type could not be reset'] = '{i18n}Document type could not be reset{/i18n}';
@@ -290,8 +315,6 @@ i18n['Double-click to Select'] = '{i18n}Double-click to Select{/i18n}';
i18n['Double-click to Edit'] = '{i18n}Double-click to Edit{/i18n}';
-i18n['Error'] = '{i18n}Error{/i18n}';
-
i18n['Please complete all required fields.'] = '{i18n}Please complete all required fields.{/i18n}';
i18n['Editing'] = '{i18n}Editing{/i18n}';
@@ -340,10 +363,10 @@ i18n['Logout'] = '{i18n}Logout{/i18n}';
i18n['No Read permissions'] = '{i18n}No Read permissions{/i18n}';
-i18n['You do not have the required permissions to view the root folder. Please contact your system administrator for assistance.', '', 60000] = '{i18n}You do not have the required permissions to view the root folder. Please contact your system administrator for assistance.', '', 6000{/i18n}0;
+i18n['You do not have the required permissions to view the root folder. Please contact your system administrator for assistance.'] = '{i18n}You do not have the required permissions to view the root folder. Please contact your system administrator for assistance.{/i18n}';
i18n['Search for documents'] = '{i18n}Search for documents{/i18n}';
-// Total Language Strings: 143
+// Total Language Strings: 155
-// Unique Strings: 143
\ No newline at end of file
+// Unique Strings: 155
\ No newline at end of file
diff --git a/webservice/classes/atompub/KT_atom_HTTPauth.inc.php b/webservice/classes/atompub/KT_atom_HTTPauth.inc.php
index a97e3fb..b99b793 100644
--- a/webservice/classes/atompub/KT_atom_HTTPauth.inc.php
+++ b/webservice/classes/atompub/KT_atom_HTTPauth.inc.php
@@ -1,6 +1,12 @@
'','pass'=>'','method'=>'');
if(isset($_SERVER['PHP_AUTH_USER'])){
$credentials['user']=$_SERVER['PHP_AUTH_USER'];