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
| @@ -28,6 +28,7 @@ deploy() { | @@ -28,6 +28,7 @@ deploy() { | ||
| 28 | find $tmp -name CVS -exec rm -rf {} \; 2> /dev/null | 28 | find $tmp -name CVS -exec rm -rf {} \; 2> /dev/null |
| 29 | 29 | ||
| 30 | # tar it up | 30 | # tar it up |
| 31 | + rm /tmp/owl.tgz 2> /dev/null | ||
| 31 | tar -czvf /tmp/owl.tgz $tmp | 32 | tar -czvf /tmp/owl.tgz $tmp |
| 32 | 33 | ||
| 33 | # clean up | 34 | # clean up |
config/dmsDefaults.php
| @@ -116,9 +116,7 @@ $default->owl_help_table = "help"; | @@ -116,9 +116,7 @@ $default->owl_help_table = "help"; | ||
| 116 | 116 | ||
| 117 | 117 | ||
| 118 | // Change this to reflect the authentication method you are using | 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 | require_once("$default->fileSystemRoot/lib/authentication/$default->authenticationClass.inc"); | 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,7 +329,7 @@ require_once("$default->fileSystemRoot/phpSniff/phpSniff.class.php"); | ||
| 331 | $default->phpSniff = new phpSniff($_SERVER["HTTP_USER_AGENT"]); | 329 | $default->phpSniff = new phpSniff($_SERVER["HTTP_USER_AGENT"]); |
| 332 | 330 | ||
| 333 | require_once("$default->fileSystemRoot/lib/Log.inc"); | 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 | // import request variables and setup language | 334 | // import request variables and setup language |
| 337 | require_once("$default->fileSystemRoot/lib/dms.inc"); | 335 | require_once("$default->fileSystemRoot/lib/dms.inc"); |
config/environment.php
| @@ -31,7 +31,7 @@ require_once("$default->fileSystemRoot/lib/database/lookup.inc"); | @@ -31,7 +31,7 @@ require_once("$default->fileSystemRoot/lib/database/lookup.inc"); | ||
| 31 | require_once("$default->fileSystemRoot/lib/System.inc"); | 31 | require_once("$default->fileSystemRoot/lib/System.inc"); |
| 32 | $default->system = new System(); | 32 | $default->system = new System(); |
| 33 | 33 | ||
| 34 | -if ($default->system->initialised()) { | 34 | +/*if ($default->system->initialised()) { |
| 35 | $aSettings = array("ldapServer", "ldapRootDn", "emailServer", "emailFrom", "emailFromName", | 35 | $aSettings = array("ldapServer", "ldapRootDn", "emailServer", "emailFrom", "emailFromName", |
| 36 | "emailAdmin", "emailAdminName", | 36 | "emailAdmin", "emailAdminName", |
| 37 | "serverName", "fileSystemRoot", "documentRoot", "languageDirectory", | 37 | "serverName", "fileSystemRoot", "documentRoot", "languageDirectory", |
| @@ -41,7 +41,7 @@ if ($default->system->initialised()) { | @@ -41,7 +41,7 @@ if ($default->system->initialised()) { | ||
| 41 | for ($i=0; $i<count($aSettings); $i++) { | 41 | for ($i=0; $i<count($aSettings); $i++) { |
| 42 | $default->$aSettings[$i] = $default->system->get($aSettings[$i]); | 42 | $default->$aSettings[$i] = $default->system->get($aSettings[$i]); |
| 43 | } | 43 | } |
| 44 | -} else { | 44 | +} else {*/ |
| 45 | // TODO: redirect to system setup form | 45 | // TODO: redirect to system setup form |
| 46 | 46 | ||
| 47 | // ldap settings | 47 | // ldap settings |
| @@ -56,7 +56,7 @@ if ($default->system->initialised()) { | @@ -56,7 +56,7 @@ if ($default->system->initialised()) { | ||
| 56 | $default->emailAdmin = "dmsHelp@jamwarehouse.com"; | 56 | $default->emailAdmin = "dmsHelp@jamwarehouse.com"; |
| 57 | $default->emailAdminName = "DMS Administrator"; | 57 | $default->emailAdminName = "DMS Administrator"; |
| 58 | 58 | ||
| 59 | - $default->serverName = "changeme.to.your.hostname"; | 59 | + $default->serverName = "ktdev.jamwarehouse.com"; |
| 60 | 60 | ||
| 61 | // directories | 61 | // directories |
| 62 | $default->documentRoot = "/usr/local/www/owl/dms/Documents"; | 62 | $default->documentRoot = "/usr/local/www/owl/dms/Documents"; |
sync/pathSync.php
| @@ -32,9 +32,9 @@ echo "<br>"; | @@ -32,9 +32,9 @@ echo "<br>"; | ||
| 32 | for ($i = 0; $i < count($aDocuments); $i++) { | 32 | for ($i = 0; $i < count($aDocuments); $i++) { |
| 33 | $oDocument = $aDocuments[$i]; | 33 | $oDocument = $aDocuments[$i]; |
| 34 | echo "Updating document: " . $oDocument->getName() . "<br>"; | 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 | $oDocument->update(true); | 38 | $oDocument->update(true); |
| 39 | } | 39 | } |
| 40 | 40 |
tests/authentication/authentication.php
| @@ -20,7 +20,7 @@ require_once("../../config/dmsDefaults.php"); | @@ -20,7 +20,7 @@ require_once("../../config/dmsDefaults.php"); | ||
| 20 | * @author Michael Joseph <michael@jamwarehouse.com>, Jam Warehouse (Pty) Ltd, South Africa | 20 | * @author Michael Joseph <michael@jamwarehouse.com>, Jam Warehouse (Pty) Ltd, South Africa |
| 21 | * @package tests.authentication | 21 | * @package tests.authentication |
| 22 | */ | 22 | */ |
| 23 | -if (checkSession()) { | 23 | +//if (checkSession()) { |
| 24 | require_once("$default->fileSystemRoot/lib/authentication/DBAuthenticator.inc"); | 24 | require_once("$default->fileSystemRoot/lib/authentication/DBAuthenticator.inc"); |
| 25 | echo "<b>Testing DB searching</b>"; | 25 | echo "<b>Testing DB searching</b>"; |
| 26 | // user attributes to search for | 26 | // user attributes to search for |
| @@ -36,9 +36,10 @@ if (checkSession()) { | @@ -36,9 +36,10 @@ if (checkSession()) { | ||
| 36 | // user attributes to search for | 36 | // user attributes to search for |
| 37 | $aAttributes = array ("dn", "uid", "givenname", "sn", "mail", "mobile"); | 37 | $aAttributes = array ("dn", "uid", "givenname", "sn", "mail", "mobile"); |
| 38 | $oLdapAuth = new LDAPAuthenticator(); | 38 | $oLdapAuth = new LDAPAuthenticator(); |
| 39 | - $sSearch = "michael"; | 39 | + $sSearch = "mi"; |
| 40 | echo "<ul><li>searching for $sSearch with attributes=<pre>" . arrayToSTring($aAttributes) . "</pre></li>"; | 40 | echo "<ul><li>searching for $sSearch with attributes=<pre>" . arrayToSTring($aAttributes) . "</pre></li>"; |
| 41 | $aResults = $oLdapAuth->searchUsers($sSearch, $aAttributes); | 41 | $aResults = $oLdapAuth->searchUsers($sSearch, $aAttributes); |
| 42 | + echo "<li><pre>first result=" . arrayToString($aResults[0]) . "</pre></li>"; | ||
| 42 | echo "<li><pre>" . arrayToString($aResults) . "</pre></li></ul>"; | 43 | echo "<li><pre>" . arrayToString($aResults) . "</pre></li></ul>"; |
| 43 | 44 | ||
| 44 | echo "<b>Testing LDAP authentication</b>"; | 45 | echo "<b>Testing LDAP authentication</b>"; |
| @@ -51,5 +52,5 @@ if (checkSession()) { | @@ -51,5 +52,5 @@ if (checkSession()) { | ||
| 51 | 52 | ||
| 52 | $sUserName = "mukhtar"; $sPassword = "mukhtar123"; | 53 | $sUserName = "mukhtar"; $sPassword = "mukhtar123"; |
| 53 | echo "<ul><li>Authenticating ($sUserName, $sPassword) : " . ($oLdapAuth->checkPassword($sUserName, $sPassword) ? "true" : "false") . "</li></ul>"; | 54 | echo "<ul><li>Authenticating ($sUserName, $sPassword) : " . ($oLdapAuth->checkPassword($sUserName, $sPassword) ? "true" : "false") . "</li></ul>"; |
| 54 | -} | 55 | +//} |
| 55 | ?> | 56 | ?> |