diff --git a/config/dmsDefaults.php b/config/dmsDefaults.php
index e70e890..e55fd56 100644
--- a/config/dmsDefaults.php
+++ b/config/dmsDefaults.php
@@ -38,6 +38,9 @@
*
*/
+// stuff in the new installer section database upgrade fails without this
+global $default;
+
if (defined('DMS_DEFAULTS_INCLUDED'))
{
return;
@@ -662,5 +665,4 @@ if (!extension_loaded('mbstring'))
require_once(KT_LIB_DIR . '/templating/kt3template.inc.php');
$GLOBALS['main'] =new KTPage();
-
?>
diff --git a/ktatompub/.htaccess b/ktatompub/.htaccess
deleted file mode 100644
index bad6432..0000000
--- a/ktatompub/.htaccess
+++ /dev/null
@@ -1,45 +0,0 @@
-# This file sets up the necessary PHP settings to run KnowledgeTree
-# optimally.
-#
-# It is best that KnowledgeTree be allowed to manage its PHP and access
-# permissions using these .htaccess files. This prevents direct access
-# to libraries, scripts, and documents that should not be available via
-# the web.
-#
-# By default, to facilitate quick testing of functionality,
-# KnowledgeTree places the Documents directory within the KnowledgeTree
-# web root. This, by default, would allow people to browse the
-# documents in the DMS, bypassing the security permissions. The
-# default .htaccess settings would prevent this.
-#
-# KnowledgeTree itself is able to deal with most PHP configurations,
-# excepting "safe mode" currently, but is unable to handle certain
-# inherent configuration options (for example, setting the upload size
-# very low). Check the setup checklists (as described in the
-# documentation) to see how your configuration is handled.
-#
-# The default .htaccess settings ensure that no workarounds occur in the
-# PHP code, leading to better performance and robustness.
-#
-#
| KnowledgeTree AtomPub Client | -
| - |
| - |
| KT Atompub URL | -- - | -
| - | - |
| Checking ServiceDocument | -- |
| Document Tree Service | -- |
| Folder Info Service | -- |
| Document Info Service | -- |
-This is a not fully functional (for now) version of the jQuery API build for demonstration purposes only. Only tested on a Mac. More about jQuery Finder Plugin. Comments ?
- - - - diff --git a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/default.css b/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/default.css deleted file mode 100644 index 7c7f4d0..0000000 --- a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/default.css +++ /dev/null @@ -1,15 +0,0 @@ -body{font:0.8em Verdana,Arial,Helvetica,sans-serif;;} -hr{clear:both;} -.ui-finder{width:850px;padding:10px;} -.ui-finder .ui-finder-list-item{border-bottom:1px solid;} -.ui-finder .ui-finder-column .ui-finder-file-preview .ui-finder-image img{background-color:#000;border:1px outset #ccc;} -.ui-finder-action-destroy{float:left !important;} -.ui-finder .ui-finder-column .ui-finder-file-preview{font-size:0.85em;} -.ui-finder .ui-finder-column .ui-finder-file-preview{padding:10px;} -.ui-finder .ui-finder-column .ui-finder-file-preview .ui-finder-properties{line-height:1.3em;} -.ui-finder .ui-finder-column .ui-finder-file-preview .ui-finder-properties li{margin:0 0 10px 0;} -.ui-finder .ui-finder-column .ui-finder-file-preview .ui-finder-properties li strong{display:block;color:#888;} -.ui-finder .ui-finder-column .ui-finder-file-preview .ui-finder-preview-heading{font-size:1.2em;position:relative;padding-left:20px;margin:0 0 15px 0;cursor:pointer;} -.ui-finder .ui-finder-column .ui-finder-file-preview .ui-finder-preview-heading span{display:block;position:absolute;top:0;left:0;bottom:0;width:16px;} -.ui-finder .ui-finder-column .ui-finder-file-preview .ui-finder-image{margin:15px 0;display:block;} -.ui-finder .ui-finder-column .ui-finder-file-preview .ui-finder-image img{padding:2px;max-width:150px;max-height:150px;} diff --git a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/all-wcprops b/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/all-wcprops deleted file mode 100644 index b796a89..0000000 --- a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/all-wcprops +++ /dev/null @@ -1,35 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 26 -/svn/!svn/ver/2/trunk/html -END -level5.html -K 25 -svn:wc:ra_dav:version-url -V 38 -/svn/!svn/ver/2/trunk/html/level5.html -END -somefile.html -K 25 -svn:wc:ra_dav:version-url -V 40 -/svn/!svn/ver/2/trunk/html/somefile.html -END -level2.html -K 25 -svn:wc:ra_dav:version-url -V 38 -/svn/!svn/ver/2/trunk/html/level2.html -END -level3.html -K 25 -svn:wc:ra_dav:version-url -V 38 -/svn/!svn/ver/2/trunk/html/level3.html -END -level4.html -K 25 -svn:wc:ra_dav:version-url -V 38 -/svn/!svn/ver/2/trunk/html/level4.html -END diff --git a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/entries b/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/entries deleted file mode 100644 index 498cb9f..0000000 --- a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/entries +++ /dev/null @@ -1,198 +0,0 @@ -9 - -dir -3 -https://rudas.n@jqueryfinder.googlecode.com/svn/trunk/html -https://rudas.n@jqueryfinder.googlecode.com/svn - - - -2009-02-26T09:21:02.204978Z -2 -rudas.n - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b09892bc-9467-11dd-b351-877165d8dbbc - -level5.html -file - - - - -2009-02-26T09:26:36.000000Z -3685bcf99a55aa851eb5a5422c6744d7 -2009-02-26T09:21:02.204978Z -2 -rudas.n - - - - - - - - - - - - - - - - - - - - - -443 - -somefile.html -file - - - - -2009-02-26T09:26:36.000000Z -da59fd4f3cc8acf6bca23e3b43aba1fb -2009-02-26T09:21:02.204978Z -2 -rudas.n - - - - - - - - - - - - - - - - - - - - - -690 - -level2.html -file - - - - -2009-02-26T09:26:36.000000Z -b64d5fa7665d4fcc958bcb325a5c2305 -2009-02-26T09:21:02.204978Z -2 -rudas.n - - - - - - - - - - - - - - - - - - - - - -420 - -level3.html -file - - - - -2009-02-26T09:26:36.000000Z -ee26cf4d47b12cc62fdf6ad07db40894 -2009-02-26T09:21:02.204978Z -2 -rudas.n - - - - - - - - - - - - - - - - - - - - - -279 - -level4.html -file - - - - -2009-02-26T09:26:36.000000Z -46a6ce0ec53a23f64d9f7d717da5704d -2009-02-26T09:21:02.204978Z -2 -rudas.n - - - - - - - - - - - - - - - - - - - - - -279 - diff --git a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/format b/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/format deleted file mode 100644 index ec63514..0000000 --- a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/format +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level2.html.svn-base b/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level2.html.svn-base deleted file mode 100644 index cda17f7..0000000 --- a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level2.html.svn-base +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level3.html.svn-base b/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level3.html.svn-base deleted file mode 100644 index 52dd1cf..0000000 --- a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level3.html.svn-base +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level4.html.svn-base b/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level4.html.svn-base deleted file mode 100644 index 5db7a28..0000000 --- a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level4.html.svn-base +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level5.html.svn-base b/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level5.html.svn-base deleted file mode 100644 index 8722ca6..0000000 --- a/ktatompub/Client/js/@research/jqueryfinder-0.7.0.1/html/.svn/text-base/level5.html.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -

$(selector).finder([options])$(selector).finder('select',URL || DOM or jQuery object || Array of URLs)$(selector).finder('current')$(selector).finder('refresh')Just some methods to test the queue. Create finder before using testing methods
-Calls 'select' method 6 times at an interval of 500msCalls 'select' method for an array of URLs. Useful if you want to select an Item or Folder which is multiple levels down.
-$('#finder').finder({
- title : 'jQuery Finder v0.6a',
- onRootReady: function(rootList,finderObj){
- debug('Root ready',arguments)
- },
- onInit : function(finderObj) {
-
- debug('Finder initialised',arguments)
-
- $('.ui-finder-action-refresh').click(function() {
- $('[name="refresh"]').click();
- });
-
-
- $('.ui-finder-action-open').click(function(){
- $('[name="select"]').click();
- });
-
- $('.ui-finder-action-current').click(function(){
- $('[name="getCurrent"]').click();
- });
-
- $('.ui-finder-action-destroy').click(function(){
- $('[name="createFinder"]').click();
- });
-
- },
- onItemSelect : function(listItem,eventTarget,finderObject){
- var anchor = $('a',listItem),
- href = anchor.attr('rel');
-
- // Debug is a function specified in Finder script for debugging purposes
- // Remove it if unnecessary
- debug('onItemSelect - URL: ',href)
-
- // By returning false, the url specified is not fetched
- // ie. Do not display new column if selected item is not an image
- if(href.indexOf('.jpg') == -1) {return false;}
-
- },
- onFolderSelect : function(listItem,eventTarget,finderObject){
- var anchor = $('a',listItem),
- href = anchor.attr('rel');
-
- debug('onFolderSelect - URL: ',href)
- },
- onItemOpen : function(listItem,newColumn,finderObject){
- var anchor = $('a',listItem),
- href = anchor.attr('href');
-
- debug('onItemOpen - Column source: ',newColumn.attr('data-finder-list-source'))
-
- },
- onFolderOpen : function(listItem,newColumn,finderObject){
- var anchor = $('a',listItem),
- href = anchor.attr('href');
-
- debug('onFolderOpen - Column source: ',newColumn.attr('data-finder-list-source'))
- },
-
- toolbarActions : function() {
- return '\
- <div class="ui-finder-button ui-state-default ui-corner-left ui-finder-action-refresh" title="Refresh">\
- <span class="ui-icon ui-icon-refresh"/>\
- </div>\
- <div class="ui-finder-button ui-state-default ui-finder-action-open" title="Open ..">\
- >span class="ui-icon ui-icon-folder-open"/>\
- </div>\
- <div class="ui-finder-button ui-state-default ui-finder-action-current ui-corner-right" title="Get current">\
- >span class="ui-icon ui-icon-help"/>\
- </div>\
- <div class="ui-finder-button ui-state-default ui-finder-action-destroy ui-corner-all" title="Destroy">\
- >span class="ui-icon ui-icon-closethick"/>\
- </div>\
- ';
- }
-
-});
-
-This is an Alpha release. It is tested but not thoroughly. There may be bugs, but I haven't found them yet. There are some issues with Internet Explorer (see browser support below). This release is (still) only for testing purposes and proof-of-concept.
-You are more than welcome to contribute with bug reports, code, and general ideas/comments. Please post at jQuery group or e-mail me at rudas dot n at gmail dot com.
-Last update: 9 Feb. 2009
-There's a minor bug in most browsers: Each column's width is not calculated properly and so either a long item will collapse to two lines (or more) the column will be cut off. I need some help on this one. Possible cause: some browsers don't take into consideration the width of the scrollbars when calculating widths (?)
- -Unless otherwise noted, the script looks and behaves correctly for the following browsers:
- - -(This section needs update, see source of ui.finder.js for options)
-StringStringFunctionFunctionFunctiononItemSelect returns false, default behaviour is ignored, i.e. the URL is not fetched, and the new level is not shown. onItemOpen is also not called.Functionanchor element (as opposed to the li element).Functionclass "folder" to your list element. Function is called when the user clicks on the list (li) element.Note: If onFolderSelect returns false, default behaviour is ignored, i.e. the URL is not fetched, and the new level is not shown.
Functionanchor element (as opposed to the li element)BooleanDefault: true
BooleanDefault: false
New column expands to fit available space.[optional]
-When lists & file info already in dom. Display items several levels down.
-Make public methods available via toolbar and/or menubar. (nearly there)
-Search for specific items (coming next)
-accessing the quick start page...
- - diff --git a/ktatompub/Client/js/chili/cplusplus.js b/ktatompub/Client/js/chili/cplusplus.js deleted file mode 100644 index a1725eb..0000000 --- a/ktatompub/Client/js/chili/cplusplus.js +++ /dev/null @@ -1,45 +0,0 @@ -/* -=============================================================================== -Chili is the jQuery code highlighter plugin -............................................................................... -LICENSE: http://www.opensource.org/licenses/mit-license.php -WEBSITE: http://noteslog.com/chili/ - - Copyright 2008 / Andrea Ercolino -=============================================================================== -*/ - -{ - _name: "cpp" - , _case: true - , _main: { - mlcom : { - _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// - , _style: "color: #4040c2;" - } - , com : { - _match: /\/\/.*/ - , _style: "color: green;" - } - , preproc : { - _match: /(?=^|\n)\s*#\w+/ - , _style: "color: red;" - } - , string : { - _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ - , _style: "color: teal;" - } - , number : { - _match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/ - , _style: "color: red;" - } - , datatype: { - _match: /\b(?:wint_t|wctype_t|wctrans_t|wchar_t|va_list|uintptr_t|tm|time_t|terminate_function|size_t|signed|sig_atomic_t|short|ptrdiff_t|mbstate_t|long|ldiv_t|lconv|jmp_buf|intptr_t|int|fpos_t|float|double|div_t|clock_t|char|bool|_wfinddatai64_t|_wfinddata_t|_utimbuf|_timeb|_stati64|_stat|_purecall_handler|_onexit_t|_off_t|_finddatai64_t|_finddata_t|_exception|_diskfree_t|_dev_t|_complex|__wfinddata64_t|__wchar_t|__timeb64|__time64_t|__stat64|__int8|__int64|__int32|__int16|__finddata64_t|_PNH|_HFILE|_HEAPINFO|_FPIEEE_RECORD|_EXCEPTION_POINTERS|WPARAM|WORD|WCHAR|VOID|USN|USHORT|ULONG_PTR|ULONGLONG|ULONG64|ULONG32|ULONG|UINT_PTR|UINT64|UINT32|UINT|UHALF_PTR|UCHAR|TCHAR|TBYTE|SSIZE_T|SIZE_T|SHORT|SERVICE_STATUS_HANDLE|SC_LOCK|SC_HANDLE|PWSTR|PWORD|PWCHAR|PVOID|PUSHORT|PULONG_PTR|PULONGLONG|PULONG64|PULONG32|PULONG|PUINT_PTR|PUINT64|PUINT32|PUINT|PUHALF_PTR|PUCHAR|PTSTR|PTCHAR|PTBYTE|PSTR|PSSIZE_T|PSIZE_T|PSHORT|POINTER_64|POINTER_32|PLONG_PTR|PLONGLONG|PLONG64|PLONG32|PLONG|PLCID|PINT_PTR|PINT64|PINT32|PINT|PHKEY|PHANDLE|PHALF_PTR|PFLOAT|PDWORD_PTR|PDWORDLONG|PDWORD64|PDWORD32|PCWSTR|PCTSTR|PCSTR|PCHAR|PBYTE|PBOOLEAN|PBOOL|LRESULT|LPWSTR|LPWORD|LPVOID|LPTSTR|LPSTR|LPLONG|LPINT|LPHANDLE|LPDWORD|LPCWSTR|LPCVOID|LPCTSTR|LPCSTR|LPCOLORREF|LPBYTE|LPBOOL|LPARAM|LONG_PTR|LONGLONG|LONG64|LONG32|LONG|LGRPID|LCTYPE|LCID|LANGID|INT_PTR|INT64|INT32|INT|HWND|HWINSTA|HSZ|HRSRC|HRGN|HRESULT|HPEN|HPALETTE|HMONITOR|HMODULE|HMETAFILE|HMENU|HLOCAL|HKL|HKEY|HINSTANCE|HICON|HHOOK|HGLOBAL|HGDIOBJ|HFONT|HFILE|HENHMETAFILE|HDWP|HDROP|HDESK|HDDEDATA|HDC|HCURSOR|HCONVLIST|HCONV|HCOLORSPACE|HBRUSH|HBITMAP|HANDLE|HALF_PTR|HACCEL|FLOAT|FILE|DWORD_PTR|DWORDLONG|DWORD64|DWORD32|DWORD|COLORREF|CHAR|BYTE|BOOLEAN|BOOL|ATOM)\b/ - , _style: "color: blue;" - } - , keyword : { - _match: /\b(?:while|whcar_t|volatile|void|virtual|uuid|using|union|typename|typeid|typedef|try|true|throw|thread|this|template|switch|struct|static_cast|static|sizeof|selectany|return|reinterpret_cast|register|public|protected|private|nothrow|noreturn|noinline|new|namespace|naked|mutable|inline|if|goto|friend|for|false|extern|explicit|enum|else|dynamic_cast|do|dllimport|dllexport|deprecated|delete|default|continue|const_cast|const|class|catch|case|break|__try|__finally|__exception|__declspec)\b/ - , _style: "color: navy; font-weight: bold;" - } - } -} diff --git a/ktatompub/Client/js/chili/csharp.js b/ktatompub/Client/js/chili/csharp.js deleted file mode 100644 index 96205ce..0000000 --- a/ktatompub/Client/js/chili/csharp.js +++ /dev/null @@ -1,41 +0,0 @@ -/* -=============================================================================== -Chili is the jQuery code highlighter plugin -............................................................................... -LICENSE: http://www.opensource.org/licenses/mit-license.php -WEBSITE: http://noteslog.com/chili/ - - Copyright 2008 / Andrea Ercolino -=============================================================================== -*/ - -{ - _name: "cs" - , _case: true - , _main: { - mlcom : { - _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// - , _style: "color: #4040c2;" - } - , com : { - _match: /\/\/.*/ - , _style: "color: green;" - } - , string : { - _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ - , _style: "color: teal;" - } - , preproc: { - _match: /^\s*#.*/ - , _style: "color: red;" - } - , number : { - _match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/ - , _style: "color: red;" - } - , keyword: { - _match: /\b(?:while|volatile|void|virtual|using|ushort|unsafe|unchecked|ulong|uint|typeof|try|true|throw|this|switch|struct|string|static|stackalloc|sizeof|short|sealed|sbyte|return|ref|readonly|public|protected|private|params|override|out|operator|object|null|new|namespace|long|lock|is|internal|interface|int|in|implicit|if|goto|foreach|for|float|fixed|finally|false|extern|explicit|event|enum|else|double|do|delegate|default|decimal|continue|const|class|checked|char|catch|case|byte|break|bool|base|as|abstract)\b/ - , _style: "color: navy; font-weight: bold;" - } - } -} diff --git a/ktatompub/Client/js/chili/css.js b/ktatompub/Client/js/chili/css.js deleted file mode 100644 index 9020715..0000000 --- a/ktatompub/Client/js/chili/css.js +++ /dev/null @@ -1,85 +0,0 @@ -/* -=============================================================================== -Chili is the jQuery code highlighter plugin -............................................................................... -LICENSE: http://www.opensource.org/licenses/mit-license.php -WEBSITE: http://noteslog.com/chili/ - - Copyright 2008 / Andrea Ercolino -=============================================================================== -*/ - -{ - _name: 'css' - , _case: true - , _main: { - comment: { - _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// - , _style: "color: olive;" - } - , directive: { - _match: /@\w+/ - , _style: "color: fuchsia;" - } - , url: { - _match: /\b(url\s*\()([^)]+)(\))/ - , _replace: "$1$2$3" - , _style: "color: fuchsia;" - } - , block: { - _match: /\{([\w\W]*?)\}/ - , _replace: function( all, pairs ) { - return '{' + this.x( pairs, '/definition' ) + '}'; - } - } - , 'class': { - _match: /\.\w+/ - , _style: "color: #CC0066; font-weight: bold;" - } - , id: { - _match: /#\w+/ - , _style: "color: IndianRed; font-weight: bold;" - } - , pseudo: { - _match: /:\w+/ - , _style: "color: #CC9900;" - } - , element: { - _match: /\w+/ - , _style: "color: Purple; font-weight: bold;" - } - } - , definition: { - comment: { - _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// - } - , property: { - _match: /\b(?:zoom|z-index|writing-mode|word-wrap|word-spacing|word-break|width|widows|white-space|volume|voice-family|visibility|vertical-align|unicode-bidi|top|text-underline-position|text-transform|text-shadow|text-overflow|text-kashida-space|text-justify|text-indent|text-decoration|text-autospace|text-align-last|text-align|table-layout|stress|speech-rate|speak-punctuation|speak-numeral|speak-header|speak|size|scrollbar-track-color|scrollbar-shadow-color|scrollbar-highlight-color|scrollbar-face-color|scrollbar-dark-shadow-color|scrollbar-base-color|scrollbar-arrow-color|scrollbar-3d-light-color|ruby-position|ruby-overhang|ruby-align|right|richness|quotes|position|play-during|pitch-range|pitch|pause-before|pause-after|pause|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-Y|overflow-X|overflow|outline-width|outline-style|outline-color|outline|orphans|min-width|min-height|max-width|max-height|marks|marker-offset|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|line-break|letter-spacing|left|layout-grid-type|layout-grid-mode|layout-grid-line|layout-grid-char-spacing|layout-grid-char|layout-grid|layout-flow|layer-background-image|layer-background-color|include-source|ime-mode|height|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float|filter|empty-cells|elevation|display|direction|cursor|cue-before|cue-after|cue|counter-reset|counter-increment|content|color|clip|clear|caption-side|bottom|border-width|border-top-width|border-top-style|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-left-width|border-left-style|border-left-color|border-left|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-color|border-bottom|border|behavior|background-repeat|background-position-y|background-position-x|background-position|background-image|background-color|background-attachment|background|azimuth|accelerator)\s*:/ - , _style: "color: #330066;" - } - , special: { - _match: /\b(?:-use-link-source|-set-link-source|-replace|-moz-user-select|-moz-user-modify|-moz-user-input|-moz-user-focus|-moz-outline-width|-moz-outline-style|-moz-outline-color|-moz-outline|-moz-opacity|-moz-border-top-colors|-moz-border-right-colors|-moz-border-radius-topright|-moz-border-radius-topleft|-moz-border-radius-bottomright|-moz-border-radius-bottomleft|-moz-border-radius|-moz-border-left-colors|-moz-border-bottom-colors|-moz-binding)\s*:/ - , _style: "color: #330066; text-decoration: underline;" - } - , url: { - _match: /\b(url\s*\()([^)]+)(\))/ - , _replace: "$1$2$3" - } - , value: { - _match: /\b(?:xx-small|xx-large|x-soft|x-small|x-slow|x-low|x-loud|x-large|x-high|x-fast|wider|wait|w-resize|visible|url|uppercase|upper-roman|upper-latin|upper-alpha|underline|ultra-expanded|ultra-condensed|tv|tty|transparent|top|thin|thick|text-top|text-bottom|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table-caption|sw-resize|super|sub|status-bar|static|square|spell-out|speech|solid|soft|smaller|small-caption|small-caps|small|slower|slow|silent|show|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|s-resize|run-in|rtl|rightwards|right-side|right|ridge|rgb|repeat-y|repeat-x|repeat|relative|projection|print|pre|portrait|pointer|overline|outside|outset|open-quote|once|oblique|nw-resize|nowrap|normal|none|no-repeat|no-open-quote|no-close-quote|ne-resize|narrower|n-resize|move|mix|middle|message-box|medium|marker|ltr|lowercase|lower-roman|lower-latin|lower-greek|lower-alpha|lower|low|loud|local|list-item|line-through|lighter|level|leftwards|left-side|left|larger|large|landscape|justify|italic|invert|inside|inset|inline-table|inline|icon|higher|high|hide|hidden|help|hebrew|handheld|groove|format|fixed|faster|fast|far-right|far-left|fantasy|extra-expanded|extra-condensed|expanded|embossed|embed|e-resize|double|dotted|disc|digits|default|decimal-leading-zero|decimal|dashed|cursive|crosshair|cross|crop|counters|counter|continuous|condensed|compact|collapse|code|close-quote|circle|center-right|center-left|center|caption|capitalize|braille|bottom|both|bolder|bold|block|blink|bidi-override|below|behind|baseline|avoid|auto|aural|attr|armenian|always|all|absolute|above)\b/ - , _style: "color: #3366FF;" - } - , string: { - _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ - , _style: "color: teal;" - } - , number: { - _match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*))(?:%|(?:(?:px|pt|em|)\b))/ - , _style: "color: red;" - } - , color : { - _match: /(?:\#[a-fA-F0-9]{3,6})|\b(?:yellow|white|teal|silver|red|purple|olive|navy|maroon|lime|green|gray|fuchsia|blue|black|aqua|YellowGreen|Yellow|WhiteSmoke|White|Wheat|Violet|Turquoise|Tomato|Thistle|Teal|Tan|SteelBlue|SpringGreen|Snow|SlateGrey|SlateGray|SlateBlue|SkyBlue|Silver|Sienna|SeaShell|SeaGreen|SandyBrown|Salmon|SaddleBrown|RoyalBlue|RosyBrown|Red|Purple|PowderBlue|Plum|Pink|Peru|PeachPuff|PapayaWhip|PaleVioletRed|PaleTurquoise|PaleGreen|PaleGoldenRod|Orchid|OrangeRed|Orange|OliveDrab|Olive|OldLace|Navy|NavajoWhite|Moccasin|MistyRose|MintCream|MidnightBlue|MediumVioletRed|MediumTurquoise|MediumSpringGreen|MediumSlateBlue|MediumSeaGreen|MediumPurple|MediumOrchid|MediumBlue|MediumAquaMarine|Maroon|Magenta|Linen|LimeGreen|Lime|LightYellow|LightSteelBlue|LightSlateGrey|LightSlateGray|LightSkyBlue|LightSeaGreen|LightSalmon|LightPink|LightGrey|LightGreen|LightGray|LightGoldenRodYellow|LightCyan|LightCoral|LightBlue|LemonChiffon|LawnGreen|LavenderBlush|Lavender|Khaki|Ivory|Indigo|IndianRed|HotPink|HoneyDew|Grey|GreenYellow|Green|Gray|GoldenRod|Gold|GhostWhite|Gainsboro|Fuchsia|ForestGreen|FloralWhite|FireBrick|DodgerBlue|DimGrey|DimGray|DeepSkyBlue|DeepPink|Darkorange|DarkViolet|DarkTurquoise|DarkSlateGrey|DarkSlateGray|DarkSlateBlue|DarkSeaGreen|DarkSalmon|DarkRed|DarkOrchid|DarkOliveGreen|DarkMagenta|DarkKhaki|DarkGrey|DarkGreen|DarkGray|DarkGoldenRod|DarkCyan|DarkBlue|Cyan|Crimson|Cornsilk|CornflowerBlue|Coral|Chocolate|Chartreuse|CadetBlue|BurlyWood|Brown|BlueViolet|Blue|BlanchedAlmond|Black|Bisque|Beige|Azure|Aquamarine|Aqua|AntiqueWhite|AliceBlue)\b/ - , _style: "color: green;" - } - } -} diff --git a/ktatompub/Client/js/chili/delphi.js b/ktatompub/Client/js/chili/delphi.js deleted file mode 100644 index d3382a7..0000000 --- a/ktatompub/Client/js/chili/delphi.js +++ /dev/null @@ -1,41 +0,0 @@ -/* -=============================================================================== -Chili is the jQuery code highlighter plugin -............................................................................... -LICENSE: http://www.opensource.org/licenses/mit-license.php -WEBSITE: http://noteslog.com/chili/ - - Copyright 2008 / Andrea Ercolino -=============================================================================== -*/ - -{ - _name: "pas" - , _case: true - , _main: { - mlcom: { - _match: /(?:\(\*[\w\W]*?\*\))|(?:{(?!\$)[\w\W]*?})/ - , _style: "color: #4040c2;" - } - , com: { - _match: /\/\/.*/ - , _style: "color: green;" - } - , string: { - _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')/ - , _style: "color: teal;" - } - , number: { - _match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b)|(?:\$[a-zA-Z0-9]+\b)/ - , _style: "color: red;" - } - , direct: { - _match: /\{\$[a-zA-Z]+ .+\}/ - , _style: "color: red;" - } - , keyword: { - _match: /\b(?:abs|addr|and|ansichar|ansistring|array|as|asm|begin|boolean|byte|cardinal|case|char|class|comp|const|constructor|currency|destructor|div|do|double|downto|else|end|except|exports|extended|false|file|finalization|finally|for|function|goto|if|implementation|in|inherited|initialization|int64|integer|interface|is|label|library|longint|longword|mod|nil|not|object|of|on|or|packed|pansichar|pansistring|pchar|pcurrency|pdatetime|pextended|pint64|pointer|private|procedure|program|property|protected|pshortstring|pstring|public|published|pvariant|pwidechar|pwidestring|raise|real|real48|record|repeat|set|shl|shortint|shortstring|shr|single|smallint|string|then|threadvar|to|true|try|type|unit|until|uses|val|var|varirnt|while|widechar|widestring|with|word|write|writeln|xor)\b/ - , _style: "color: navy; font-weight: bold;" - } - } -} diff --git a/ktatompub/Client/js/chili/html.js b/ktatompub/Client/js/chili/html.js deleted file mode 100644 index f02954b..0000000 --- a/ktatompub/Client/js/chili/html.js +++ /dev/null @@ -1,80 +0,0 @@ -/* -=============================================================================== -Chili is the jQuery code highlighter plugin -............................................................................... -LICENSE: http://www.opensource.org/licenses/mit-license.php -WEBSITE: http://noteslog.com/chili/ - - Copyright 2008 / Andrea Ercolino -=============================================================================== -*/ - -{ - _name: 'html' - , _case: false - , _main: { - doctype: { - _match: // - , _style: "color: #CC6600;" - } - , ie_style: { - _match: /()/ - , _replace: function( all, open, content, close ) { - return "" + this.x( open ) + "" - + this.x( content, '//style' ) - + "" + this.x( close ) + ""; - } - , _style: "color: DarkSlateGray; font-weight: bold;" - } - , comment: { - _match: // - , _style: "color: #4040c2;" - } - , script: { - _match: /( - - - - - - - - - - */ - this.libraries={ - 'js/lib.js' :'Framework Main Library', - 'js/lib.debug.js' :'Framework Debugger Library', - 'js/events.js' :'Events Delegation Engine', - 'js/site.event.js' :'Site Events', - 'js/jquery-1.3.2.min.js' :'jQuery Ver 1.3.2', - 'js/jquery.cookie.js' :'jQuery Cookie Plugin', - 'js/ui/ui.core.js' :'jQuery UI Core', - 'js/ui/ui.tabs.js' :'jQuery UI Tabs Plugin', - 'js/jquery.dynatree.min.js' :'jQuery DynaTree Tree Menu Plugin', - 'js/ktApp.js' :'KT Atom Publishing Protocol Library' - } - - this.init=function(){ - this.setupUrls(); - $('#perspectives').tabs().fadeIn(400); - this.setupCommsPanel(); - this.setupTabEvents(); - this.setupInspectors(); - this.setupDisplay(); - events.trigger('perspective.folders.show'); - } - - this.bootStrap=function(){ - for(var liburl in this.libraries){ - this.includeJs(liburl); - //alert('loading '+ liburl) - } - $('document').ready(function(){site.init();}); - } - - this.includeJs=function(url){ - $.ajax({async:false,url:url}); //Preload the javascript - var e = document.createElement("script"); - e.src = url; - e.type="text/javascript"; - document.getElementsByTagName("head")[0].appendChild(e); - } - - this.setupDisplay=function(){ - events.trigger('panel.clear'); - $('#dialog').dialog({autoOpen:false, modal:true, dialogClass:'dialogs', closeOnEscape:true, buttons:{'OK':function(){$(this).dialog('close');}}}); - $('.fg-button').each(function(){ - $(this).mouseover(function(){ - $(this).addClass('ui-state-hover'); - }); - $(this).mouseout(function(){ - $(this).removeClass('ui-state-hover'); - }); - }); - } - - this.showDialog=function(title,msg,buttons){ - var d=$('#dialog'); - if(buttons!=undefined)if(typeof(buttons)=='object'){ - d.dialog('option','buttons',buttons); - } - d.dialog('option','title',title); - d.html(msg); - d.dialog('open'); - } - - this.hideDialog=function(){ - var d=$('#dialog'); - d.dialog('close'); - } - - this.setupUrls=function(){ - lib.resources.setResourceUrl('base',this.cfg('baseurl')); - lib.resources.setResourceUrl('services',this.cfg('baseurl')+this.cfg('services')); - }; - - this.setupCommsPanel=function(){ - events.listen('LIB.RESOURCES:Resource_Fetched',function(data){ - $('#panel_comms').val($('#panel_comms').val()+"\n\n"+(data.data)); - lib.debug.inspect($.xml2json(data.data)); - - // $('#panel_comms').chili(); - }) - - events.listen('comms_clear_cache',function(){ - document.getElementById('panel_comms').value=''; - lib.debug.info('cleared comms panel'); - }) - } - - this.setupInspectors=function(){ - - - events.listen('panel.document.info.show',site.event_handlers.document_panel_info_show,site.event_handlers); - events.listen('panel.document.edit.show',site.event_handlers.document_panel_edit_show,site.event_handlers); - events.listen('panel.document.action.save',site.event_handlers.document_action_save,site.event_handlers); - events.listen('panel.document.action.delete',site.event_handlers.document_action_delete,site.event_handlers); - events.listen('panel.document.action.checkout',site.event_handlers.document_action_checkout,site.event_handlers); - events.listen('panel.document.action.download',site.event_handlers.document_action_download,site.event_handlers); - - events.listen('panel.folder.info.show',site.event_handlers.folder_panel_info_show,site.event_handlers); - events.listen('panel.folder.edit.show',site.event_handlers.folder_panel_edit_show,site.event_handlers); - events.listen('panel.folder.action.save',site.event_handlers.folder_action_save,site.event_handlers); - events.listen('panel.folder.action.move',site.event_handlers.folder_action_move,site.event_handlers); - - - - - - - - events.listen('info.activate.folder',function(id){site.event_handlers.folder_panel_info_show(id);}); - events.listen('info.activate.document',function(id){site.event_handlers.document_panel_info_show(id);}); - - events.listen('panel.clear',function(){ - for(var i=0; i'.print_r($APP,true).''; - -//Render the resulting feed response -$APP->render(); - -?> \ No newline at end of file diff --git a/ktatompub/lib/KT_atom_baseDoc.inc.php b/ktatompub/lib/KT_atom_baseDoc.inc.php deleted file mode 100644 index fd6670b..0000000 --- a/ktatompub/lib/KT_atom_baseDoc.inc.php +++ /dev/null @@ -1,128 +0,0 @@ -. - * - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, - * California 94120-7775, or email info@knowledgetree.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU General Public License version 3. - * - * In accordance with Section 7(b) of the GNU General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original - * copyright notice. - * Contributor( s): - * Mark Holtzhausen - * - */ - -/** - * Includes - */ - -class KT_atom_baseDoc{ - const XML_ENCODING='utf-8'; - const XML_VERSION='1.0'; - - public $DOM=NULL; - - public function __construct(){ - $this->DOM=new DOMDocument(self::XML_VERSION ,self::XML_ENCODING); - } - - public function &newAttr($name=NULL){ - $node=$this->DOM->createAttribute($name); - if(func_num_args()>1){ - $val=func_get_arg(1); - $node->value=$val; - } - return $node; - } - - public function &newElement($name=NULL){ - if(func_num_args()>1){ - $val=func_get_arg(1); - $node=$this->DOM->createElement($name,$val); - }else{ - $node=$this->DOM->createElement($name); - } - return $node; - } - - public function &newCDATA($data=NULL){ - $this->DOM->createCDATASection($data); - } - - public function &newB64Stream($tagName=NULL,$tagAttrs=array(),$streamString=NULL){ - $e=$this->newElement($tagName,chunk_split(base64_encode($streamString),75)); - foreach($tagAttrs as $attr=>$val){ - $attr=$this->newAttr($attr,$val); - $e->appendChild($attr); - } - return $e; - } - - - - public function formatXmlString($xml) { - // add marker linefeeds to aid the pretty-tokeniser (adds a linefeed between all tag-end boundaries) - $xml = preg_replace('/(>)(<)(\/*)/', "$1\n$2$3", $xml); - - // now indent the tags - $token = strtok($xml, "\n"); - $result = ''; // holds formatted version as it is built - $pad = 0; // initial indent - $matches = array(); // returns from preg_matches() - - // scan each line and adjust indent based on opening/closing tags - while ($token !== false) : - - // test for the various tag states - - // 1. open and closing tags on same line - no change - if (preg_match('/.+<\/\w[^>]*>$/', $token, $matches)) : - $indent=0; - // 2. closing tag - outdent now - elseif (preg_match('/^<\/\w/', $token, $matches)) : - $pad--; - // 3. opening tag - don't pad this one, only subsequent tags - elseif (preg_match('/^<\w[^>]*[^\/]>.*$/', $token, $matches)) : - $indent=1; - // 4. no indentation needed - else : - $indent = 0; - endif; - - // pad the line with the required number of leading spaces - $line = str_pad($token, strlen($token)+$pad, ' ', STR_PAD_LEFT); - $result .= $line . "\n"; // add to the cumulative result, with linefeed - $token = strtok("\n"); // get the next token - $pad += $indent; // update the pad size for subsequent lines - endwhile; - - return $result; - } -} - -?> \ No newline at end of file diff --git a/ktatompub/lib/KT_atom_responseFeed.inc.php b/ktatompub/lib/KT_atom_responseFeed.inc.php deleted file mode 100644 index fa64117..0000000 --- a/ktatompub/lib/KT_atom_responseFeed.inc.php +++ /dev/null @@ -1,45 +0,0 @@ -constructHeader(); - $this->baseURI=$baseURI; - } - - private function constructHeader(){ - $feed=$this->newElement('feed'); - $feed->appendChild($this->newAttr('xmlns','http://www.w3.org/2005/Atom')); - $this->feed=&$feed; - $this->DOM->appendChild($this->feed); - } - - public function &newEntry(){ - $entry=$this->newElement('entry'); - $this->feed->appendChild($entry); - return $entry; - } - - public function &newField($name=NULL,$value=NULL,&$attachToNode=NULL){ - $field=$this->newElement($name,$value); - if(isset($attachToNode))$attachToNode->appendChild($field); - return $field; - } - - public function render(){ - return $this->formatXmlString(trim($this->DOM->saveXML())); - } - - -} - -class KT_atom_ResponseFeed_GET extends KT_atom_responseFeed{} -class KT_atom_ResponseFeed_PUT extends KT_atom_responseFeed{} -class KT_atom_ResponseFeed_POST extends KT_atom_responseFeed{} -class KT_atom_ResponseFeed_DELETE extends KT_atom_responseFeed{} - -?> \ No newline at end of file diff --git a/ktatompub/lib/KT_atom_server.default_dms_services.inc.php b/ktatompub/lib/KT_atom_server.default_dms_services.inc.php deleted file mode 100644 index 423b733..0000000 --- a/ktatompub/lib/KT_atom_server.default_dms_services.inc.php +++ /dev/null @@ -1,93 +0,0 @@ -newEntry(); - $feed->newField('id',$id,$entry); - foreach($item as $property=>$value){ - $feed->newField($property,$value,$entry); - } - } - //Expose the responseFeed - $this->responseFeed=$feed; - } - - public function DELETE_action(){ - $feed = new KT_atom_ResponseFeed_DELETE(); - $this->responseFeed=$feed; - } -} - - - - -/** - * AtomPub Service: folder - * - * Returns detail on a particular folder - * - */ -class KT_atom_service_folder extends KT_atom_service { - public function GET_action(){ - //Create a new response feed - $feed=new KT_atom_responseFeed(KT_APP_BASE_URI); - - //Invoke the KtAPI to get detail about the referenced document - $folderDetail=KT_atom_service_helper::getFolderDetail($this->params[0]?$this->params[0]:1); - - //Create the atom response feed - $entry=$feed->newEntry(); - foreach($folderDetail as $property=>$value){ - $feed->newField($property,$value,$entry); - } - - //Expose the responseFeed - $this->responseFeed=$feed; - } -} - - - - -/** - * AtomPub Service: document - * - * Returns detail on a particular document - * - */ -class KT_atom_service_document extends KT_atom_service { - public function GET_action(){ - //Create a new response feed - $feed=new KT_atom_responseFeed(KT_APP_BASE_URI); - - //Invoke the KtAPI to get detail about the referenced document - $docDetail=KT_atom_service_helper::getDocumentDetail($this->params[0]); - - //Create the atom response feed - $entry=$feed->newEntry(); - foreach($docDetail['results'] as $property=>$value){ - $feed->newField($property,$value,$entry); - } - //Add a downloaduri field manually - $feed->newField('downloaduri',urlencode(KT_APP_SYSTEM_URI.'/action.php?kt_path_info=ktcore.actions.document.view&fDocumentId='.$docDetail['results']['document_id']),$entry); - - //Expose the responseFeed - $this->responseFeed=$feed; - } -} -?> \ No newline at end of file diff --git a/ktatompub/lib/KT_atom_server.inc.php b/ktatompub/lib/KT_atom_server.inc.php deleted file mode 100644 index 7ba14cf..0000000 --- a/ktatompub/lib/KT_atom_server.inc.php +++ /dev/null @@ -1,87 +0,0 @@ -queryArray=$queryArray; - $this->serviceName=$service; - $this->method=$reqMethod; - $this->workspace=$workspace; - - if($workspace=='servicedocument'){ - $this->serviceDocument(); - return; - } - - $service=$this->getRegisteredService($workspace,$serviceName); - if(is_array($service)){ - $serviceClass=$service['serviceClass']; - echo 'made it'; - $serviceObject=new $serviceClass($reqMethod,$requestParams,$rawRequest); - $this->output=$serviceObject->render(); - }else{ - $serviceObject=new KT_atom_service($requestParams,$rawRequest); - $serviceObject->setStatus(KT_atom_service::STATUS_NOT_FOUND); - $this->output=$serviceObject->render(); - } - } - - public function registerService($workspace=NULL,$serviceName=NULL,$serviceClass=NULL,$title=NULL){ - $workspace=strtolower(trim($workspace)); - $serviceName=strtolower(trim($serviceName)); - - $serviceRecord=array( - 'fileName' =>$fileName, - 'serviceClass' =>$serviceClass, - 'title' =>$title - ); - - $this->services[$workspace][$serviceName]=$serviceRecord; - } - - public function getRegisteredService($workspace,$serviceName=NULL){ - $serviceName=strtolower(trim($serviceName)); - if(isset($this->services[$workspace][$serviceName]))return $this->services[$workspace][$serviceName]; - return false; - } - - public function serviceDocument(){ - $service=new KT_atom_serviceDoc(KT_APP_BASE_URI); - - foreach($this->services as $workspace=>$collection){ - //Creating the Default Workspace for use with standard atomPub Clients - $ws=$service->newWorkspace($workspace); - - foreach($collection as $serviceName=>$serviceInstance){ - $col=$service->newCollection(KT_APP_BASE_URI.$workspace.'/'.$serviceName.'/',$serviceInstance['title'],$ws); - } - } - - $this->output=$service->getAPPdoc(); - } - - public function render(){ - ob_end_clean(); - header('Content-type: text/xml'); - echo $this->output; - } -} - -?> \ No newline at end of file diff --git a/ktatompub/lib/KT_atom_service.inc.php b/ktatompub/lib/KT_atom_service.inc.php deleted file mode 100644 index 511992f..0000000 --- a/ktatompub/lib/KT_atom_service.inc.php +++ /dev/null @@ -1,90 +0,0 @@ -method=$method; - $this->params=$params; - $this->rawContent=$content; - $this->parseHeaders(); - $this->parsedXMLContent=$this->xml2array($this->rawContent); - $this->setStatus(self::STATUS_OK); - $this->responseFeed=new KT_atom_responseFeed(KT_APP_BASE_URI); - switch(strtoupper($this->method)){ - case 'GET': $this->GET_action();break; - case 'PUT': $this->PUT_action();break; - case 'POST': $this->POST_action();break; - case 'DELETE': $this->DELETE_action();break; - default: $this->UNSUPPORTED_action();break; - } - } - - public function GET_action(){ - $this->setStatus(KT_atom_service::STATUS_OK); - } - - public function PUT_action(){ - $this->setStatus(KT_atom_service::STATUS_NOT_FOUND ); - } - - public function POST_action(){ - $this->setStatus(KT_atom_service::STATUS_NOT_FOUND ); - } - - public function DELETE_action(){ - $this->setStatus(KT_atom_service::STATUS_NOT_FOUND ); - } - - public function UNSUPPORTED_action(){ - $this->setStatus(KT_atom_service::STATUS_NOT_FOUND ); - } - - - public function render(){ - return $this->responseFeed->render(); - } - - private function xml2array($xml){ - $array=json_decode(json_encode(@simplexml_load_string($xml)),true); //TODO - XML2ARRAY Translation - return $array; - } - - private function parseHeaders(){ - $headers=null; - if(function_exists('http_get_request_headers')){ //Try to use pcre_http library if it exists - $headers=http_get_request_headers(); - }else{ - if(function_exists('apache_request_headers')){ //If not: try to use apache specific headers - $headers=apache_request_headers(); - }else{ //If not: not supported - empty headers - $headers=array(); - } - } - $this->headers=$headers; - } - - public function setStatus($status=NULL){ - header("HTTP/1.1 ".$status); - } - - private function setEtag($etagValue=NULL){ - if($etagValue)header('ETag: '.$etagValue); - } - -} -?> \ No newline at end of file diff --git a/ktatompub/lib/KT_atom_serviceDoc.inc.php b/ktatompub/lib/KT_atom_serviceDoc.inc.php deleted file mode 100644 index 2fa2d37..0000000 --- a/ktatompub/lib/KT_atom_serviceDoc.inc.php +++ /dev/null @@ -1,138 +0,0 @@ -. - * - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, - * California 94120-7775, or email info@knowledgetree.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU General Public License version 3. - * - * In accordance with Section 7(b) of the GNU General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original - * copyright notice. - * Contributor( s): - * Mark Holtzhausen - * - */ - - -/** - * Includes - */ -include_once('KT_atom_baseDoc.inc.php'); - - -class KT_atom_serviceDoc extends KT_atom_baseDoc { - - private $baseURI=NULL; - private $service=NULL; - - - public function __construct($baseURI=NULL){ - parent::__construct(); - $this->constructServiceDocumentHeaders(); - $this->baseURI=$baseURI; - } - - private function constructServiceDocumentHeaders(){ - $service=$this->newElement('service'); - $service->appendChild($this->newAttr('xmlns','http://www.w3.org/2007/app')); - $service->appendChild($this->newAttr('xmlns:atom','http://www.w3.org/2005/Atom')); - $this->service=&$service; - $this->DOM->appendChild($this->service); - } - - public function &newWorkspace($title=NULL){ - $ws=$this->newElement('workspace'); - $ws->appendChild($this->newElement('atom:title',$title)); - $this->service->appendChild($ws); - return $ws; - } - - public function &newCollection($url=NULL,$title=NULL,&$ws=NULL){ - $collection=$this->newElement('collection'); - $collection->appendChild($this->newAttr('href',$url)); - $collection->appendChild($this->newElement('atom:title',$title)); - if(isset($ws))$ws->appendChild($collection); - return $collection; - } - - public function &newAccept($docType=NULL,&$collection=NULL){ - if($docType){ - $accept=$this->newElement('accept',$docType); - }else{ - $accept=$this->newElement('accept'); - } - if($collection)$collection->appendChild($accept); - return $accept; - } - - - public function getAPPdoc(){ - return $this->formatXmlString(trim($this->DOM->saveXML())); - } - -} - - - - - - - - -/** - -
'.print_r($children,true).''; - foreach($children as $fullChildName=>$childCollection){ - //$child=$childCollection; - $childName=split(':',$fullChildName); - foreach($childCollection as $child){ - $childParsed=self::parsetag($child,$childName[0],$rootXML); - //$cIndex=count($array[$tagName][$childName]); - $array[$tagName][]=$childParsed; - } - - } - }else{ - $array[$tagName]['value']=(string)$xml; - } - return $array; - } - - private static function hasChildren($xml,$rootXML){ - return count(self::getChildren($xml,$rootXML))>0; - } - - private static function getAttributes($xml,$rootXML){ - $attr=array(); - $namespaces=$rootXML->getNamespaces(true); - foreach($namespaces as $namespace=>$uri){ - $nsAttrs=(array)$xml->attributes($uri); - $nsAttrs=isset($nsAttrs['@attributes'])?$nsAttrs['@attributes']:array(); - foreach($nsAttrs as $nsAttr=>$nsAttrVal){ //TODO: Support for multiple same name tags - $attr[$namespace.':'.$nsAttr]=$nsAttrVal; - } - } - return $attr; - } - - private static function getChildren($xml,$rootXML){ - $children=array(); - $namespaces=$rootXML->getNamespaces(true); - foreach($namespaces as $namespace=>$uri){ - $nsChildren=$xml->children($uri); - foreach($nsChildren as $nsChild){ //TODO: Support for multiple same name tags - $childRealName=$namespace.':'.$nsChild->getName(); - if(!isset($children[$childRealName]))$children[$childRealName]=array(); - if(!is_array($children[$childRealName]))$children[$childRealName]=array(); - $children[$childRealName][]=$nsChild; - } - } - return $children; - } - -} - - - -$xml=' -
'.htmlentities($xml).''; -//echo '
'.print_r($struct,true).''; -//echo '
'.print_r($sxml,true).''; -//cho '
'.print_r(xml2array($xml),true).''; -echo '
'.print_r(xml2array::parse($xml),true).''; - - -//echo http_get_request_headers(); - -?> \ No newline at end of file diff --git a/lib/documentmanagement/DocumentField.inc b/lib/documentmanagement/DocumentField.inc index fc71d96..d35a244 100755 --- a/lib/documentmanagement/DocumentField.inc +++ b/lib/documentmanagement/DocumentField.inc @@ -8,31 +8,31 @@ * Document Management Made Simple * Copyright (C) 2008, 2009 KnowledgeTree Inc. * Portions copyright The Jam Warehouse Software (Pty) Limited - * + * * 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 * Free Software Foundation. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see