diff --git a/sync/.htaccess b/sync/.htaccess
deleted file mode 100644
index 93169e4..0000000
--- a/sync/.htaccess
+++ /dev/null
@@ -1,2 +0,0 @@
-Order deny,allow
-Deny from all
diff --git a/sync/dbSync.php b/sync/dbSync.php
deleted file mode 100644
index a9e92cd..0000000
--- a/sync/dbSync.php
+++ /dev/null
@@ -1,90 +0,0 @@
-fileSystemRoot/lib/documentmanagement/Document.inc");
-require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc");
-
-$aMissingDocuments = array();
-$aMissingFolders = array();
-
-$aDocuments = Document::getList();
-$aFolders = Folder::getList();
-
-for ($i = 0; $i < count($aFolders); $i++) {
- $oFolder = $aFolders[$i];
- checkFolder($oFolder, $fDelete);
-}
-
-for ($i = 0; $i < count($aDocuments); $i++) {
- $oDocument = $aDocuments[$i];
- checkDoc($oDocument, $fDelete);
-}
-
-$sToRender = "
\n";
-$sToRender .= "The following is a list of documents and folders that are in the database but not on the file system
\n";
-$sToRender .= "These folders/documents will have to be recreated/recaptured.
\n";
-if (isset($fDelete)) {
- $sToRender .= "These folders/documents HAVE BEEN DELETED.
\n";
-} else {
- $sToRender .= "These folders/documents have NOT BEEN DELETED YET.
\n";
- $sToRender .= "Click on the link entitled 'Deleted' below to delete these documents/folders
\n";
-}
-
-$sToRender .= "The following folders must be recreated:
\n\n";
-$sToRender .= "";
-for ($i = 0; $i < count($aMissingFolders); $i++) {
- $oFolder = $aMissingFolders[$i];
- $sToRender .= "| " . Folder::getFolderPath($oFolder->getID()) . " |
\n";
-}
-$sToRender .= "
";
-
-$sToRender .= "
The following documents must be recaptured:
\n";
-$sToRender .= "";
-for ($i = 0; $i < count($aMissingDocuments); $i++) {
- $oDocument = $aMissingDocuments[$i];
- $sToRender .= "| (" . $oDocument->getID() . ", " . $oDocument->getLastModifiedDate() . ") " . Folder::getFolderPath($oDocument->getFolderID()) . $oDocument->getFileName() . " |
";
-}
-$sToRender .= "
";
-
-$sToRender .= "
\n";
-if (!isset($fDelete)) {
- $sToRender .= "Delete\n";
-}
-$sToRender .= "";
-
-echo $sToRender;
-
-function checkDoc($oDocument, $bForDelete) {
- global $aMissingDocuments;
- $sDocPath = Folder::getFolderPath($oDocument->getFolderID()) . $oDocument->getFileName();
- if (file_exists($sDocPath) === false) {
- $aMissingDocuments[count($aMissingDocuments)] = $oDocument;
- if (isset($bForDelete)) {
- $oDocument->delete();
- }
- }
-}
-
-function checkFolder($oFolder, $bForDelete) {
- global $aMissingFolders;
- $sFolderPath = Folder::getFolderPath($oFolder->getID());
- if (file_exists($sFolderPath)) {
- return;
- } else {
- $aMissingFolders[count($aMissingFolders)] = $oFolder;
- if (isset($bForDelete)) {
- $oFolder->delete();
- }
- }
-}
-
-?>
diff --git a/sync/migrateLDAP.php b/sync/migrateLDAP.php
deleted file mode 100644
index 9e58d69..0000000
--- a/sync/migrateLDAP.php
+++ /dev/null
@@ -1,34 +0,0 @@
-";
-for ($i=0; $isearchUsers($oUser->getUserName(), array ("dn"));
- if (count($aResults) > 1) {
- echo "retrieved " . count($aResults) . " matches for username=" . $oUser->getUserName() . ": " . arrayToString($aResults) . "
";
- } else if (count($aResults) == 1) {
- $sNewDN = $aResults[$oUser->getUserName()]["dn"];
- // echo an update statement that sets the dn to the correct value
- echo "UPDATE users SET ldap_dn='" . $sNewDN . "' WHERE id=" . $oUser->getID() . "
";
- }
-}
-echo "Change the configuration file to point to the new directory server-" . $sNewLdapServer;
-echo "";
-?>
\ No newline at end of file
diff --git a/sync/pathSync.php b/sync/pathSync.php
deleted file mode 100644
index 841bf9e..0000000
--- a/sync/pathSync.php
+++ /dev/null
@@ -1,58 +0,0 @@
-fileSystemRoot/lib/documentmanagement/Document.inc");
-require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc");
-
-
-$aFolders = Folder::getList("parent_folder_ids IS NULL");
-$aDocuments = Document::getList("parent_folder_ids IS NULL");
-
-//update the folders
-for ($i = 0; $i < count($aFolders); $i++) {
- $oFolder = $aFolders[$i];
- echo "Updating folder: " . $oFolder->getName() . "
";
- updateFolder($oFolder);
-}
-
-echo "
";
-
-//update the documents
-for ($i = 0; $i < count($aDocuments); $i++) {
- $oDocument = $aDocuments[$i];
- echo "Updating document: " . $oDocument->getName() . "
";
- if (!$oDocument->getCheckedOutUserID()) {
- $oDocument->setCheckedOutUserID(-1);
- }
- $oDocument->update(true);
-}
-
-function updateFolder($oFolder) {
- global $default, $lang_err_database, $lang_err_object_key;
- $sFullPath = $oFolder->generateFullFolderPath($oFolder->getParentID());
- $sFullPath = substr($sFullPath,1,strlen($sFullPath));
- $sParentIDs = $oFolder->generateParentFolderIDS($oFolder->getParentID());
- $sParentIDs = substr($sParentIDs,1,strlen($sParentIDs));
-
- $sql = $default->db;
- //root folders won't get anything added to them
- if (strlen($sFullPath) > 0) {
- $sql->query("UPDATE " . $default->folders_table . " SET " .
- "full_path = '" . addslashes($sFullPath) . "', " .
- "parent_folder_ids = '" . addslashes($sParentIDs) . "' " .
- "WHERE id = " . $oFolder->getID());
- }
-}
-
-?>
diff --git a/sync/sanitiseEscapedData.php b/sync/sanitiseEscapedData.php
deleted file mode 100644
index 66b41e1..0000000
--- a/sync/sanitiseEscapedData.php
+++ /dev/null
@@ -1,54 +0,0 @@
- "synopsis,body",
- "dependant_document_instance" => "document_title",
- "dependant_document_template" => "document_title",
- "documents" => "name,filename,description,full_path",
- "discussion_comments" => "subject,body",
- "document_fields" => "name",
- "document_fields_link" => "value",
- "document_transactions" => "comment",
- "document_types_lookup" => "name",
- "metadata_lookup" => "name",
- "folders" => "name,description,full_path",
- "groups_lookup" => "name",
- "organisations_lookup" => "name",
- "roles" => "name",
- "units_lookup" => "name",
- "users" => "name",
- "web_sites" => "web_site_name");
-echo "";
-foreach ($aFields as $table => $fields) {
- $sql = $default->db;
- $aFields = explode(",", $fields);
- foreach ($aFields as $field) {
- // select all escaped fields and ids
- $query = "select id, $field from $table where $field like '%\\\\\\%'";
- echo $query . "
";
- $sql->query($query);
- while ($sql->next_record()) {
- // strip field
- //$cleanField = stripslashes($sql->f($field));
- echo "found offending field=" . $sql->f($field). "
";
- // update it
- updateField($table, $sql->f("id"), $field, $sql->f($field));
- }
- }
-}
-echo "";
-
-function updateField($table, $id, $fieldName, $value) {
- global $default;
- $sql = $default->db;
- $query = "update $table set $fieldName='$value' where id=$id";
- if ($sql->query($query)) {
- echo "successful ";
- } else {
- echo "unsuccessful ";
- }
- echo "update query=$query
";
-}
-?>
\ No newline at end of file
diff --git a/sync/unDecodeComments.php b/sync/unDecodeComments.php
deleted file mode 100644
index 1537c62..0000000
--- a/sync/unDecodeComments.php
+++ /dev/null
@@ -1,29 +0,0 @@
-db;
-$query = "select id, body from discussion_comments";
-$sql->query($query);
-echo "";
-while ($sql->next_record()) {
- echo "found offending field=" . $sql->f("body") . "
";
- // update it
- updateField($sql->f("id"), $sql->f("body"));
-}
-echo "";
-
-function updateField($id, $value) {
- global $default;
- $sql = $default->db;
- $value = urldecode($value);
- $query = "update discussion_comments set body='$value' where id=$id";
- if ($sql->query($query)) {
- echo "successful ";
- } else {
- echo "unsuccessful ";
- }
- echo "update query=$query
";
-}
-?>
\ No newline at end of file