From 0287dadca631df2f2f36d75b7d4159498b8a7ff7 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 7 Mar 2003 09:27:31 +0000 Subject: [PATCH] sync/pathSync.php --- bin/remote_update.sh | 1 + config/dmsDefaults.php | 6 ++---- config/environment.php | 6 +++--- sync/pathSync.php | 6 +++--- tests/authentication/authentication.php | 7 ++++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/remote_update.sh b/bin/remote_update.sh index 5874386..5c5cce2 100755 --- a/bin/remote_update.sh +++ b/bin/remote_update.sh @@ -28,6 +28,7 @@ deploy() { find $tmp -name CVS -exec rm -rf {} \; 2> /dev/null # tar it up + rm /tmp/owl.tgz 2> /dev/null tar -czvf /tmp/owl.tgz $tmp # clean up diff --git a/config/dmsDefaults.php b/config/dmsDefaults.php index a837f75..732e96f 100644 --- a/config/dmsDefaults.php +++ b/config/dmsDefaults.php @@ -116,9 +116,7 @@ $default->owl_help_table = "help"; // Change this to reflect the authentication method you are using -//require_once("$default->fileSystemRoot/lib/LDAPAuthenticator.inc"); -//require_once("$default->fileSystemRoot/lib/Authenticator.inc"); -$default->authenticationClass = "DBAuthenticator"; +$default->authenticationClass = "LDAPAuthenticator"; require_once("$default->fileSystemRoot/lib/authentication/$default->authenticationClass.inc"); @@ -331,7 +329,7 @@ require_once("$default->fileSystemRoot/phpSniff/phpSniff.class.php"); $default->phpSniff = new phpSniff($_SERVER["HTTP_USER_AGENT"]); require_once("$default->fileSystemRoot/lib/Log.inc"); -$default->log = new Log($default->fileSystemRoot . "/log.txt", INFO); +$default->log = new Log($default->fileSystemRoot . "/log.txt", DEBUG); // import request variables and setup language require_once("$default->fileSystemRoot/lib/dms.inc"); diff --git a/config/environment.php b/config/environment.php index 936ec7a..1abb18b 100644 --- a/config/environment.php +++ b/config/environment.php @@ -31,7 +31,7 @@ require_once("$default->fileSystemRoot/lib/database/lookup.inc"); require_once("$default->fileSystemRoot/lib/System.inc"); $default->system = new System(); -if ($default->system->initialised()) { +/*if ($default->system->initialised()) { $aSettings = array("ldapServer", "ldapRootDn", "emailServer", "emailFrom", "emailFromName", "emailAdmin", "emailAdminName", "serverName", "fileSystemRoot", "documentRoot", "languageDirectory", @@ -41,7 +41,7 @@ if ($default->system->initialised()) { for ($i=0; $i$aSettings[$i] = $default->system->get($aSettings[$i]); } -} else { +} else {*/ // TODO: redirect to system setup form // ldap settings @@ -56,7 +56,7 @@ if ($default->system->initialised()) { $default->emailAdmin = "dmsHelp@jamwarehouse.com"; $default->emailAdminName = "DMS Administrator"; - $default->serverName = "changeme.to.your.hostname"; + $default->serverName = "ktdev.jamwarehouse.com"; // directories $default->documentRoot = "/usr/local/www/owl/dms/Documents"; diff --git a/sync/pathSync.php b/sync/pathSync.php index fd34abd..e92453c 100644 --- a/sync/pathSync.php +++ b/sync/pathSync.php @@ -32,9 +32,9 @@ echo "
"; for ($i = 0; $i < count($aDocuments); $i++) { $oDocument = $aDocuments[$i]; echo "Updating document: " . $oDocument->getName() . "
"; - if ($oDocument->getCheckedOutUserID() == "") { - $oDocument->setCheckedOutUserID(-1); - } + if (!$oDocument->getCheckedOutUserID()) { + $oDocument->setCheckedOutUserID(-1); + } $oDocument->update(true); } diff --git a/tests/authentication/authentication.php b/tests/authentication/authentication.php index e6026c3..5656516 100644 --- a/tests/authentication/authentication.php +++ b/tests/authentication/authentication.php @@ -20,7 +20,7 @@ require_once("../../config/dmsDefaults.php"); * @author Michael Joseph , Jam Warehouse (Pty) Ltd, South Africa * @package tests.authentication */ -if (checkSession()) { +//if (checkSession()) { require_once("$default->fileSystemRoot/lib/authentication/DBAuthenticator.inc"); echo "Testing DB searching"; // user attributes to search for @@ -36,9 +36,10 @@ if (checkSession()) { // user attributes to search for $aAttributes = array ("dn", "uid", "givenname", "sn", "mail", "mobile"); $oLdapAuth = new LDAPAuthenticator(); - $sSearch = "michael"; + $sSearch = "mi"; echo "
  • searching for $sSearch with attributes=
    " . arrayToSTring($aAttributes) . "
  • "; $aResults = $oLdapAuth->searchUsers($sSearch, $aAttributes); + echo "
  • first result=" . arrayToString($aResults[0]) . "
  • "; echo "
  • " . arrayToString($aResults) . "
"; echo "Testing LDAP authentication"; @@ -51,5 +52,5 @@ if (checkSession()) { $sUserName = "mukhtar"; $sPassword = "mukhtar123"; echo "
  • Authenticating ($sUserName, $sPassword) : " . ($oLdapAuth->checkPassword($sUserName, $sPassword) ? "true" : "false") . "
"; -} +//} ?> -- libgit2 0.21.4