Commit 0287dadca631df2f2f36d75b7d4159498b8a7ff7
1 parent
6e4bfc21
sync/pathSync.php
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1443 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
5 changed files
with
13 additions
and
13 deletions
bin/remote_update.sh
config/dmsDefaults.php
| ... | ... | @@ -116,9 +116,7 @@ $default->owl_help_table = "help"; |
| 116 | 116 | |
| 117 | 117 | |
| 118 | 118 | // Change this to reflect the authentication method you are using |
| 119 | -//require_once("$default->fileSystemRoot/lib/LDAPAuthenticator.inc"); | |
| 120 | -//require_once("$default->fileSystemRoot/lib/Authenticator.inc"); | |
| 121 | -$default->authenticationClass = "DBAuthenticator"; | |
| 119 | +$default->authenticationClass = "LDAPAuthenticator"; | |
| 122 | 120 | |
| 123 | 121 | require_once("$default->fileSystemRoot/lib/authentication/$default->authenticationClass.inc"); |
| 124 | 122 | |
| ... | ... | @@ -331,7 +329,7 @@ require_once("$default->fileSystemRoot/phpSniff/phpSniff.class.php"); |
| 331 | 329 | $default->phpSniff = new phpSniff($_SERVER["HTTP_USER_AGENT"]); |
| 332 | 330 | |
| 333 | 331 | require_once("$default->fileSystemRoot/lib/Log.inc"); |
| 334 | -$default->log = new Log($default->fileSystemRoot . "/log.txt", INFO); | |
| 332 | +$default->log = new Log($default->fileSystemRoot . "/log.txt", DEBUG); | |
| 335 | 333 | |
| 336 | 334 | // import request variables and setup language |
| 337 | 335 | require_once("$default->fileSystemRoot/lib/dms.inc"); | ... | ... |
config/environment.php
| ... | ... | @@ -31,7 +31,7 @@ require_once("$default->fileSystemRoot/lib/database/lookup.inc"); |
| 31 | 31 | require_once("$default->fileSystemRoot/lib/System.inc"); |
| 32 | 32 | $default->system = new System(); |
| 33 | 33 | |
| 34 | -if ($default->system->initialised()) { | |
| 34 | +/*if ($default->system->initialised()) { | |
| 35 | 35 | $aSettings = array("ldapServer", "ldapRootDn", "emailServer", "emailFrom", "emailFromName", |
| 36 | 36 | "emailAdmin", "emailAdminName", |
| 37 | 37 | "serverName", "fileSystemRoot", "documentRoot", "languageDirectory", |
| ... | ... | @@ -41,7 +41,7 @@ if ($default->system->initialised()) { |
| 41 | 41 | for ($i=0; $i<count($aSettings); $i++) { |
| 42 | 42 | $default->$aSettings[$i] = $default->system->get($aSettings[$i]); |
| 43 | 43 | } |
| 44 | -} else { | |
| 44 | +} else {*/ | |
| 45 | 45 | // TODO: redirect to system setup form |
| 46 | 46 | |
| 47 | 47 | // ldap settings |
| ... | ... | @@ -56,7 +56,7 @@ if ($default->system->initialised()) { |
| 56 | 56 | $default->emailAdmin = "dmsHelp@jamwarehouse.com"; |
| 57 | 57 | $default->emailAdminName = "DMS Administrator"; |
| 58 | 58 | |
| 59 | - $default->serverName = "changeme.to.your.hostname"; | |
| 59 | + $default->serverName = "ktdev.jamwarehouse.com"; | |
| 60 | 60 | |
| 61 | 61 | // directories |
| 62 | 62 | $default->documentRoot = "/usr/local/www/owl/dms/Documents"; | ... | ... |
sync/pathSync.php
| ... | ... | @@ -32,9 +32,9 @@ echo "<br>"; |
| 32 | 32 | for ($i = 0; $i < count($aDocuments); $i++) { |
| 33 | 33 | $oDocument = $aDocuments[$i]; |
| 34 | 34 | echo "Updating document: " . $oDocument->getName() . "<br>"; |
| 35 | - if ($oDocument->getCheckedOutUserID() == "") { | |
| 36 | - $oDocument->setCheckedOutUserID(-1); | |
| 37 | - } | |
| 35 | + if (!$oDocument->getCheckedOutUserID()) { | |
| 36 | + $oDocument->setCheckedOutUserID(-1); | |
| 37 | + } | |
| 38 | 38 | $oDocument->update(true); |
| 39 | 39 | } |
| 40 | 40 | ... | ... |
tests/authentication/authentication.php
| ... | ... | @@ -20,7 +20,7 @@ require_once("../../config/dmsDefaults.php"); |
| 20 | 20 | * @author Michael Joseph <michael@jamwarehouse.com>, Jam Warehouse (Pty) Ltd, South Africa |
| 21 | 21 | * @package tests.authentication |
| 22 | 22 | */ |
| 23 | -if (checkSession()) { | |
| 23 | +//if (checkSession()) { | |
| 24 | 24 | require_once("$default->fileSystemRoot/lib/authentication/DBAuthenticator.inc"); |
| 25 | 25 | echo "<b>Testing DB searching</b>"; |
| 26 | 26 | // user attributes to search for |
| ... | ... | @@ -36,9 +36,10 @@ if (checkSession()) { |
| 36 | 36 | // user attributes to search for |
| 37 | 37 | $aAttributes = array ("dn", "uid", "givenname", "sn", "mail", "mobile"); |
| 38 | 38 | $oLdapAuth = new LDAPAuthenticator(); |
| 39 | - $sSearch = "michael"; | |
| 39 | + $sSearch = "mi"; | |
| 40 | 40 | echo "<ul><li>searching for $sSearch with attributes=<pre>" . arrayToSTring($aAttributes) . "</pre></li>"; |
| 41 | 41 | $aResults = $oLdapAuth->searchUsers($sSearch, $aAttributes); |
| 42 | + echo "<li><pre>first result=" . arrayToString($aResults[0]) . "</pre></li>"; | |
| 42 | 43 | echo "<li><pre>" . arrayToString($aResults) . "</pre></li></ul>"; |
| 43 | 44 | |
| 44 | 45 | echo "<b>Testing LDAP authentication</b>"; |
| ... | ... | @@ -51,5 +52,5 @@ if (checkSession()) { |
| 51 | 52 | |
| 52 | 53 | $sUserName = "mukhtar"; $sPassword = "mukhtar123"; |
| 53 | 54 | echo "<ul><li>Authenticating ($sUserName, $sPassword) : " . ($oLdapAuth->checkPassword($sUserName, $sPassword) ? "true" : "false") . "</li></ul>"; |
| 54 | -} | |
| 55 | +//} | |
| 55 | 56 | ?> | ... | ... |