Merged in 3.1 (pull request #4703)
Updating branch HOR-1500 with last 3.1 changes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -37,3 +37,4 @@ temp.txt
|
||||
update.sh
|
||||
workflow/public_html/translations/
|
||||
build-prod.zip
|
||||
node_modules
|
||||
|
||||
1
Rakefile
1
Rakefile
@@ -354,7 +354,6 @@ def getJsIncludeFiles
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin.js",
|
||||
|
||||
523
config/build.json
Normal file
523
config/build.json
Normal file
@@ -0,0 +1,523 @@
|
||||
[
|
||||
{
|
||||
"id": "pmui",
|
||||
"description": "Building PMUI library",
|
||||
"steps": [
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/pmUI",
|
||||
"rake_task": "js"
|
||||
},
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/pmUI",
|
||||
"rake_task": "compileTheme[../MichelangeloFE/themes/mafe]"
|
||||
},
|
||||
{
|
||||
"type": "copy",
|
||||
"src_dir": "vendor/colosa/pmUI",
|
||||
"dest_dir": "workflow/public_html/lib",
|
||||
"files": [
|
||||
{
|
||||
"src": "build/js/pmui-0.1.1.js",
|
||||
"dest_dir": "pmUI/",
|
||||
"dest_name": "pmui.min.js"
|
||||
},
|
||||
{
|
||||
"src": "img/**",
|
||||
"dest_dir": "img"
|
||||
},
|
||||
{
|
||||
"src": "libraries/restclient/restclient-min.js",
|
||||
"dest_dir": "js/",
|
||||
"dest_name": "restclient.min.js"
|
||||
},
|
||||
{
|
||||
"src": "themes/mafe/fonts/**/*",
|
||||
"dest_dir": "fonts"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "copy",
|
||||
"src_dir": "vendor/colosa/MichelangeloFE/themes/mafe/build",
|
||||
"dest_dir": "workflow/public_html/lib",
|
||||
"files": [
|
||||
{
|
||||
"src": "pmui-mafe.css",
|
||||
"dest_dir": "pmUI/",
|
||||
"dest_name": "pmui.min.css"
|
||||
},
|
||||
{
|
||||
"src": "images/*",
|
||||
"dest_dir": "css/images/"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pmDynaform",
|
||||
"description": "Building PMDynaform library",
|
||||
"steps": [
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/pmDynaform",
|
||||
"rake_task": "default"
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
"dir": "workflow/public_html/lib/pmdynaform",
|
||||
"operation": "clean"
|
||||
},
|
||||
{
|
||||
"type": "copy",
|
||||
"src_dir": "vendor/colosa/pmDynaform/",
|
||||
"dest_dir": "workflow/public_html/lib/pmdynaform/",
|
||||
"files": [
|
||||
{
|
||||
"src": "build/**",
|
||||
"dest_dir": "build/"
|
||||
},
|
||||
{
|
||||
"src": "libs/**",
|
||||
"dest_dir": "libs/"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "read",
|
||||
"src": "vendor/colosa/pmDynaform/config/templates.json",
|
||||
"variable": "FILES"
|
||||
},
|
||||
{
|
||||
"type": "parse",
|
||||
"data": "%FILES%",
|
||||
"parseTo": "json",
|
||||
"path": "0/files",
|
||||
"variable": "FILES"
|
||||
},
|
||||
{
|
||||
"type": "replace_string",
|
||||
"target": "%FILES%",
|
||||
"replacements": [
|
||||
{
|
||||
"search": "src/templates",
|
||||
"replaceBy": "vendor/colosa/pmDynaform/src/templates"
|
||||
}
|
||||
],
|
||||
"variable": "FILES"
|
||||
},
|
||||
{
|
||||
"type": "concatenate",
|
||||
"files": "%FILES%",
|
||||
"variable": "CONCATENATED"
|
||||
},
|
||||
{
|
||||
"type": "replaceFileContents",
|
||||
"orig_file": "workflow/engine/templates/cases/pmdynaform.html",
|
||||
"dest_dir": "workflow/public_html/lib/pmdynaform/build",
|
||||
"dest_file": "pmdynaform.html",
|
||||
"replacements": [
|
||||
{
|
||||
"search": "###TEMPLATES###",
|
||||
"replaceBy": "%CONCATENATED%"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pmDynaformZip",
|
||||
"description": "Building pmDynaform Zip version...",
|
||||
"steps": [
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/pmDynaform",
|
||||
"rake_task": "mobile"
|
||||
},
|
||||
{
|
||||
"type": "copy",
|
||||
"src_dir": "vendor/colosa/pmDynaform/build-prod-zip/",
|
||||
"dest_dir": "workflow/public_html",
|
||||
"file_mode": 777,
|
||||
"files": [
|
||||
{
|
||||
"src": "build-prod.zip"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "mafe",
|
||||
"description": "Building PM Michelangelo FE",
|
||||
"steps": [
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/MichelangeloFE",
|
||||
"rake_task": "rmdir"
|
||||
},
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/MichelangeloFE",
|
||||
"rake_task": "dir"
|
||||
},
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/MichelangeloFE",
|
||||
"rake_task": "compass"
|
||||
},
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/MichelangeloFE",
|
||||
"rake_task": "compress_js_files"
|
||||
},
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/MichelangeloFE",
|
||||
"rake_task": "compress_app_files"
|
||||
},
|
||||
{
|
||||
"type": "copy",
|
||||
"src_dir": "vendor/colosa/pmDynaform/build-prod-zip/",
|
||||
"dest_dir": "workflow/public_html",
|
||||
"file_mode": 777,
|
||||
"files": [
|
||||
{
|
||||
"src": "build-prod.zip"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "copy",
|
||||
"src_dir": "vendor/colosa/MichelangeloFE/",
|
||||
"dest_dir": "workflow/public_html/lib/",
|
||||
"files": [
|
||||
{
|
||||
"src": "lib/jQueryUI/images/*.png",
|
||||
"dest_dir": "css/images/"
|
||||
},
|
||||
{
|
||||
"src": "build/js/designer.js",
|
||||
"dest_dir": "mafe/",
|
||||
"dest_name": "designer.min.js"
|
||||
},
|
||||
{
|
||||
"src": "build/js/mafe.js",
|
||||
"dest_dir": "mafe/",
|
||||
"dest_name": "mafe.min.js"
|
||||
},
|
||||
{
|
||||
"src": "build/css/mafe.css",
|
||||
"dest_dir": "mafe/",
|
||||
"dest_name": "mafe.min.css"
|
||||
},
|
||||
{
|
||||
"src": "img/*.*",
|
||||
"dest_dir": "img"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "copy",
|
||||
"src_dir": "vendor/colosa/MichelangeloFE/lib",
|
||||
"dest_dir": "workflow/public_html/lib/js/",
|
||||
"files": [
|
||||
{
|
||||
"src": "wz_jsgraphics/wz_jsgraphics.js",
|
||||
"dest_name": "wz_jsgraphics.js"
|
||||
},
|
||||
{
|
||||
"src": "jQuery/jquery-1.10.2.min.js",
|
||||
"dest_name": "jquery-1.10.2.min.js"
|
||||
},
|
||||
{
|
||||
"src": "underscore/underscore-min.js",
|
||||
"dest_name": "underscore-min.js"
|
||||
},
|
||||
{
|
||||
"src": "jQueryUI/jquery-ui-1.10.3.custom.min.js",
|
||||
"dest_name": "jquery-ui-1.10.3.custom.min.js"
|
||||
},
|
||||
{
|
||||
"src": "jQueryLayout/jquery.layout.min.js",
|
||||
"dest_name": "jquery.layout.min.js"
|
||||
},
|
||||
{
|
||||
"src": "modernizr/modernizr.js",
|
||||
"dest_name": "modernizr.js"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "copy",
|
||||
"src_dir": "vendor/colosa/MichelangeloFE/src/formDesigner/img/",
|
||||
"dest_dir": "workflow/public_html/lib/",
|
||||
"files": [
|
||||
{
|
||||
"src": "*",
|
||||
"dest_dir": "img"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "log",
|
||||
"description": "Creating log, hash, and version files...",
|
||||
"steps": [
|
||||
{
|
||||
"type": "exec",
|
||||
"working_dir": "vendor/colosa/pmUI",
|
||||
"command": "git",
|
||||
"arguments": [
|
||||
"rev-parse",
|
||||
"--short",
|
||||
"HEAD"
|
||||
],
|
||||
"variable": "PMUI_HASH"
|
||||
},
|
||||
{
|
||||
"type": "exec",
|
||||
"working_dir": "vendor/colosa/MichelangeloFE",
|
||||
"command": "git",
|
||||
"arguments": [
|
||||
"rev-parse",
|
||||
"--short",
|
||||
"HEAD"
|
||||
],
|
||||
"variable": "MAFE_HASH"
|
||||
},
|
||||
{
|
||||
"type": "exec",
|
||||
"working_dir": "vendor/colosa/pmDynaform",
|
||||
"command": "git",
|
||||
"arguments": [
|
||||
"rev-parse",
|
||||
"--short",
|
||||
"HEAD"
|
||||
],
|
||||
"variable": "PMDYNAFORM_HASH"
|
||||
},
|
||||
{
|
||||
"type": "concatenate",
|
||||
"dest_dir": "workflow/public_html/lib/js",
|
||||
"dest_name": "$[\"mafe-\", \"%PMUI_HASH%\", \"-\", \"%MAFE_HASH%\", \".js\"]$",
|
||||
"files": [
|
||||
"workflow/public_html/lib/js/wz_jsgraphics.js",
|
||||
"workflow/public_html/lib/js/jquery-1.10.2.min.js",
|
||||
"workflow/public_html/lib/js/underscore-min.js",
|
||||
"workflow/public_html/lib/js/jquery-ui-1.10.3.custom.min.js",
|
||||
"workflow/public_html/lib/js/jquery.layout.min.js",
|
||||
"workflow/public_html/lib/js/modernizr.js",
|
||||
"workflow/public_html/lib/js/restclient.min.js",
|
||||
"workflow/public_html/lib/pmUI/pmui.min.js",
|
||||
"workflow/public_html/lib/mafe/mafe.min.js",
|
||||
"workflow/public_html/lib/mafe/designer.min.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce.js",
|
||||
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmSimpleUploader/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmVariablePicker/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/example_dependency/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js",
|
||||
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js",
|
||||
|
||||
"gulliver/js/codemirror/lib/codemirror.js",
|
||||
"gulliver/js/codemirror/addon/hint/show-hint.js",
|
||||
"gulliver/js/codemirror/addon/hint/javascript-hint.js",
|
||||
"gulliver/js/codemirror/addon/hint/sql-hint.js",
|
||||
"gulliver/js/codemirror/addon/hint/php-hint.js",
|
||||
"gulliver/js/codemirror/addon/hint/html-hint.js",
|
||||
"gulliver/js/codemirror/mode/javascript/javascript.js",
|
||||
"gulliver/js/codemirror/addon/edit/matchbrackets.js",
|
||||
"gulliver/js/codemirror/mode/htmlmixed/htmlmixed.js",
|
||||
"gulliver/js/codemirror/mode/xml/xml.js",
|
||||
"gulliver/js/codemirror/mode/css/css.js",
|
||||
"gulliver/js/codemirror/mode/clike/clike.js",
|
||||
"gulliver/js/codemirror/mode/php/php.js",
|
||||
"gulliver/js/codemirror/mode/sql/sql.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "concatenate",
|
||||
"dest_dir": "workflow/public_html/lib/css",
|
||||
"dest_name": "$[\"mafe-\", \"%PMUI_HASH%\", \"-\", \"%MAFE_HASH%\", \".css\"]$",
|
||||
"files": [
|
||||
"gulliver/js/codemirror/lib/codemirror.css",
|
||||
"gulliver/js/codemirror/addon/hint/show-hint.css",
|
||||
"workflow/public_html/lib/pmUI/pmui.min.css",
|
||||
"workflow/public_html/lib/mafe/mafe.min.css"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "write",
|
||||
"contents": "$[\"%PMUI_HASH%\", \"-\", \"%MAFE_HASH%\"]$",
|
||||
"dest_dir": "workflow/public_html/lib/",
|
||||
"dest_name": "buildhash"
|
||||
},
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/pmUI",
|
||||
"rake_task": "version",
|
||||
"variable": "PMUI_VERSION"
|
||||
},
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/MichelangeloFE",
|
||||
"rake_task": "version",
|
||||
"variable": "MAFE_VERSION"
|
||||
},
|
||||
{
|
||||
"type": "rake",
|
||||
"rake_dir": "vendor/colosa/pmDynaform",
|
||||
"rake_task": "version",
|
||||
"variable": "PMDYNAFORM_VERSION"
|
||||
},
|
||||
{
|
||||
"type": "replace_string",
|
||||
"target": "{\"pmui_ver\":\"##PMUI_VERSION##\",\"pmui_hash\":\"##PMUI_HASH##\",\"mafe_ver\":\"##MAFE_VERSION##\",\"mafe_hash\":\"##MAFE_HASH##\",\"pmdynaform_ver\":\"##PMDYNAFORM_VERSION##\",\"pmdynaform_hash\":\"##PMDYNAFORM_HASH##\"}",
|
||||
"replacements": [
|
||||
{
|
||||
"search": "##PMUI_VERSION##",
|
||||
"replaceBy": "%PMUI_VERSION%"
|
||||
},
|
||||
{
|
||||
"search": "##PMUI_HASH##",
|
||||
"replaceBy": "%PMUI_HASH%"
|
||||
},
|
||||
{
|
||||
"search": "##MAFE_VERSION##",
|
||||
"replaceBy": "%MAFE_VERSION%"
|
||||
},
|
||||
{
|
||||
"search": "##MAFE_HASH##",
|
||||
"replaceBy": "%MAFE_HASH%"
|
||||
},
|
||||
{
|
||||
"search": "##PMDYNAFORM_VERSION##",
|
||||
"replaceBy": "%PMDYNAFORM_VERSION%"
|
||||
},
|
||||
{
|
||||
"search": "##PMDYNAFORM_HASH##",
|
||||
"replaceBy": "%PMDYNAFORM_HASH%"
|
||||
}
|
||||
],
|
||||
"variable": "VERSIONS"
|
||||
},
|
||||
{
|
||||
"type": "write",
|
||||
"contents": "%VERSIONS%",
|
||||
"dest_dir": "workflow/public_html/lib/",
|
||||
"dest_name": "versions"
|
||||
},
|
||||
{
|
||||
"type": "exec",
|
||||
"working_dir": "vendor/colosa/pmUI",
|
||||
"command": "git",
|
||||
"arguments": [
|
||||
"log",
|
||||
"-30",
|
||||
"--pretty=[%cr] %h %d %s <%an>",
|
||||
"--no-merges"
|
||||
],
|
||||
"variable": "PMUI_LOG"
|
||||
},
|
||||
{
|
||||
"type": "exec",
|
||||
"working_dir": "vendor/colosa/MichelangeloFE",
|
||||
"command": "git",
|
||||
"arguments": [
|
||||
"log",
|
||||
"-30",
|
||||
"--pretty=[%cr] %h %d %s <%an>",
|
||||
"--no-merges"
|
||||
],
|
||||
"variable": "MAFE_LOG"
|
||||
},
|
||||
{
|
||||
"type": "exec",
|
||||
"working_dir": "vendor/colosa/pmDynaform",
|
||||
"command": "git",
|
||||
"arguments": [
|
||||
"log",
|
||||
"-30",
|
||||
"--pretty=[%cr] %h %d %s <%an>",
|
||||
"--no-merges"
|
||||
],
|
||||
"variable": "PMDYNAFORM_LOG"
|
||||
},
|
||||
{
|
||||
"type": "exec",
|
||||
"working_dir": "./",
|
||||
"command": "git",
|
||||
"arguments": [
|
||||
"log",
|
||||
"-30",
|
||||
"--pretty=[%cr] %h %d %s <%an>",
|
||||
"--no-merges"
|
||||
],
|
||||
"variable": "PM_LOG"
|
||||
},
|
||||
{
|
||||
"type": "write",
|
||||
"contents": "%PMUI_LOG%",
|
||||
"dest_dir": "workflow/public_html/lib/",
|
||||
"dest_name": "lib-pmui.log"
|
||||
},
|
||||
{
|
||||
"type": "write",
|
||||
"contents": "%MAFE_LOG%",
|
||||
"dest_dir": "workflow/public_html/lib/",
|
||||
"dest_name": "lib-mafe.log"
|
||||
},
|
||||
{
|
||||
"type": "write",
|
||||
"contents": "%PMDYNAFORM_LOG%",
|
||||
"dest_dir": "workflow/public_html/lib/",
|
||||
"dest_name": "lib-pmdynaform.log"
|
||||
},
|
||||
{
|
||||
"type": "write",
|
||||
"contents": "%PM_LOG%",
|
||||
"dest_dir": "workflow/public_html/lib/",
|
||||
"dest_name": "processmaker.log"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2619,7 +2619,7 @@ function run_update_plugin_attributes($task, $args)
|
||||
|
||||
echo "Done!\n";
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
error_log( $e->getMessage() . "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2731,7 +2731,7 @@ function run_check_plugin_disabled_code($task, $args)
|
||||
|
||||
echo "Done!\n";
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
error_log( $e->getMessage() . "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
class Bootstrap
|
||||
{
|
||||
const hashFx = 'md5';
|
||||
public static $includeClassPaths = array();
|
||||
public static $includePaths = array();
|
||||
protected $relativeIncludePaths = array();
|
||||
@@ -2967,16 +2968,15 @@ class Bootstrap
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* encryptOld
|
||||
*
|
||||
* @param string $string
|
||||
*
|
||||
* @return md5($string)
|
||||
* @param $string
|
||||
* @return mixed
|
||||
*/
|
||||
public function encryptOld ($string)
|
||||
{
|
||||
return md5($string);
|
||||
$consthashFx = self::hashFx;
|
||||
return $consthashFx($string);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -296,24 +296,6 @@ class DataBaseMaintenance
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* backupData
|
||||
*
|
||||
* @return boolean true or false
|
||||
*/
|
||||
function backupData ()
|
||||
{
|
||||
$aTables = $this->getTablesList();
|
||||
foreach ($aTables as $table) {
|
||||
if ($this->dumpData( $table ) !== false) {
|
||||
printf( "%20s %s %s\n", 'Dump of table:', $table, " in file {$this->outfile}" );
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* restoreAllData
|
||||
*
|
||||
@@ -471,8 +453,10 @@ class DataBaseMaintenance
|
||||
$queries += 1;
|
||||
|
||||
if (! @mysql_query( $query )) {
|
||||
echo mysql_error() . "\n";
|
||||
echo "==>" . $query . "<==\n";
|
||||
$varRes = mysql_error() . "\n";
|
||||
G::outRes( $varRes );
|
||||
$varRes = "==>" . $query . "<==\n";
|
||||
G::outRes( $varRes );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -520,7 +504,9 @@ class DataBaseMaintenance
|
||||
$mysqli->close();
|
||||
} catch (Exception $e) {
|
||||
echo $query;
|
||||
echo $e->getMessage();
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
}
|
||||
}
|
||||
return $queries;
|
||||
@@ -546,7 +532,7 @@ class DataBaseMaintenance
|
||||
}
|
||||
mysql_free_result( $result );
|
||||
} else {
|
||||
echo mysql_error();
|
||||
G::outRes( mysql_error() );
|
||||
}
|
||||
return $tableSchema;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
class G
|
||||
{
|
||||
const hashFx = 'md5';
|
||||
const hashFile = 'md5_file';
|
||||
const hashCrc = 'crc32';
|
||||
public $sessionVar = array(); //SESSION temporary array store.
|
||||
|
||||
/**
|
||||
@@ -5692,7 +5695,8 @@ class G
|
||||
*/
|
||||
public static function encryptOld($string)
|
||||
{
|
||||
return md5($string);
|
||||
$consthashFx = self::hashFx;
|
||||
return $consthashFx($string);
|
||||
}
|
||||
/**
|
||||
* encryptFileOld
|
||||
@@ -5703,7 +5707,8 @@ class G
|
||||
*/
|
||||
public function encryptFileOld ($string)
|
||||
{
|
||||
return md5_file($string);
|
||||
$consthashFx = self::hashFile;
|
||||
return $consthashFx($string);
|
||||
}
|
||||
/**
|
||||
* crc32
|
||||
@@ -5714,7 +5719,8 @@ class G
|
||||
*/
|
||||
public function encryptCrc32 ($string)
|
||||
{
|
||||
return crc32($string);
|
||||
$consthashFx = self::hashCrc;
|
||||
return $consthashFx($string);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -97,7 +97,8 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac
|
||||
G::LoadSystem('inputfilter');
|
||||
$filter = new InputFilter();
|
||||
|
||||
return unlink($filter->validateInput($file,'path'));
|
||||
$sFile=$filter->validateInput($file,'path');
|
||||
return unlink($sFile);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -220,7 +221,8 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac
|
||||
$chmod = 0644; // invalid config or simpletest
|
||||
}
|
||||
$chmod = $chmod & 0666;
|
||||
chmod($filter->validateInput($file, 'path'), $chmod);
|
||||
$sFile = $filter->validateInput($file, 'path');
|
||||
chmod($sFile, $chmod);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -1,245 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* $Id: SQLiteConnection.php,v 1.15 2006/01/17 19:44:41 hlellelid Exp $
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information please see
|
||||
* <http://creole.phpdb.org>.
|
||||
*/
|
||||
|
||||
require_once 'creole/Connection.php';
|
||||
require_once 'creole/common/ConnectionCommon.php';
|
||||
|
||||
/**
|
||||
* SQLite implementation of Connection.
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @author Stig Bakken <ssb@fast.no>
|
||||
* @author Lukas Smith
|
||||
* @version $Revision: 1.15 $
|
||||
* @package creole.drivers.sqlite
|
||||
*/
|
||||
class SQLiteConnection extends ConnectionCommon implements Connection {
|
||||
|
||||
/**
|
||||
* The case to use for SQLite results.
|
||||
* (0=nochange, 1=upper, 2=lower)
|
||||
* This is set in each call to executeQuery() in order to ensure that different
|
||||
* Connections do not overwrite each other's settings
|
||||
*/
|
||||
private $sqliteAssocCase;
|
||||
|
||||
/**
|
||||
* @see Connection::connect()
|
||||
*/
|
||||
function connect($dsninfo, $flags = 0)
|
||||
{
|
||||
if (!extension_loaded('sqlite')) {
|
||||
throw new SQLException('sqlite extension not loaded');
|
||||
}
|
||||
|
||||
$file = $dsninfo['database'];
|
||||
|
||||
$this->dsn = $dsninfo;
|
||||
$this->flags = $flags;
|
||||
|
||||
$persistent = ($flags & Creole::PERSISTENT === Creole::PERSISTENT);
|
||||
|
||||
if (PHP_VERSION == '5.0.4' || PHP_VERSION == '5.0.5') {
|
||||
$nochange = TRUE;
|
||||
} else {
|
||||
$nochange = !(($flags & Creole::COMPAT_ASSOC_LOWER) === Creole::COMPAT_ASSOC_LOWER);
|
||||
}
|
||||
|
||||
if ($nochange) {
|
||||
$this->sqliteAssocCase = 0;
|
||||
} else {
|
||||
$this->sqliteAssocCase = 2;
|
||||
}
|
||||
|
||||
if ($file === null) {
|
||||
throw new SQLException("No SQLite database specified.");
|
||||
}
|
||||
|
||||
$mode = (isset($dsninfo['mode']) && is_numeric($dsninfo['mode'])) ? $dsninfo['mode'] : 0644;
|
||||
|
||||
if ($file != ':memory:') {
|
||||
if (!file_exists($file)) {
|
||||
touch($file);
|
||||
chmod($file, $mode);
|
||||
if (!file_exists($file)) {
|
||||
throw new SQLException("Unable to create SQLite database.");
|
||||
}
|
||||
}
|
||||
if (!is_file($file)) {
|
||||
throw new SQLException("Unable to open SQLite database: not a valid file.");
|
||||
}
|
||||
if (!is_readable($file)) {
|
||||
throw new SQLException("Unable to read SQLite database.");
|
||||
}
|
||||
}
|
||||
|
||||
$connect_function = $persistent ? 'sqlite_popen' : 'sqlite_open';
|
||||
if (!($conn = @$connect_function($file, $mode, $errmsg) )) {
|
||||
throw new SQLException("Unable to connect to SQLite database", $errmsg);
|
||||
}
|
||||
|
||||
$this->dblink = $conn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Connection::getDatabaseInfo()
|
||||
*/
|
||||
public function getDatabaseInfo()
|
||||
{
|
||||
require_once 'creole/drivers/sqlite/metadata/SQLiteDatabaseInfo.php';
|
||||
return new SQLiteDatabaseInfo($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Connection::getIdGenerator()
|
||||
*/
|
||||
public function getIdGenerator()
|
||||
{
|
||||
require_once 'creole/drivers/sqlite/SQLiteIdGenerator.php';
|
||||
return new SQLiteIdGenerator($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Connection::prepareStatement()
|
||||
*/
|
||||
public function prepareStatement($sql)
|
||||
{
|
||||
require_once 'creole/drivers/sqlite/SQLitePreparedStatement.php';
|
||||
return new SQLitePreparedStatement($this, $sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Connection::prepareCall()
|
||||
*/
|
||||
public function prepareCall($sql) {
|
||||
throw new SQLException('SQLite does not support stored procedures using CallableStatement.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Connection::createStatement()
|
||||
*/
|
||||
public function createStatement()
|
||||
{
|
||||
require_once 'creole/drivers/sqlite/SQLiteStatement.php';
|
||||
return new SQLiteStatement($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Connection::close()
|
||||
*/
|
||||
function close()
|
||||
{
|
||||
$ret = @sqlite_close($this->dblink);
|
||||
$this->dblink = null;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Connection::applyLimit()
|
||||
*/
|
||||
public function applyLimit(&$sql, $offset, $limit)
|
||||
{
|
||||
if ( $limit > 0 ) {
|
||||
$sql .= " LIMIT " . $limit . ($offset > 0 ? " OFFSET " . $offset : "");
|
||||
} elseif ( $offset > 0 ) {
|
||||
$sql .= " LIMIT -1 OFFSET " . $offset;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Connection::executeQuery()
|
||||
*/
|
||||
public function executeQuery($sql, $fetchmode = null)
|
||||
{
|
||||
ini_set('sqlite.assoc_case', $this->sqliteAssocCase);
|
||||
$this->lastQuery = $sql;
|
||||
$result = @sqlite_query($this->dblink, $this->lastQuery);
|
||||
if (!$result) {
|
||||
throw new SQLException('Could not execute query', $php_errormsg, $this->lastQuery); //sqlite_error_string(sqlite_last_error($this->dblink))
|
||||
}
|
||||
require_once 'creole/drivers/sqlite/SQLiteResultSet.php';
|
||||
return new SQLiteResultSet($this, $result, $fetchmode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Connection::executeUpdate()
|
||||
*/
|
||||
function executeUpdate($sql)
|
||||
{
|
||||
$this->lastQuery = $sql;
|
||||
$result = @sqlite_query($this->dblink, $this->lastQuery);
|
||||
if (!$result) {
|
||||
throw new SQLException('Could not execute update', $php_errormsg, $this->lastQuery); //sqlite_error_string(sqlite_last_error($this->dblink))
|
||||
}
|
||||
return (int) @sqlite_changes($this->dblink);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start a database transaction.
|
||||
* @throws SQLException
|
||||
* @return void
|
||||
*/
|
||||
protected function beginTrans()
|
||||
{
|
||||
$result = @sqlite_query($this->dblink, 'BEGIN');
|
||||
if (!$result) {
|
||||
throw new SQLException('Could not begin transaction', $php_errormsg); //sqlite_error_string(sqlite_last_error($this->dblink))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Commit the current transaction.
|
||||
* @throws SQLException
|
||||
* @return void
|
||||
*/
|
||||
protected function commitTrans()
|
||||
{
|
||||
$result = @sqlite_query($this->dblink, 'COMMIT');
|
||||
if (!$result) {
|
||||
throw new SQLException('Can not commit transaction', $php_errormsg); // sqlite_error_string(sqlite_last_error($this->dblink))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Roll back (undo) the current transaction.
|
||||
* @throws SQLException
|
||||
* @return void
|
||||
*/
|
||||
protected function rollbackTrans()
|
||||
{
|
||||
$result = @sqlite_query($this->dblink, 'ROLLBACK');
|
||||
if (!$result) {
|
||||
throw new SQLException('Could not rollback transaction', $php_errormsg); // sqlite_error_string(sqlite_last_error($this->dblink))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the number of rows affected by the data manipulation
|
||||
* query.
|
||||
*
|
||||
* @return int Number of rows affected by the last query.
|
||||
*/
|
||||
function getUpdateCount()
|
||||
{
|
||||
return (int) @sqlite_changes($this->dblink);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
|
||||
require_once 'creole/IdGenerator.php';
|
||||
|
||||
/**
|
||||
* SQLite IdGenerator implimenation.
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @version $Revision: 1.4 $
|
||||
* @package creole.drivers.sqlite
|
||||
*/
|
||||
class SQLiteIdGenerator implements IdGenerator {
|
||||
|
||||
/** Connection object that instantiated this class */
|
||||
private $conn;
|
||||
|
||||
/**
|
||||
* Creates a new IdGenerator class, saves passed connection for use
|
||||
* later by getId() method.
|
||||
* @param Connection $conn
|
||||
*/
|
||||
public function __construct(Connection $conn)
|
||||
{
|
||||
$this->conn = $conn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IdGenerator::isBeforeInsert()
|
||||
*/
|
||||
public function isBeforeInsert()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IdGenerator::isAfterInsert()
|
||||
*/
|
||||
public function isAfterInsert()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IdGenerator::getIdMethod()
|
||||
*/
|
||||
public function getIdMethod()
|
||||
{
|
||||
return self::AUTOINCREMENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IdGenerator::getId()
|
||||
*/
|
||||
public function getId($unused = null)
|
||||
{
|
||||
return sqlite_last_insert_rowid($this->conn->getResource());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* $Id: SQLitePreparedStatement.php,v 1.7 2004/03/20 04:16:50 hlellelid Exp $
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information please see
|
||||
* <http://creole.phpdb.org>.
|
||||
*/
|
||||
|
||||
require_once 'creole/PreparedStatement.php';
|
||||
require_once 'creole/common/PreparedStatementCommon.php';
|
||||
|
||||
/**
|
||||
* MySQL subclass for prepared statements.
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @version $Revision: 1.7 $
|
||||
* @package creole.drivers.sqlite
|
||||
*/
|
||||
class SQLitePreparedStatement extends PreparedStatementCommon implements PreparedStatement {
|
||||
|
||||
/**
|
||||
* Quotes string using native sqlite_escape_string() function.
|
||||
* @see ResultSetCommon::escape()
|
||||
*/
|
||||
protected function escape($str)
|
||||
{
|
||||
return sqlite_escape_string($str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies sqlite_udf_encode_binary() to ensure that binary contents will be handled correctly by sqlite.
|
||||
* @see PreparedStatement::setBlob()
|
||||
* @see ResultSet::getBlob()
|
||||
*/
|
||||
function setBlob($paramIndex, $blob)
|
||||
{
|
||||
if ($blob === null) {
|
||||
$this->setNull($paramIndex);
|
||||
} else {
|
||||
// they took magic __toString() out of PHP5.0.0; this sucks
|
||||
if (is_object($blob)) {
|
||||
$blob = $blob->__toString();
|
||||
}
|
||||
$this->boundInVars[$paramIndex] = "'" . sqlite_udf_encode_binary( $blob ) . "'";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* $Id: SQLiteResultSet.php,v 1.9 2004/11/29 13:41:24 micha Exp $
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information please see
|
||||
* <http://creole.phpdb.org>.
|
||||
*/
|
||||
|
||||
require_once 'creole/ResultSet.php';
|
||||
require_once 'creole/common/ResultSetCommon.php';
|
||||
|
||||
/**
|
||||
* SQLite implementation of ResultSet class.
|
||||
*
|
||||
* SQLite supports OFFSET / LIMIT natively; this means that no adjustments or checking
|
||||
* are performed. We will assume that if the lmitSQL() operation failed that an
|
||||
* exception was thrown, and that OFFSET/LIMIT will never be emulated for SQLite.
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @version $Revision: 1.9 $
|
||||
* @package creole.drivers.sqlite
|
||||
*/
|
||||
class SQLiteResultSet extends ResultSetCommon implements ResultSet {
|
||||
|
||||
/**
|
||||
* Gets optimized SQLiteResultSetIterator.
|
||||
* @return SQLiteResultSetIterator
|
||||
*/
|
||||
public function getIterator()
|
||||
{
|
||||
require_once 'creole/drivers/sqlite/SQLiteResultSetIterator.php';
|
||||
return new SQLiteResultSetIterator($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResultSet::seek()
|
||||
*/
|
||||
public function seek($rownum)
|
||||
{
|
||||
// MySQL rows start w/ 0, but this works, because we are
|
||||
// looking to move the position _before_ the next desired position
|
||||
if (!@sqlite_seek($this->result, $rownum)) {
|
||||
return false;
|
||||
}
|
||||
$this->cursorPos = $rownum;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResultSet::next()
|
||||
*/
|
||||
function next()
|
||||
{
|
||||
$this->fields = sqlite_fetch_array($this->result, $this->fetchmode); // (ResultSet::FETCHMODE_NUM = SQLITE_NUM, etc.)
|
||||
if (!$this->fields) {
|
||||
$errno = sqlite_last_error($this->conn->getResource());
|
||||
if (!$errno) {
|
||||
// We've advanced beyond end of recordset.
|
||||
$this->afterLast();
|
||||
return false;
|
||||
} else {
|
||||
throw new SQLException("Error fetching result", sqlite_error_string($errno));
|
||||
}
|
||||
}
|
||||
|
||||
// Advance cursor position
|
||||
$this->cursorPos++;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResultSet::getRecordCount()
|
||||
*/
|
||||
public function getRecordCount()
|
||||
{
|
||||
$rows = @sqlite_num_rows($this->result);
|
||||
if ($rows === null) {
|
||||
throw new SQLException("Error fetching num rows", sqlite_error_string(sqlite_last_error($this->conn->getResource())));
|
||||
}
|
||||
return (int) $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs sqlite_udf_decode_binary on binary data.
|
||||
* @see ResultSet::getBlob()
|
||||
*/
|
||||
public function getBlob($column)
|
||||
{
|
||||
$idx = (is_int($column) ? $column - 1 : $column);
|
||||
if (!array_key_exists($idx, $this->fields)) { throw new SQLException("Invalid resultset column: " . $column); }
|
||||
if ($this->fields[$idx] === null) { return null; }
|
||||
require_once 'creole/util/Blob.php';
|
||||
$b = new Blob();
|
||||
$b->setContents(sqlite_udf_decode_binary($this->fields[$idx]));
|
||||
return $b;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simply empties array as there is no result free method for sqlite.
|
||||
* @see ResultSet::close()
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
$this->fields = array();
|
||||
$this->result = null;
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* $Id: SQLiteResultSetIterator.php,v 1.6 2004/12/03 16:57:54 gamr Exp $
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information please see
|
||||
* <http://creole.phpdb.org>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Optimized iterator for SQLite.
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @version $Revision: 1.6 $
|
||||
* @package creole.drivers.sqlite
|
||||
*/
|
||||
class SQLiteResultSetIterator implements Iterator {
|
||||
|
||||
private $result;
|
||||
private $pos = 0;
|
||||
private $fetchmode;
|
||||
private $row_count;
|
||||
|
||||
/**
|
||||
* Construct the iterator.
|
||||
* @param SQLiteResultSet $rs
|
||||
*/
|
||||
public function __construct(SQLiteResultSet $rs)
|
||||
{
|
||||
$this->result = $rs->getResource();
|
||||
$this->fetchmode = $rs->getFetchmode();
|
||||
$this->row_count = $rs->getRecordCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method actually has no effect, since we do not rewind ResultSet for iteration.
|
||||
*/
|
||||
function rewind()
|
||||
{
|
||||
sqlite_rewind($this->result);
|
||||
}
|
||||
|
||||
function valid()
|
||||
{
|
||||
return ( $this->pos < $this->row_count );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the cursor position. Note that this will not necessarily
|
||||
* be 1 for the first row, since no rewind is performed at beginning
|
||||
* of iteration.
|
||||
* @return int
|
||||
*/
|
||||
function key()
|
||||
{
|
||||
return $this->pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the row (assoc array) at current cursor pos.
|
||||
* @return array
|
||||
*/
|
||||
function current()
|
||||
{
|
||||
return sqlite_fetch_array($this->result, $this->fetchmode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Advances internal cursor pos.
|
||||
*/
|
||||
function next()
|
||||
{
|
||||
$this->pos++;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* $Id: SQLiteStatement.php,v 1.1 2004/02/19 02:49:43 hlellelid Exp $
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information please see
|
||||
* <http://creole.phpdb.org>.
|
||||
*/
|
||||
|
||||
require_once 'creole/Statement.php';
|
||||
require_once 'creole/common/StatementCommon.php';
|
||||
|
||||
/**
|
||||
* SQLite Statement
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @version $Revision: 1.1 $
|
||||
* @package creole.drivers.sqlite
|
||||
*/
|
||||
class SQLiteStatement extends StatementCommon implements Statement {
|
||||
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* $Id: SQLiteTypes.php,v 1.3 2004/03/20 04:16:50 hlellelid Exp $
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information please see
|
||||
* <http://creole.phpdb.org>.
|
||||
*/
|
||||
|
||||
require_once 'creole/CreoleTypes.php';
|
||||
|
||||
/**
|
||||
* MySQL types / type map.
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @version $Revision: 1.3 $
|
||||
* @package creole.drivers.sqlite
|
||||
*/
|
||||
class SQLiteTypes extends CreoleTypes {
|
||||
|
||||
/**
|
||||
* Map some fake SQLite types CreoleTypes.
|
||||
* SQLite is typeless so this is really only for "hint" / readability
|
||||
* purposes.
|
||||
* @var array
|
||||
*/
|
||||
private static $typeMap = array(
|
||||
'tinyint' => CreoleTypes::TINYINT,
|
||||
'smallint' => CreoleTypes::SMALLINT,
|
||||
'mediumint' => CreoleTypes::SMALLINT,
|
||||
'int' => CreoleTypes::INTEGER,
|
||||
'integer' => CreoleTypes::INTEGER,
|
||||
'bigint' => CreoleTypes::BIGINT,
|
||||
'int24' => CreoleTypes::BIGINT,
|
||||
'real' => CreoleTypes::REAL,
|
||||
'float' => CreoleTypes::FLOAT,
|
||||
'decimal' => CreoleTypes::DECIMAL,
|
||||
'numeric' => CreoleTypes::NUMERIC,
|
||||
'double' => CreoleTypes::DOUBLE,
|
||||
'char' => CreoleTypes::CHAR,
|
||||
'varchar' => CreoleTypes::VARCHAR,
|
||||
'date' => CreoleTypes::DATE,
|
||||
'time' => CreoleTypes::TIME,
|
||||
'year' => CreoleTypes::YEAR,
|
||||
'datetime' => CreoleTypes::TIMESTAMP,
|
||||
'timestamp' => CreoleTypes::TIMESTAMP,
|
||||
'tinyblob' => CreoleTypes::BINARY,
|
||||
'blob' => CreoleTypes::VARBINARY,
|
||||
'mediumblob' => CreoleTypes::VARBINARY,
|
||||
'longblob' => CreoleTypes::VARBINARY,
|
||||
'tinytext' => CreoleTypes::VARCHAR,
|
||||
'mediumtext' => CreoleTypes::LONGVARCHAR,
|
||||
'text' => CreoleTypes::LONGVARCHAR,
|
||||
);
|
||||
|
||||
/** Reverse mapping, created on demand. */
|
||||
private static $reverseMap = null;
|
||||
|
||||
/**
|
||||
* This method returns the generic Creole (JDBC-like) type
|
||||
* when given the native db type. If no match is found then we just
|
||||
* return CreoleTypes::TEXT because SQLite is typeless.
|
||||
* @param string $nativeType DB native type (e.g. 'TEXT', 'byetea', etc.).
|
||||
* @return int Creole native type (e.g. CreoleTypes::LONGVARCHAR, CreoleTypes::BINARY, etc.).
|
||||
*/
|
||||
public static function getType($nativeType)
|
||||
{
|
||||
$t = strtolower($nativeType);
|
||||
if (isset(self::$typeMap[$t])) {
|
||||
return self::$typeMap[$t];
|
||||
} else {
|
||||
return CreoleTypes::TEXT; // because SQLite is typeless
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return a native type that corresponds to the specified
|
||||
* Creole (JDBC-like) type. Remember that this is really only for "hint" purposes
|
||||
* as SQLite is typeless.
|
||||
*
|
||||
* If there is more than one matching native type, then the LAST defined
|
||||
* native type will be returned.
|
||||
*
|
||||
* @param int $creoleType
|
||||
* @return string Native type string.
|
||||
*/
|
||||
public static function getNativeType($creoleType)
|
||||
{
|
||||
if (self::$reverseMap === null) {
|
||||
self::$reverseMap = array_flip(self::$typeMap);
|
||||
}
|
||||
return @self::$reverseMap[$creoleType];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* $Id: SQLiteDatabaseInfo.php,v 1.3 2004/03/20 04:16:50 hlellelid Exp $
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information please see
|
||||
* <http://creole.phpdb.org>.
|
||||
*/
|
||||
|
||||
require_once 'creole/metadata/DatabaseInfo.php';
|
||||
|
||||
/**
|
||||
* SQLite implementation of DatabaseInfo.
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @version $Revision: 1.3 $
|
||||
* @package creole.drivers.sqlite.metadata
|
||||
*/
|
||||
class SQLiteDatabaseInfo extends DatabaseInfo {
|
||||
|
||||
/**
|
||||
* @throws SQLException
|
||||
* @return void
|
||||
*/
|
||||
protected function initTables()
|
||||
{
|
||||
include_once 'creole/drivers/sqlite/metadata/SQLiteTableInfo.php';
|
||||
|
||||
$sql = "SELECT name FROM sqlite_master WHERE type='table' UNION ALL SELECT name FROM sqlite_temp_master WHERE type='table' ORDER BY name;";
|
||||
$result = sqlite_query($this->dblink, $sql);
|
||||
|
||||
if (!$result) {
|
||||
throw new SQLException("Could not list tables", sqlite_last_error($this->dblink));
|
||||
}
|
||||
|
||||
while ($row = sqlite_fetch_array($result)) {
|
||||
$this->tables[strtoupper($row[0])] = new SQLiteTableInfo($this, $row[0]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* SQLite does not support sequences.
|
||||
*
|
||||
* @return void
|
||||
* @throws SQLException
|
||||
*/
|
||||
protected function initSequences()
|
||||
{
|
||||
// throw new SQLException("MySQL does not support sequences natively.");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* $Id: SQLiteTableInfo.php,v 1.8 2005/10/18 02:27:50 hlellelid Exp $
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information please see
|
||||
* <http://creole.phpdb.org>.
|
||||
*/
|
||||
|
||||
require_once 'creole/metadata/TableInfo.php';
|
||||
|
||||
/**
|
||||
* MySQL implementation of TableInfo.
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @version $Revision: 1.8 $
|
||||
* @package creole.drivers.sqlite.metadata
|
||||
*/
|
||||
class SQLiteTableInfo extends TableInfo {
|
||||
|
||||
/** Loads the columns for this table. */
|
||||
protected function initColumns()
|
||||
{
|
||||
|
||||
include_once 'creole/metadata/ColumnInfo.php';
|
||||
include_once 'creole/metadata/PrimaryKeyInfo.php';
|
||||
include_once 'creole/drivers/sqlite/SQLiteTypes.php';
|
||||
|
||||
// To get all of the attributes we need, we'll actually do
|
||||
// two separate queries. The first gets names and default values
|
||||
// the second will fill in some more details.
|
||||
|
||||
$sql = "PRAGMA table_info('".$this->name."')";
|
||||
|
||||
$res = sqlite_query($this->conn->getResource(), $sql);
|
||||
|
||||
|
||||
while($row = sqlite_fetch_array($res, SQLITE_ASSOC)) {
|
||||
|
||||
$name = $row['name'];
|
||||
|
||||
$fulltype = $row['type'];
|
||||
$size = null;
|
||||
$precision = null;
|
||||
$scale = null;
|
||||
|
||||
if (preg_match('/^([^\(]+)\(\s*(\d+)\s*,\s*(\d+)\s*\)$/', $fulltype, $matches)) {
|
||||
$type = $matches[1];
|
||||
$precision = $matches[2];
|
||||
$scale = $matches[3]; // aka precision
|
||||
} elseif (preg_match('/^([^\(]+)\(\s*(\d+)\s*\)$/', $fulltype, $matches)) {
|
||||
$type = $matches[1];
|
||||
$size = $matches[2];
|
||||
} else {
|
||||
$type = $fulltype;
|
||||
}
|
||||
// If column is primary key and of type INTEGER, it is auto increment
|
||||
// See: http://sqlite.org/faq.html#q1
|
||||
$is_auto_increment = ($row['pk'] == 1 && $fulltype == 'INTEGER');
|
||||
$not_null = $row['notnull'];
|
||||
$is_nullable = !$not_null;
|
||||
|
||||
$default_val = $row['dflt_value'];
|
||||
|
||||
$this->columns[$name] = new ColumnInfo($this, $name, SQLiteTypes::getType($type), $type, $size, $precision, $scale, $is_nullable, $default_val);
|
||||
|
||||
if (($row['pk'] == 1) || (strtolower($type) == 'integer primary key')) {
|
||||
if ($this->primaryKey === null) {
|
||||
$this->primaryKey = new PrimaryKeyInfo($name);
|
||||
}
|
||||
$this->primaryKey->addColumn($this->columns[ $name ]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->colsLoaded = true;
|
||||
}
|
||||
|
||||
/** Loads the primary key information for this table. */
|
||||
protected function initPrimaryKey()
|
||||
{
|
||||
// columns have to be loaded first
|
||||
if (!$this->colsLoaded) $this->initColumns();
|
||||
// keys are loaded by initColumns() in this class.
|
||||
$this->pkLoaded = true;
|
||||
}
|
||||
|
||||
/** Loads the indexes for this table. */
|
||||
protected function initIndexes() {
|
||||
|
||||
include_once 'creole/metadata/IndexInfo.php';
|
||||
|
||||
// columns have to be loaded first
|
||||
if (!$this->colsLoaded) $this->initColumns();
|
||||
|
||||
$realdocuroot = str_replace( '\\', '/', $_SERVER['DOCUMENT_ROOT'] );
|
||||
$docuroot = explode( '/', $realdocuroot );
|
||||
array_pop( $docuroot );
|
||||
$pathhome = implode( '/', $docuroot ) . '/';
|
||||
array_pop( $docuroot );
|
||||
$pathTrunk = implode( '/', $docuroot ) . '/';
|
||||
require_once($pathTrunk.'gulliver/system/class.inputfilter.php');
|
||||
$filter = new InputFilter();
|
||||
|
||||
$sql = "PRAGMA index_list('".$this->name."')";
|
||||
$res = sqlite_query($this->conn->getResource(), $sql);
|
||||
|
||||
while($row = sqlite_fetch_array($res, SQLITE_ASSOC)) {
|
||||
$name = $row['name'];
|
||||
$name = $filter->validateInput($name);
|
||||
$this->indexes[$name] = new IndexInfo($name);
|
||||
|
||||
// get columns for that index
|
||||
$var = "PRAGMA index_info('".$name."')";
|
||||
$res2 = sqlite_query($this->conn->getResource(), $var);
|
||||
while($row2 = sqlite_fetch_array($res2, SQLITE_ASSOC)) {
|
||||
$colname = $row2['name'];
|
||||
$this->indexes[$name]->addColumn($this->columns[ $colname ]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->indexesLoaded = true;
|
||||
}
|
||||
|
||||
/** Load foreign keys (unsupported in SQLite). */
|
||||
protected function initForeignKeys() {
|
||||
|
||||
// columns have to be loaded first
|
||||
if (!$this->colsLoaded) $this->initColumns();
|
||||
|
||||
// No fkeys in SQLite
|
||||
|
||||
$this->fksLoaded = true;
|
||||
}
|
||||
|
||||
}
|
||||
3
gulliver/thirdparty/html2ps_pdf/box.php
vendored
3
gulliver/thirdparty/html2ps_pdf/box.php
vendored
@@ -494,7 +494,8 @@ function &create_pdf_pseudoelement($root, $pe_type, &$pipeline) {
|
||||
$pipeline);
|
||||
break;
|
||||
default:
|
||||
die('Unsupported "display" value: '.$display_handler->get($css_state->getState()));
|
||||
error_log('Unsupported display value: '.$display_handler->get($css_state->getState()));
|
||||
die;
|
||||
}
|
||||
|
||||
// Check if this box needs a block wrapper (for example, floating button)
|
||||
|
||||
3
gulliver/thirdparty/pear/Net/FTP.php
vendored
3
gulliver/thirdparty/pear/Net/FTP.php
vendored
@@ -1433,7 +1433,8 @@ class Net_FTP extends PEAR
|
||||
}
|
||||
|
||||
if (!@is_dir($filter->validatePath($local_p))) {
|
||||
$res = @mkdir($filter->validatePath($local_p));
|
||||
$sLocal_p = $filter->validatePath($local_p);
|
||||
$res = @mkdir($sLocal_p);
|
||||
if (!$res) {
|
||||
return $this->raiseError("Could not create dir '$local_p'",
|
||||
NET_FTP_ERR_CREATELOCALDIR_FAILED);
|
||||
|
||||
@@ -366,7 +366,7 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
|
||||
$command = $filter->validateInput($command);
|
||||
|
||||
if (empty($options['dry-run'])) {
|
||||
$fp = popen($command, "r");
|
||||
$fp = popen($command, 'r');
|
||||
while ($line = fgets($fp, 1024)) {
|
||||
$this->output .= rtrim($line)."\n";
|
||||
}
|
||||
@@ -429,7 +429,7 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
|
||||
$this->output .= "+ $cmd\n";
|
||||
}
|
||||
if ($execute) {
|
||||
$fp = popen($cmd, "r");
|
||||
$fp = popen($cmd, 'r');
|
||||
while ($line = fgets($fp, 1024)) {
|
||||
$this->output .= rtrim($line)."\n";
|
||||
}
|
||||
@@ -544,7 +544,7 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
|
||||
$input = $this->ui->userDialog($command,
|
||||
array('GnuPG Passphrase'),
|
||||
array('password'));
|
||||
$gpg = popen("gpg --batch --passphrase-fd 0 --armor --detach-sign --output $tmpdir/package.sig $tmpdir/package.xml 2>/dev/null", "w");
|
||||
$gpg = popen("gpg --batch --passphrase-fd 0 --armor --detach-sign --output $tmpdir/package.sig $tmpdir/package.xml 2>/dev/null", 'w');
|
||||
if (!$gpg) {
|
||||
return $this->raiseError("gpg command failed");
|
||||
}
|
||||
|
||||
6
gulliver/thirdparty/phing/Phing.php
vendored
6
gulliver/thirdparty/phing/Phing.php
vendored
@@ -60,6 +60,8 @@ include_once 'phing/system/util/Register.php';
|
||||
*/
|
||||
class Phing {
|
||||
|
||||
const inclDir = 'include_path';
|
||||
|
||||
/** The default build file name */
|
||||
const DEFAULT_BUILD_FILENAME = "build.xml";
|
||||
|
||||
@@ -858,7 +860,9 @@ class Phing {
|
||||
}
|
||||
$firstPath = explode(":", implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)));
|
||||
if (is_dir($firstPath[0])) {
|
||||
ini_set('include_path', implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)));
|
||||
$sPath = implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts))
|
||||
$inclDir = self::inclDir;
|
||||
ini_set($inclDir, $sPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
7
gulliver/thirdparty/phing/lib/Capsule.php
vendored
7
gulliver/thirdparty/phing/lib/Capsule.php
vendored
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
class Capsule {
|
||||
|
||||
const inclDir = 'include_path';
|
||||
/**
|
||||
* Look for templates here (if relative path provided).
|
||||
* @var string
|
||||
@@ -126,11 +127,13 @@ class Capsule {
|
||||
if(strpos($path,":")>0){
|
||||
$firstPath = explode(":", $path);
|
||||
if (is_dir($firstPath[0])) {
|
||||
ini_set('include_path', $path);
|
||||
$inclDir = self::inclDir;
|
||||
ini_set($inclDir, $path);
|
||||
}
|
||||
} else {
|
||||
if(is_dir($path)) {
|
||||
ini_set('include_path', $path);
|
||||
$inclDir = self::inclDir;
|
||||
ini_set($inclDir, $path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ include_once 'phing/types/Path.php';
|
||||
*/
|
||||
class IncludePathTask extends TaskPhing {
|
||||
|
||||
const inclDir = 'include_path';
|
||||
|
||||
/**
|
||||
* Classname of task to register.
|
||||
* This can be a dot-path -- relative to a location on PHP include_path.
|
||||
@@ -109,7 +111,9 @@ class IncludePathTask extends TaskPhing {
|
||||
if ($new_parts) {
|
||||
$this->log("Prepending new include_path components: " . implode(PATH_SEPARATOR, $new_parts), PROJECT_MSG_VERBOSE);
|
||||
if(is_dir(implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)))) {
|
||||
set_include_path(implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)));
|
||||
$sPath = implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts));
|
||||
$inclDir = self::inclDir;
|
||||
ini_set($inclDir, $sPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -526,7 +526,7 @@ class PHPMailer {
|
||||
if ($this->Debugoutput == "error_log") {
|
||||
error_log($str);
|
||||
} else {
|
||||
echo $str;
|
||||
error_log($str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ class Table extends XMLElement implements IDMethod {
|
||||
private $heavyIndexing;
|
||||
private $forReferenceOnly;
|
||||
private $isTree;
|
||||
private $referenceOnly = false;
|
||||
|
||||
/**
|
||||
* Constructs a table object with a name
|
||||
@@ -126,6 +127,7 @@ class Table extends XMLElement implements IDMethod {
|
||||
$this->description = $this->getAttribute("description");
|
||||
$this->enterface = $this->getAttribute("interface"); // sic ('interface' is reserved word)
|
||||
$this->isTree = $this->booleanValue($this->getAttribute("isTree"));
|
||||
$this->referenceOnly = $this->booleanValue($this->getAttribute('referenceOnly'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -972,6 +974,16 @@ class Table extends XMLElement implements IDMethod {
|
||||
$this->isTree = (boolean) $v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get referenceOnly
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getReferenceOnly()
|
||||
{
|
||||
return $this->referenceOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a XML representation of this table.
|
||||
*
|
||||
|
||||
@@ -129,7 +129,7 @@ class PropelOMTask extends AbstractPropelDataModelTask {
|
||||
|
||||
foreach ($database->getTables() as $table) {
|
||||
|
||||
if (!$table->isForReferenceOnly()) {
|
||||
if (!$table->isForReferenceOnly() && $table->getReferenceOnly() === false) {
|
||||
|
||||
$this->log("\t+ " . $table->getName());
|
||||
|
||||
|
||||
3
gulliver/thirdparty/tcpdf/tcpdf.php
vendored
3
gulliver/thirdparty/tcpdf/tcpdf.php
vendored
@@ -18281,7 +18281,7 @@ class TCPDF {
|
||||
* @author Nicola Asuni
|
||||
* @since 4.6.005 (2009-04-24)
|
||||
*/
|
||||
public function setSignature($signing_cert='', $private_key='', $private_key_p='', $extracerts='', $cert_type=2, $info=array()) {
|
||||
public function setSignature($signing_cert='', $private_key='', $private_key_p='tcpdfdemo', $extracerts='', $cert_type=2, $info=array()) {
|
||||
// to create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt
|
||||
// to export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12
|
||||
// to convert pfx certificate to pem: openssl
|
||||
@@ -18293,7 +18293,6 @@ class TCPDF {
|
||||
$this->signature_data = array();
|
||||
if (strlen($signing_cert) == 0) {
|
||||
$signing_cert = 'file://'.dirname(__FILE__).'/tcpdf.crt';
|
||||
$private_key_p = 'tcpdfdemo';
|
||||
}
|
||||
if (strlen($private_key) == 0) {
|
||||
$private_key = $signing_cert;
|
||||
|
||||
483
gulpfile.js
Normal file
483
gulpfile.js
Normal file
@@ -0,0 +1,483 @@
|
||||
const path = require('path'),
|
||||
gchmod = require('gulp-chmod'),
|
||||
CWD = process.cwd()
|
||||
gconcat = require('gulp-concat'),
|
||||
grename = require('gulp-rename'),
|
||||
_ = require('underscore'),
|
||||
gutil = require('gulp-util'),
|
||||
grename = require('gulp-rename'),
|
||||
del = require('del'),
|
||||
exec = require('child_process').exec,
|
||||
execFile = require('child_process').execFile,
|
||||
fs = require('fs'),
|
||||
mkdirp = require('mkdirp'),
|
||||
replace = require('gulp-replace'),
|
||||
isWIN = /^win/.test(process.platform);
|
||||
|
||||
var gulp = require('gulp'),
|
||||
config = require('./config/build.json');
|
||||
|
||||
function getVariableName(varName) {
|
||||
if (/^\%.+\%$/.test(varName)) {
|
||||
return varName.match(/^\%(.+)\%$/)[1];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function getValue(key, vars) {
|
||||
var value = this[key],
|
||||
finalValue = '',
|
||||
variable,
|
||||
i;
|
||||
|
||||
if (typeof value !== 'string') {
|
||||
return value;
|
||||
}
|
||||
|
||||
if (/^\$\[(.*)\]\$$/.test(value)) {
|
||||
value = JSON.parse(value.match(/^\$(\[.*\])\$$/)[1]);
|
||||
|
||||
for (i = 0; i < value.length; i += 1) {
|
||||
if (variable = getVariableName(value[i])) {
|
||||
finalValue += vars[variable];
|
||||
} else {
|
||||
finalValue += value[i];
|
||||
}
|
||||
}
|
||||
} else if (variable = getVariableName(value)) {
|
||||
finalValue = vars[variable];
|
||||
} else {
|
||||
finalValue = value;
|
||||
}
|
||||
|
||||
return finalValue;
|
||||
}
|
||||
|
||||
function executeSequence(sequence, callback) {
|
||||
var current;
|
||||
if (sequence.length) {
|
||||
current = sequence.shift();
|
||||
current(function (err, returnValue) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
executeSequence(sequence, callback);
|
||||
});
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
function validatePath(dir) {
|
||||
// for the sake of security absolute paths are not allowed
|
||||
if (path.isAbsolute(dir)) {
|
||||
throw new Error('Absolute paths are not allowed (used path: ' + dir + ').');
|
||||
}
|
||||
|
||||
// for the sake of security paths directioning outside the current directory are not allowed
|
||||
if (/\.\./.test(path.relative(CWD, dir))) {
|
||||
throw new Error('Paths poiting outside ProcessMaker project are not allowed (used path: ' + dir + ').');
|
||||
}
|
||||
}
|
||||
|
||||
function cleanDirectory(dir, callback) {
|
||||
validatePath(dir);
|
||||
del.sync([
|
||||
dir
|
||||
], {force: true});
|
||||
|
||||
return mkdirp(dir, function (err) {
|
||||
if (typeof callback === 'function') {
|
||||
callback(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function executeRake(cb, vars) {
|
||||
var task = this.rake_task.trim(),
|
||||
dir = this.rake_dir.trim(),
|
||||
that = this;
|
||||
|
||||
validatePath(dir);
|
||||
|
||||
gutil.log(gutil.colors.yellow('Executing Rake ' + (task ? '(task: ' + task + ') ' : '') + 'in ' + this.rake_dir));
|
||||
exec('rake ' + task, {
|
||||
cwd: path.join(__dirname , dir)
|
||||
}, function (err, stdout, stderr) {
|
||||
if (err) {
|
||||
cb(err);
|
||||
} else {
|
||||
if (typeof that.variable === 'string') {
|
||||
vars[that.variable] = stdout.trim();
|
||||
}
|
||||
cb();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function executeCopy(cb) {
|
||||
var src_dir = this['src_dir'] || '',
|
||||
dest_dir = this['dest_dir'] || '',
|
||||
file_mode = this['file_mode'],
|
||||
stream,
|
||||
file,
|
||||
file_dest_dir,
|
||||
file_dest_name,
|
||||
files_length = this['files'].length,
|
||||
origin,
|
||||
destination,
|
||||
i,
|
||||
copied = 0,
|
||||
finishCopy = function () {
|
||||
copied ++;
|
||||
if (copied === files_length) {
|
||||
cb();
|
||||
}
|
||||
},
|
||||
showError = function (e) {
|
||||
gutil.log(gutil.colors.red(e));
|
||||
};
|
||||
|
||||
gutil.log(gutil.colors.yellow('Executing copy of files from ' + src_dir + ' to ' + dest_dir));
|
||||
|
||||
for (i = 0; i < this['files'].length; i += 1) {
|
||||
file = this.files[i];
|
||||
file_dest_dir = file['dest_dir'] || '';
|
||||
file_dest_name = file['dest_name'] || '';
|
||||
|
||||
origin = path.join(src_dir, file['src']);
|
||||
destination = path.join(dest_dir, file_dest_dir);
|
||||
|
||||
validatePath(destination);
|
||||
|
||||
gutil.log('copying: ' + origin + ' to ' + path.join(destination, file_dest_name));
|
||||
|
||||
if (file_dest_name) {
|
||||
stream = gulp.src([origin])
|
||||
.pipe(grename(file_dest_name))
|
||||
.pipe(gulp.dest(destination))
|
||||
.on('error', showError)
|
||||
.on('end', finishCopy);
|
||||
} else {
|
||||
stream = gulp.src([origin])
|
||||
.pipe(gulp.dest(destination))
|
||||
.on('error', showError)
|
||||
.on('end', finishCopy);
|
||||
}
|
||||
|
||||
if (file_mode) {
|
||||
stream.pipe(gchmod(file_mode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function executeDir(cb) {
|
||||
gutil.log(gutil.colors.yellow('Executing directory operation (' + this.operation + ') over ' + this.dir));
|
||||
validatePath(this.dir);
|
||||
switch (this.operation) {
|
||||
case 'clean':
|
||||
cleanDirectory(this.dir, cb);
|
||||
}
|
||||
}
|
||||
|
||||
function executeRead(cb, vars) {
|
||||
var that = this,
|
||||
src = getValue.call(this, 'src', vars);
|
||||
gutil.log(gutil.colors.yellow('Executing read operation from ' + src));
|
||||
|
||||
validatePath(src);
|
||||
|
||||
fs.readFile(src, function (err, data) {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
|
||||
data = data.toString();
|
||||
|
||||
if (typeof that.variable === 'string') {
|
||||
vars[that.variable] = data;
|
||||
}
|
||||
cb();
|
||||
});
|
||||
}
|
||||
|
||||
function executeParse(cb, vars) {
|
||||
var data, path, i;
|
||||
|
||||
gutil.log(gutil.colors.yellow('Executing parsing (' + this.parseTo + ')'));
|
||||
|
||||
switch (this.parseTo) {
|
||||
case 'json':
|
||||
path = this.path || "";
|
||||
path = path.split("/");
|
||||
data = JSON.parse(getValue.call(this, 'data', vars));
|
||||
|
||||
for (i = 0; i < path.length; i += 1) {
|
||||
if (path[i]) {
|
||||
data = data[path[i]];
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (typeof this.variable === 'string') {
|
||||
vars[this.variable] = data;
|
||||
}
|
||||
cb();
|
||||
}
|
||||
|
||||
function executeReplaceFileContents(cb, vars) {
|
||||
var originalFile = getValue.call(this, 'orig_file', vars), // It can be string or array
|
||||
replacements = getValue.call(this, 'replacements', vars),
|
||||
dest_dir = getValue.call(this, 'dest_dir', vars),
|
||||
dest_file = getValue.call(this, 'dest_file', vars),
|
||||
completePath = path.join(dest_dir, dest_file),
|
||||
that = this,
|
||||
replacement,
|
||||
stream,
|
||||
i;
|
||||
|
||||
gutil.log(gutil.colors.yellow('Executing content replacement of file ' + originalFile + ' files to ' + completePath));
|
||||
|
||||
if (!_.isArray(replacements)) {
|
||||
return cb("The replacements must be an array.");
|
||||
}
|
||||
|
||||
validatePath(completePath);
|
||||
|
||||
stream = gulp.src(originalFile);
|
||||
|
||||
for (i = 0; i < replacements.length; i += 1) {
|
||||
replacement = replacements[i];
|
||||
stream = stream.pipe(replace(
|
||||
getValue.call(replacement, 'search', vars),
|
||||
getValue.call(replacement, 'replaceBy', vars)
|
||||
));
|
||||
}
|
||||
|
||||
stream.pipe(grename(dest_file))
|
||||
.pipe(gulp.dest(dest_dir))
|
||||
.on('end', function () {
|
||||
if (typeof this.variable === 'string') {
|
||||
vars[this.variable] = data;
|
||||
}
|
||||
cb();
|
||||
});
|
||||
}
|
||||
|
||||
function executeReplaceString(cb, vars) {
|
||||
var target = getValue.call(this, 'target', vars),
|
||||
replacement,
|
||||
result = [],
|
||||
isString = false,
|
||||
i,
|
||||
j;
|
||||
|
||||
gutil.log(gutil.colors.yellow('Executing replacing'));
|
||||
|
||||
if (typeof target === 'string') {
|
||||
target = [target];
|
||||
isString = true;
|
||||
}
|
||||
|
||||
for (j = 0; j < target.length; j += 1) {
|
||||
result[j] = target[j];
|
||||
for (i = 0; i < this.replacements.length; i += 1) {
|
||||
replacement = this.replacements[i];
|
||||
result[j] = result[j].replace(getValue.call(replacement, "search", vars), getValue.call(replacement, "replaceBy", vars));
|
||||
}
|
||||
}
|
||||
|
||||
result = isString ? result[0] : result;
|
||||
|
||||
if (typeof this.variable === 'string') {
|
||||
vars[this.variable] = result;
|
||||
}
|
||||
cb();
|
||||
}
|
||||
|
||||
function executeConcatenate(cb, vars) {
|
||||
var files = getValue.call(this, 'files', vars),
|
||||
name = getValue.call(this, 'dest_name', vars),
|
||||
completePath,
|
||||
result = "",
|
||||
that = this;
|
||||
|
||||
if (this.dest_dir && this.dest_name) {
|
||||
completePath = path.join(this.dest_dir, name);
|
||||
gutil.log(gutil.colors.yellow('Executing concatenation of ' + files.length + ' files to ' + completePath));
|
||||
validatePath(completePath);
|
||||
gulp.src(files)
|
||||
.on('error', function (err) {
|
||||
cb(err);
|
||||
})
|
||||
.on('data', function (chunk) {
|
||||
result += chunk.contents;
|
||||
})
|
||||
.on('end', function () {
|
||||
if (typeof that.variable === 'string') {
|
||||
vars[that.variable] = result;
|
||||
}
|
||||
cb();
|
||||
})
|
||||
.pipe(gconcat(name))
|
||||
.pipe(gulp.dest(this['dest_dir']));
|
||||
} else {
|
||||
gutil.log(gutil.colors.yellow('Executing concatenation of ' + files.length + ' files'));
|
||||
|
||||
gulp.src(files)
|
||||
.pipe(gconcat('__TMP__'))
|
||||
.on('error', function (err) {
|
||||
cb(err);
|
||||
})
|
||||
.on('data', function (chunk) {
|
||||
result += chunk.contents;
|
||||
})
|
||||
.on('end', function () {
|
||||
if (typeof that.variable === 'string') {
|
||||
vars[that.variable] = result;
|
||||
}
|
||||
cb();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function executeWrite(cb, vars) {
|
||||
var thePath = path.join(
|
||||
getValue.call(this, "dest_dir", vars),
|
||||
getValue.call(this, "dest_name", vars)
|
||||
);
|
||||
|
||||
gutil.log(gutil.colors.yellow('Executing writing of file ' + thePath));
|
||||
|
||||
validatePath(thePath);
|
||||
|
||||
fs.writeFile(thePath, getValue.call(this, "contents", vars), function (err) {
|
||||
cb(err);
|
||||
});
|
||||
}
|
||||
|
||||
function executeExec(cb, vars) {
|
||||
var that = this,
|
||||
working_dir = path.join(this['working_dir']), // This modifies the path to POSIX/Windows
|
||||
args = this['arguments'] || [],
|
||||
opts = {};
|
||||
|
||||
if (isWIN) {
|
||||
opts['shell'] = 'git-bash.exe';
|
||||
}
|
||||
|
||||
gutil.log(gutil.colors.yellow('Executing shell command: ') + gutil.colors.bold.yellow(this['command'] + ' ' + args.join(' ')) + ' in ' + gutil.colors.bold.yellow(working_dir));
|
||||
validatePath(working_dir);
|
||||
|
||||
execFile(this['command'], args, {
|
||||
cwd: working_dir
|
||||
}, function (err, stdout, stderr) {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
if (typeof that.variable === 'string') {
|
||||
vars[that.variable] = stdout.trim();
|
||||
}
|
||||
cb();
|
||||
});
|
||||
}
|
||||
|
||||
function executeVariable(cb, vars) {
|
||||
var varName = getValue.call(this, 'name', vars);
|
||||
gutil.log(gutil.colors.yellow('Executing assignation into variable ' + varName));
|
||||
vars[varName] = getValue.call(this, 'value', vars);
|
||||
cb();
|
||||
}
|
||||
|
||||
function processTask(callback, stepIndex, variables) {
|
||||
var step, fn, i, that = this;
|
||||
|
||||
stepIndex = stepIndex || 0;
|
||||
variables = variables || {};
|
||||
|
||||
if (stepIndex === 0) {
|
||||
gutil.log(gutil.colors.green(this.description));
|
||||
}
|
||||
|
||||
try {
|
||||
if (stepIndex < this.steps.length) {
|
||||
step = this.steps[stepIndex];
|
||||
|
||||
if (step) {
|
||||
switch (step.type) {
|
||||
case 'rake':
|
||||
fn = executeRake;
|
||||
break;
|
||||
case 'copy':
|
||||
fn = executeCopy;
|
||||
break;
|
||||
case 'dir':
|
||||
fn = executeDir;
|
||||
break;
|
||||
case 'read':
|
||||
fn = executeRead;
|
||||
break;
|
||||
case 'parse':
|
||||
fn = executeParse;
|
||||
break;
|
||||
case 'replaceFileContents':
|
||||
fn = executeReplaceFileContents;
|
||||
break;
|
||||
case 'replace_string':
|
||||
fn = executeReplaceString;
|
||||
break;
|
||||
case 'concatenate':
|
||||
fn = executeConcatenate;
|
||||
break;
|
||||
case 'write':
|
||||
fn = executeWrite;
|
||||
break;
|
||||
case 'exec':
|
||||
fn = executeExec;
|
||||
break;
|
||||
case 'variable':
|
||||
fn = executeVariable;
|
||||
}
|
||||
|
||||
if (fn) {
|
||||
fn.call(step, function (err) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
processTask.call(that, callback, stepIndex + 1, variables);
|
||||
}, variables);
|
||||
} else {
|
||||
processTask.call(this, callback, stepIndex + 1, variables);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
gutil.log(gutil.colors.green('DONE!'));
|
||||
callback();
|
||||
}
|
||||
} catch (e) {
|
||||
gutil.log(gutil.colors.red('Error at processing ' + this.id + ', step #' + (stepIndex + 1) + ' (' + step.type + '): ' + e.message));
|
||||
process.exit();
|
||||
}
|
||||
}
|
||||
|
||||
gulp.task('clean', function () {
|
||||
gutil.log(gutil.colors.green('Cleaning directories...'));
|
||||
|
||||
cleanDirectory('workflow/public_html/lib');
|
||||
});
|
||||
|
||||
gulp.task('default', ['clean'], function (cb) {
|
||||
var i, tasks = [];
|
||||
|
||||
gutil.log(gutil.colors.green('Initializing ProcessMaker building...'));
|
||||
|
||||
for (i = 0; i < config.length; i += 1) {
|
||||
tasks.push(_.bind(processTask, config[i]));
|
||||
}
|
||||
executeSequence(tasks, cb);
|
||||
});
|
||||
33
package.json
Normal file
33
package.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "processmaker-builder",
|
||||
"version": "1.0.0",
|
||||
"description": "The gulp task runner for ProcessMaker building",
|
||||
"main": "gulpfile.js",
|
||||
"directories": {
|
||||
"doc": "docs",
|
||||
"test": "tests"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@bitbucket.org/duhnnie/processmaker.git"
|
||||
},
|
||||
"author": "ProcessMaker",
|
||||
"license": "ISC",
|
||||
"homepage": "https://bitbucket.org/duhnnie/processmaker#readme",
|
||||
"devDependencies": {
|
||||
"gulp": "^3.9.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"del": "^2.2.1",
|
||||
"gulp-chmod": "^1.3.0",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-exec": "^2.1.2",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-replace": "^0.5.4",
|
||||
"replace": "^0.3.0",
|
||||
"underscore": "^1.8.3"
|
||||
}
|
||||
}
|
||||
@@ -228,6 +228,8 @@ try {
|
||||
|
||||
echo 'Done!' . "\n";
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . "\n" );
|
||||
}
|
||||
|
||||
|
||||
@@ -313,7 +313,9 @@ try {
|
||||
break;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . "\n" );
|
||||
|
||||
eprintln('Problem in workspace: ' . $workspace . ' it was omitted.', 'red');
|
||||
}
|
||||
@@ -325,7 +327,9 @@ try {
|
||||
unlink(PATH_CORE . 'config' . PATH_SEP . '_databases_.php');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . "\n" );
|
||||
}
|
||||
|
||||
|
||||
@@ -1054,6 +1058,7 @@ function sendNotifications()
|
||||
setExecutionMessage("Resending Notifications");
|
||||
setExecutionResultMessage("PROCESSING");
|
||||
$notQueue = new \NotificationQueue();
|
||||
$notQueue->checkIfCasesOpenForResendingNotification();
|
||||
$notificationsAndroid = $notQueue->loadStatusDeviceType('pending', 'android');
|
||||
if ($notificationsAndroid) {
|
||||
setExecutionMessage("|-- Send Android's Notifications");
|
||||
|
||||
@@ -59,10 +59,10 @@ function run_create_translation($args, $opts)
|
||||
CLI::logging("Updating labels Mafe ...\n");
|
||||
foreach ($workspaces as $workspace) {
|
||||
try {
|
||||
echo "Updating labels for workspace " . pakeColor::colorize($workspace->name, "INFO") . "\n";
|
||||
G::outRes( "Updating labels for workspace " . pakeColor::colorize($workspace->name, "INFO") . "\n" );
|
||||
$translation->generateTransaltionMafe($lang);
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading labels for workspace " . CLI::info($workspace->name) . ": " . CLI::error(G::getErrorMessage($e)) . "\n";
|
||||
G::outRes( "Errors upgrading labels for workspace " . CLI::info($workspace->name) . ": " . CLI::error(G::getErrorMessage($e)) . "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -321,7 +321,7 @@ function run_workspace_upgrade($args, $opts) {
|
||||
$workspace->upgrade($first, false, $workspace->name, $lang);
|
||||
$first = false;
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,11 +335,11 @@ function run_translation_upgrade($args, $opts) {
|
||||
$first = true;
|
||||
foreach ($workspaces as $workspace) {
|
||||
try {
|
||||
echo "Upgrading translation for " . pakeColor::colorize($workspace->name, "INFO") . "\n";
|
||||
G::outRes( "Upgrading translation for " . pakeColor::colorize($workspace->name, "INFO") . "\n" );
|
||||
$workspace->upgradeTranslation($first);
|
||||
$first = false;
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading translation of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "Errors upgrading translation of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -353,14 +353,13 @@ function run_cacheview_upgrade($args, $opts) {
|
||||
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
|
||||
foreach ($workspaces as $workspace) {
|
||||
try {
|
||||
echo "Upgrading cache view for " . pakeColor::colorize($workspace->name, "INFO") . "\n";
|
||||
G::outRes( "Upgrading cache view for " . pakeColor::colorize($workspace->name, "INFO") . "\n" );
|
||||
$workspace->upgradeCacheView(true, false, $lang);
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading cache view of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "Errors upgrading cache view of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function run_plugins_database_upgrade($args, $opts) {
|
||||
$workspaces = get_workspaces_from_args($args);
|
||||
foreach ($workspaces as $workspace) {
|
||||
@@ -441,7 +440,7 @@ function database_upgrade($command, $args) {
|
||||
echo "> OK\n";
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "> Error: ".CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -673,10 +672,10 @@ function run_database_generate_self_service_by_value($args, $opts)
|
||||
$workspace = $value;
|
||||
|
||||
try {
|
||||
echo "Generating the table \"self-service by value\" for " . pakeColor::colorize($workspace->name, "INFO") . "\n";
|
||||
G::outRes( "Generating the table \"self-service by value\" for " . pakeColor::colorize($workspace->name, "INFO") . "\n" );
|
||||
$workspace->appAssignSelfServiceValueTableGenerateData();
|
||||
} catch (Exception $e) {
|
||||
echo "Errors generating the table \"self-service by value\" of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "Errors generating the table \"self-service by value\" of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
@@ -684,7 +683,7 @@ function run_database_generate_self_service_by_value($args, $opts)
|
||||
|
||||
echo "Done!\n";
|
||||
} catch (Exception $e) {
|
||||
echo CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -754,7 +753,7 @@ function run_migrate_itee_to_dummytask($args, $opts){
|
||||
$ws = new workspaceTools($workspace->name);
|
||||
$res = $ws->migrateIteeToDummytask($workspace->name);
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "> Error: ".CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -813,7 +812,7 @@ function run_check_workspace_disabled_code($args, $opts)
|
||||
echo "The workspace it's OK\n\n";
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo "Errors to check disabled code: " . CLI::error($e->getMessage()) . "\n\n";
|
||||
G::outRes( "Errors to check disabled code: " . CLI::error($e->getMessage()) . "\n\n" );
|
||||
}
|
||||
|
||||
$workspace->close();
|
||||
@@ -821,7 +820,7 @@ function run_check_workspace_disabled_code($args, $opts)
|
||||
|
||||
echo "Done!\n";
|
||||
} catch (Exception $e) {
|
||||
echo CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -838,7 +837,7 @@ function migrate_new_cases_lists($command, $args, $opts) {
|
||||
$workspace->migrateList($workspace->name, true, $lang);
|
||||
echo "> List tables are done\n";
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "> Error: ".CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -854,7 +853,7 @@ function migrate_counters($command, $args) {
|
||||
|
||||
echo "> Counters are done\n";
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "> Error: ".CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -872,7 +871,7 @@ function migrate_list_unassigned($command, $args, $opts) {
|
||||
$workspace->regenerateListUnassigned();
|
||||
echo "> Unassigned List is done\n";
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "> Error: ".CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,9 @@ if (! defined ('SYS_SYS')) {
|
||||
processWorkspace ();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
echo $e->getMessage ();
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
eprintln ("Problem in workspace: " . $sObject . ' it was omitted.', 'red');
|
||||
}
|
||||
eprintln ();
|
||||
|
||||
@@ -1537,7 +1537,8 @@ class workspaceTools
|
||||
messages may be displayed during the restore process.") . "\n");
|
||||
|
||||
foreach ($metaFiles as $metaFile) {
|
||||
$metadata = G::json_decode(file_get_contents($metaFile));
|
||||
$metadata = preg_replace('/\r|\n/', '', file_get_contents($metaFile));
|
||||
$metadata = G::json_decode(preg_replace('/\s+/', '', $metadata));
|
||||
if ($metadata->version != 1) {
|
||||
throw new Exception("Backup version {$metadata->version} not supported");
|
||||
}
|
||||
@@ -1578,8 +1579,8 @@ class workspaceTools
|
||||
throw new Exception("We can't overwrite this workspace because it has a different amount of databases. Not only the 'source' but also the 'target' must have the same amount of databases.");
|
||||
}
|
||||
|
||||
if(!$workspace->workspaceExists()){
|
||||
throw new Exception('We can not overwrite this workspace because the workspace '.$workspaceName.' does not exist please check the lower case and upper case.');
|
||||
if (!$workspace->workspaceExists()) {
|
||||
throw new Exception('We can not overwrite this workspace because the workspace ' . $workspaceName . ' does not exist please check the lower case and upper case.');
|
||||
}
|
||||
CLI::logging(CLI::warning("> Workspace $workspaceName already exist, overwriting!") . "\n");
|
||||
} else {
|
||||
@@ -1701,7 +1702,7 @@ class workspaceTools
|
||||
$workspace->upgradeTriggersOfTables(true, $lang);
|
||||
}
|
||||
|
||||
if($pmVersion == '' && strpos(strtoupper($version), 'BRANCH')){
|
||||
if ($pmVersion == '' && strpos(strtoupper($version), 'BRANCH')) {
|
||||
$pmVersion = 'dev-version-backup';
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
break;
|
||||
|
||||
}
|
||||
G::auditLog("CreateCaseScheduler", "Scheduler Name: ".$aData['SCH_NAME'].", Task: ".$aData['TAS_UID'].", Perform this task: ".$perform.", Start Date: ".$aData['SCH_START_DATE'].", End Date: ".$aData['SCH_END_DATE'].", Execution time : ".$aData['SCH_START_TIME']);
|
||||
G::auditLog("CreateCaseScheduler", "Scheduler Name: ".$aData['SCH_NAME'].", Task: ".$aData['TAS_UID'].", Perform this task: ".$perform.", Start Date: ".$aData['SCH_START_DATE'].", End Date: " . ((array_key_exists('SCH_END_DATE', $aData))? $aData['SCH_END_DATE'] : '') . ", Execution time : ".$aData['SCH_START_TIME']);
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -27,6 +27,8 @@ class NotificationQueue extends BaseNotificationQueue
|
||||
$this->setNotData($arrayData['NOT_DATA']);
|
||||
$this->setNotStatus($arrayData['NOT_STATUS']);
|
||||
$this->setNotSendDate('now');
|
||||
$this->setAppUid($arrayData['APP_UID']);
|
||||
$this->setDelIndex($arrayData['DEL_INDEX']);
|
||||
|
||||
if ($this->validate()) {
|
||||
$cnn->begin();
|
||||
@@ -62,6 +64,40 @@ class NotificationQueue extends BaseNotificationQueue
|
||||
return $notifications;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method changes the state of a notification when the case ended before running the cron.php
|
||||
*/
|
||||
public function checkIfCasesOpenForResendingNotification()
|
||||
{
|
||||
$arrayCondition = array();
|
||||
$criteria = new Criteria();
|
||||
$criteria->clearSelectColumns();
|
||||
$criteria->addSelectColumn(NotificationQueuePeer::APP_UID);
|
||||
$criteria->addSelectColumn(NotificationQueuePeer::DEL_INDEX);
|
||||
$criteria->addSelectColumn(NotificationQueuePeer::NOT_UID);
|
||||
$criteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNOTNULL);
|
||||
$arrayCondition[] = array(NotificationQueuePeer::APP_UID, AppDelegationPeer::APP_UID, Criteria::EQUAL);
|
||||
$arrayCondition[] = array(NotificationQueuePeer::DEL_INDEX, AppDelegationPeer::DEL_INDEX, Criteria::EQUAL);
|
||||
$criteria->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||
$rs = NotificationQueuePeer::doSelectRS($criteria);
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$notUID = array();
|
||||
while ($rs->next()) {
|
||||
$row = $rs->getRow();
|
||||
if ($row['DEL_INDEX'] != 0 && $row['APP_UID'] != '') {
|
||||
array_push($notUID, $row['NOT_UID']);
|
||||
}
|
||||
}
|
||||
|
||||
$criteriaSet = new Criteria("workflow");
|
||||
$criteriaSet->add(NotificationQueuePeer::NOT_STATUS, 'sent');
|
||||
$criteriaSet->add(NotificationQueuePeer::NOT_SEND_DATE, date('Y-m-d H:i:s'));
|
||||
$criteriaWhere = new Criteria("workflow");
|
||||
$criteriaWhere->add(NotificationQueuePeer::NOT_UID, $notUID, Criteria::IN);
|
||||
|
||||
\BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
|
||||
}
|
||||
|
||||
public function loadStatusDeviceType($status, $devType)
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -264,7 +264,16 @@ class OutputDocument extends BaseOutputDocument
|
||||
$iResult = $oOutputDocument->save();
|
||||
$oConnection->commit();
|
||||
//Add Audit Log
|
||||
$description = "Output Document Name: ".$aData['OUT_DOC_TITLE'].", Output Document Uid: ".$aData['OUT_DOC_UID'].", Filename generated: ".$aData['OUT_DOC_FILENAME'];
|
||||
$description = 'Output Document Uid: ' . $aData['OUT_DOC_UID'];
|
||||
|
||||
if (array_key_exists('OUT_DOC_TITLE', $aData) && (string)($aData['OUT_DOC_TITLE']) != '') {
|
||||
$description .= ', Output Document Name: ' . $aData['OUT_DOC_TITLE'];
|
||||
}
|
||||
|
||||
if (array_key_exists('OUT_DOC_FILENAME', $aData) && (string)($aData['OUT_DOC_FILENAME']) != '') {
|
||||
$description .= ', Filename generated: ' . $aData['OUT_DOC_FILENAME'];
|
||||
}
|
||||
|
||||
if(!empty($aData['OUT_DOC_DESCRIPTION'])){
|
||||
$description .= ", Description: ".$aData['OUT_DOC_DESCRIPTION'];
|
||||
}
|
||||
@@ -274,12 +283,11 @@ class OutputDocument extends BaseOutputDocument
|
||||
if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){
|
||||
$description .= ", Output Document to Generate: ".$aData['OUT_DOC_GENERATE'];
|
||||
}
|
||||
if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){
|
||||
$pdfSecurity = 'Disabled';
|
||||
}else{
|
||||
$pdfSecurity = 'Enabled';
|
||||
|
||||
if (array_key_exists('OUT_DOC_PDF_SECURITY_ENABLED', $aData) && (string)($aData['OUT_DOC_PDF_SECURITY_ENABLED']) != '') {
|
||||
$description .= ', PDF Security: ' . (((int)($aData['OUT_DOC_PDF_SECURITY_ENABLED']) != 0)? 'Enabled' : 'Disabled');
|
||||
}
|
||||
$description .= ", PDF Security: ".$pdfSecurity;
|
||||
|
||||
if(!empty($aData['OUT_DOC_VERSIONING'])){
|
||||
$description .= ", Enable Versioning: Yes";
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ class ListCompletedMapBuilder
|
||||
|
||||
$tMap->addColumn('APP_CREATE_DATE', 'AppCreateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('APP_FINISH_DATE', 'AppFinishDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
$tMap->addColumn('APP_FINISH_DATE', 'AppFinishDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
|
||||
@@ -79,6 +79,10 @@ class NotificationQueueMapBuilder
|
||||
|
||||
$tMap->addColumn('NOT_SEND_DATE', 'NotSendDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // NotificationQueueMapBuilder
|
||||
|
||||
@@ -55,7 +55,7 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi
|
||||
* The value for the grp_uid field.
|
||||
* @var string
|
||||
*/
|
||||
protected $grp_uid = '';
|
||||
protected $grp_uid;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
@@ -229,7 +229,7 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->grp_uid !== $v || $v === '') {
|
||||
if ($this->grp_uid !== $v) {
|
||||
$this->grp_uid = $v;
|
||||
$this->modifiedColumns[] = AppAssignSelfServiceValuePeer::GRP_UID;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ abstract class BaseAppMessage extends BaseObject implements Persistent
|
||||
* The value for the app_msg_error field.
|
||||
* @var string
|
||||
*/
|
||||
protected $app_msg_error = '';
|
||||
protected $app_msg_error;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
@@ -792,7 +792,7 @@ abstract class BaseAppMessage extends BaseObject implements Persistent
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->app_msg_error !== $v || $v === '') {
|
||||
if ($this->app_msg_error !== $v) {
|
||||
$this->app_msg_error = $v;
|
||||
$this->modifiedColumns[] = AppMessagePeer::APP_MSG_ERROR;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ abstract class BaseCatalog extends BaseObject implements Persistent
|
||||
* The value for the cat_observation field.
|
||||
* @var string
|
||||
*/
|
||||
protected $cat_observation = '';
|
||||
protected $cat_observation;
|
||||
|
||||
/**
|
||||
* The value for the cat_create_date field.
|
||||
@@ -305,7 +305,7 @@ abstract class BaseCatalog extends BaseObject implements Persistent
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->cat_observation !== $v || $v === '') {
|
||||
if ($this->cat_observation !== $v) {
|
||||
$this->cat_observation = $v;
|
||||
$this->modifiedColumns[] = CatalogPeer::CAT_OBSERVATION;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* The value for the del_index field.
|
||||
* @var string
|
||||
* @var int
|
||||
*/
|
||||
protected $del_index = 0;
|
||||
|
||||
@@ -151,7 +151,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
/**
|
||||
* Get the [del_index] column value.
|
||||
*
|
||||
* @return string
|
||||
* @return int
|
||||
*/
|
||||
public function getDelIndex()
|
||||
{
|
||||
@@ -230,7 +230,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAppPreviousUsrUsername()
|
||||
public function getDelPreviousUsrUsername()
|
||||
{
|
||||
|
||||
return $this->del_previous_usr_username;
|
||||
@@ -241,7 +241,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAppPreviousUsrFirstname()
|
||||
public function getDelPreviousUsrFirstname()
|
||||
{
|
||||
|
||||
return $this->del_previous_usr_firstname;
|
||||
@@ -252,7 +252,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAppPreviousUsrLastname()
|
||||
public function getDelPreviousUsrLastname()
|
||||
{
|
||||
|
||||
return $this->del_previous_usr_lastname;
|
||||
@@ -558,7 +558,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setAppPreviousUsrUsername($v)
|
||||
public function setDelPreviousUsrUsername($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
@@ -572,7 +572,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
$this->modifiedColumns[] = ListUnassignedPeer::DEL_PREVIOUS_USR_USERNAME;
|
||||
}
|
||||
|
||||
} // setAppPreviousUsrUsername()
|
||||
} // setDelPreviousUsrUsername()
|
||||
|
||||
/**
|
||||
* Set the value of [del_previous_usr_firstname] column.
|
||||
@@ -580,7 +580,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setAppPreviousUsrFirstname($v)
|
||||
public function setDelPreviousUsrFirstname($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
@@ -594,7 +594,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
$this->modifiedColumns[] = ListUnassignedPeer::DEL_PREVIOUS_USR_FIRSTNAME;
|
||||
}
|
||||
|
||||
} // setAppPreviousUsrFirstname()
|
||||
} // setDelPreviousUsrFirstname()
|
||||
|
||||
/**
|
||||
* Set the value of [del_previous_usr_lastname] column.
|
||||
@@ -602,7 +602,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setAppPreviousUsrLastname($v)
|
||||
public function setDelPreviousUsrLastname($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
@@ -616,7 +616,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
$this->modifiedColumns[] = ListUnassignedPeer::DEL_PREVIOUS_USR_LASTNAME;
|
||||
}
|
||||
|
||||
} // setAppPreviousUsrLastname()
|
||||
} // setDelPreviousUsrLastname()
|
||||
|
||||
/**
|
||||
* Set the value of [app_update_date] column.
|
||||
@@ -1032,13 +1032,13 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
return $this->getAppTasTitle();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getAppPreviousUsrUsername();
|
||||
return $this->getDelPreviousUsrUsername();
|
||||
break;
|
||||
case 9:
|
||||
return $this->getAppPreviousUsrFirstname();
|
||||
return $this->getDelPreviousUsrFirstname();
|
||||
break;
|
||||
case 10:
|
||||
return $this->getAppPreviousUsrLastname();
|
||||
return $this->getDelPreviousUsrLastname();
|
||||
break;
|
||||
case 11:
|
||||
return $this->getAppUpdateDate();
|
||||
@@ -1083,9 +1083,9 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
$keys[5] => $this->getAppTitle(),
|
||||
$keys[6] => $this->getAppProTitle(),
|
||||
$keys[7] => $this->getAppTasTitle(),
|
||||
$keys[8] => $this->getAppPreviousUsrUsername(),
|
||||
$keys[9] => $this->getAppPreviousUsrFirstname(),
|
||||
$keys[10] => $this->getAppPreviousUsrLastname(),
|
||||
$keys[8] => $this->getDelPreviousUsrUsername(),
|
||||
$keys[9] => $this->getDelPreviousUsrFirstname(),
|
||||
$keys[10] => $this->getDelPreviousUsrLastname(),
|
||||
$keys[11] => $this->getAppUpdateDate(),
|
||||
$keys[12] => $this->getDelPreviousUsrUid(),
|
||||
$keys[13] => $this->getDelDelegateDate(),
|
||||
@@ -1147,13 +1147,13 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
$this->setAppTasTitle($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setAppPreviousUsrUsername($value);
|
||||
$this->setDelPreviousUsrUsername($value);
|
||||
break;
|
||||
case 9:
|
||||
$this->setAppPreviousUsrFirstname($value);
|
||||
$this->setDelPreviousUsrFirstname($value);
|
||||
break;
|
||||
case 10:
|
||||
$this->setAppPreviousUsrLastname($value);
|
||||
$this->setDelPreviousUsrLastname($value);
|
||||
break;
|
||||
case 11:
|
||||
$this->setAppUpdateDate($value);
|
||||
@@ -1226,15 +1226,15 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[8], $arr)) {
|
||||
$this->setAppPreviousUsrUsername($arr[$keys[8]]);
|
||||
$this->setDelPreviousUsrUsername($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[9], $arr)) {
|
||||
$this->setAppPreviousUsrFirstname($arr[$keys[9]]);
|
||||
$this->setDelPreviousUsrFirstname($arr[$keys[9]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[10], $arr)) {
|
||||
$this->setAppPreviousUsrLastname($arr[$keys[10]]);
|
||||
$this->setDelPreviousUsrLastname($arr[$keys[10]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[11], $arr)) {
|
||||
@@ -1410,11 +1410,11 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setAppTasTitle($this->app_tas_title);
|
||||
|
||||
$copyObj->setAppPreviousUsrUsername($this->del_previous_usr_username);
|
||||
$copyObj->setDelPreviousUsrUsername($this->del_previous_usr_username);
|
||||
|
||||
$copyObj->setAppPreviousUsrFirstname($this->del_previous_usr_firstname);
|
||||
$copyObj->setDelPreviousUsrFirstname($this->del_previous_usr_firstname);
|
||||
|
||||
$copyObj->setAppPreviousUsrLastname($this->del_previous_usr_lastname);
|
||||
$copyObj->setDelPreviousUsrLastname($this->del_previous_usr_lastname);
|
||||
|
||||
$copyObj->setAppUpdateDate($this->app_update_date);
|
||||
|
||||
@@ -1431,7 +1431,7 @@ abstract class BaseListUnassigned extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setAppUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
$copyObj->setDelIndex(0); // this is a pkey column, so set to default value
|
||||
$copyObj->setDelIndex('0'); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ abstract class BaseListUnassignedPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'DelIndex' => 1, 'TasUid' => 2, 'ProUid' => 3, 'AppNumber' => 4, 'AppTitle' => 5, 'AppProTitle' => 6, 'AppTasTitle' => 7, 'AppPreviousUsrUsername' => 8, 'AppPreviousUsrFirstname' => 9, 'AppPreviousUsrLastname' => 10, 'AppUpdateDate' => 11, 'DelPreviousUsrUid' => 12, 'DelDelegateDate' => 13, 'DelDueDate' => 14, 'DelPriority' => 15, ),
|
||||
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'DelIndex' => 1, 'TasUid' => 2, 'ProUid' => 3, 'AppNumber' => 4, 'AppTitle' => 5, 'AppProTitle' => 6, 'AppTasTitle' => 7, 'DelPreviousUsrUsername' => 8, 'DelPreviousUsrFirstname' => 9, 'DelPreviousUsrLastname' => 10, 'AppUpdateDate' => 11, 'DelPreviousUsrUid' => 12, 'DelDelegateDate' => 13, 'DelDueDate' => 14, 'DelPriority' => 15, ),
|
||||
BasePeer::TYPE_COLNAME => array (ListUnassignedPeer::APP_UID => 0, ListUnassignedPeer::DEL_INDEX => 1, ListUnassignedPeer::TAS_UID => 2, ListUnassignedPeer::PRO_UID => 3, ListUnassignedPeer::APP_NUMBER => 4, ListUnassignedPeer::APP_TITLE => 5, ListUnassignedPeer::APP_PRO_TITLE => 6, ListUnassignedPeer::APP_TAS_TITLE => 7, ListUnassignedPeer::DEL_PREVIOUS_USR_USERNAME => 8, ListUnassignedPeer::DEL_PREVIOUS_USR_FIRSTNAME => 9, ListUnassignedPeer::DEL_PREVIOUS_USR_LASTNAME => 10, ListUnassignedPeer::APP_UPDATE_DATE => 11, ListUnassignedPeer::DEL_PREVIOUS_USR_UID => 12, ListUnassignedPeer::DEL_DELEGATE_DATE => 13, ListUnassignedPeer::DEL_DUE_DATE => 14, ListUnassignedPeer::DEL_PRIORITY => 15, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'DEL_INDEX' => 1, 'TAS_UID' => 2, 'PRO_UID' => 3, 'APP_NUMBER' => 4, 'APP_TITLE' => 5, 'APP_PRO_TITLE' => 6, 'APP_TAS_TITLE' => 7, 'DEL_PREVIOUS_USR_USERNAME' => 8, 'DEL_PREVIOUS_USR_FIRSTNAME' => 9, 'DEL_PREVIOUS_USR_LASTNAME' => 10, 'APP_UPDATE_DATE' => 11, 'DEL_PREVIOUS_USR_UID' => 12, 'DEL_DELEGATE_DATE' => 13, 'DEL_DUE_DATE' => 14, 'DEL_PRIORITY' => 15, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
@@ -595,7 +595,7 @@ abstract class BaseListUnassignedPeer
|
||||
/**
|
||||
* Retrieve object using using composite pkey values.
|
||||
* @param string $app_uid
|
||||
* @param string $del_index
|
||||
* @param int $del_index
|
||||
* @param Connection $con
|
||||
* @return ListUnassigned
|
||||
*/
|
||||
|
||||
@@ -69,6 +69,18 @@ abstract class BaseNotificationQueue extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $not_send_date;
|
||||
|
||||
/**
|
||||
* The value for the app_uid field.
|
||||
* @var string
|
||||
*/
|
||||
protected $app_uid = '';
|
||||
|
||||
/**
|
||||
* The value for the del_index field.
|
||||
* @var int
|
||||
*/
|
||||
protected $del_index = 0;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
@@ -181,6 +193,28 @@ abstract class BaseNotificationQueue extends BaseObject implements Persistent
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [app_uid] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAppUid()
|
||||
{
|
||||
|
||||
return $this->app_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [del_index] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDelIndex()
|
||||
{
|
||||
|
||||
return $this->del_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [not_uid] column.
|
||||
*
|
||||
@@ -342,6 +376,50 @@ abstract class BaseNotificationQueue extends BaseObject implements Persistent
|
||||
|
||||
} // setNotSendDate()
|
||||
|
||||
/**
|
||||
* Set the value of [app_uid] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setAppUid($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->app_uid !== $v || $v === '') {
|
||||
$this->app_uid = $v;
|
||||
$this->modifiedColumns[] = NotificationQueuePeer::APP_UID;
|
||||
}
|
||||
|
||||
} // setAppUid()
|
||||
|
||||
/**
|
||||
* Set the value of [del_index] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setDelIndex($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is integer,
|
||||
// we will cast the input value to an int (if it is not).
|
||||
if ($v !== null && !is_int($v) && is_numeric($v)) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->del_index !== $v || $v === 0) {
|
||||
$this->del_index = $v;
|
||||
$this->modifiedColumns[] = NotificationQueuePeer::DEL_INDEX;
|
||||
}
|
||||
|
||||
} // setDelIndex()
|
||||
|
||||
/**
|
||||
* Hydrates (populates) the object variables with values from the database resultset.
|
||||
*
|
||||
@@ -373,12 +451,16 @@ abstract class BaseNotificationQueue extends BaseObject implements Persistent
|
||||
|
||||
$this->not_send_date = $rs->getTimestamp($startcol + 6, null);
|
||||
|
||||
$this->app_uid = $rs->getString($startcol + 7);
|
||||
|
||||
$this->del_index = $rs->getInt($startcol + 8);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 7; // 7 = NotificationQueuePeer::NUM_COLUMNS - NotificationQueuePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 9; // 9 = NotificationQueuePeer::NUM_COLUMNS - NotificationQueuePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating NotificationQueue object", $e);
|
||||
@@ -603,6 +685,12 @@ abstract class BaseNotificationQueue extends BaseObject implements Persistent
|
||||
case 6:
|
||||
return $this->getNotSendDate();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getAppUid();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getDelIndex();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -630,6 +718,8 @@ abstract class BaseNotificationQueue extends BaseObject implements Persistent
|
||||
$keys[4] => $this->getNotData(),
|
||||
$keys[5] => $this->getNotStatus(),
|
||||
$keys[6] => $this->getNotSendDate(),
|
||||
$keys[7] => $this->getAppUid(),
|
||||
$keys[8] => $this->getDelIndex(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -682,6 +772,12 @@ abstract class BaseNotificationQueue extends BaseObject implements Persistent
|
||||
case 6:
|
||||
$this->setNotSendDate($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setAppUid($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setDelIndex($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -733,6 +829,14 @@ abstract class BaseNotificationQueue extends BaseObject implements Persistent
|
||||
$this->setNotSendDate($arr[$keys[6]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[7], $arr)) {
|
||||
$this->setAppUid($arr[$keys[7]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[8], $arr)) {
|
||||
$this->setDelIndex($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -772,6 +876,14 @@ abstract class BaseNotificationQueue extends BaseObject implements Persistent
|
||||
$criteria->add(NotificationQueuePeer::NOT_SEND_DATE, $this->not_send_date);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(NotificationQueuePeer::APP_UID)) {
|
||||
$criteria->add(NotificationQueuePeer::APP_UID, $this->app_uid);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(NotificationQueuePeer::DEL_INDEX)) {
|
||||
$criteria->add(NotificationQueuePeer::DEL_INDEX, $this->del_index);
|
||||
}
|
||||
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -838,6 +950,10 @@ abstract class BaseNotificationQueue extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNotSendDate($this->not_send_date);
|
||||
|
||||
$copyObj->setAppUid($this->app_uid);
|
||||
|
||||
$copyObj->setDelIndex($this->del_index);
|
||||
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseNotificationQueuePeer
|
||||
const CLASS_DEFAULT = 'classes.model.NotificationQueue';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 7;
|
||||
const NUM_COLUMNS = 9;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -52,6 +52,12 @@ abstract class BaseNotificationQueuePeer
|
||||
/** the column name for the NOT_SEND_DATE field */
|
||||
const NOT_SEND_DATE = 'NOTIFICATION_QUEUE.NOT_SEND_DATE';
|
||||
|
||||
/** the column name for the APP_UID field */
|
||||
const APP_UID = 'NOTIFICATION_QUEUE.APP_UID';
|
||||
|
||||
/** the column name for the DEL_INDEX field */
|
||||
const DEL_INDEX = 'NOTIFICATION_QUEUE.DEL_INDEX';
|
||||
|
||||
/** The PHP to DB Name Mapping */
|
||||
private static $phpNameMap = null;
|
||||
|
||||
@@ -63,10 +69,10 @@ abstract class BaseNotificationQueuePeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('NotUid', 'DevType', 'DevUid', 'NotMsg', 'NotData', 'NotStatus', 'NotSendDate', ),
|
||||
BasePeer::TYPE_COLNAME => array (NotificationQueuePeer::NOT_UID, NotificationQueuePeer::DEV_TYPE, NotificationQueuePeer::DEV_UID, NotificationQueuePeer::NOT_MSG, NotificationQueuePeer::NOT_DATA, NotificationQueuePeer::NOT_STATUS, NotificationQueuePeer::NOT_SEND_DATE, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('NOT_UID', 'DEV_TYPE', 'DEV_UID', 'NOT_MSG', 'NOT_DATA', 'NOT_STATUS', 'NOT_SEND_DATE', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
|
||||
BasePeer::TYPE_PHPNAME => array ('NotUid', 'DevType', 'DevUid', 'NotMsg', 'NotData', 'NotStatus', 'NotSendDate', 'AppUid', 'DelIndex', ),
|
||||
BasePeer::TYPE_COLNAME => array (NotificationQueuePeer::NOT_UID, NotificationQueuePeer::DEV_TYPE, NotificationQueuePeer::DEV_UID, NotificationQueuePeer::NOT_MSG, NotificationQueuePeer::NOT_DATA, NotificationQueuePeer::NOT_STATUS, NotificationQueuePeer::NOT_SEND_DATE, NotificationQueuePeer::APP_UID, NotificationQueuePeer::DEL_INDEX, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('NOT_UID', 'DEV_TYPE', 'DEV_UID', 'NOT_MSG', 'NOT_DATA', 'NOT_STATUS', 'NOT_SEND_DATE', 'APP_UID', 'DEL_INDEX', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -76,10 +82,10 @@ abstract class BaseNotificationQueuePeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('NotUid' => 0, 'DevType' => 1, 'DevUid' => 2, 'NotMsg' => 3, 'NotData' => 4, 'NotStatus' => 5, 'NotSendDate' => 6, ),
|
||||
BasePeer::TYPE_COLNAME => array (NotificationQueuePeer::NOT_UID => 0, NotificationQueuePeer::DEV_TYPE => 1, NotificationQueuePeer::DEV_UID => 2, NotificationQueuePeer::NOT_MSG => 3, NotificationQueuePeer::NOT_DATA => 4, NotificationQueuePeer::NOT_STATUS => 5, NotificationQueuePeer::NOT_SEND_DATE => 6, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('NOT_UID' => 0, 'DEV_TYPE' => 1, 'DEV_UID' => 2, 'NOT_MSG' => 3, 'NOT_DATA' => 4, 'NOT_STATUS' => 5, 'NOT_SEND_DATE' => 6, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
|
||||
BasePeer::TYPE_PHPNAME => array ('NotUid' => 0, 'DevType' => 1, 'DevUid' => 2, 'NotMsg' => 3, 'NotData' => 4, 'NotStatus' => 5, 'NotSendDate' => 6, 'AppUid' => 7, 'DelIndex' => 8, ),
|
||||
BasePeer::TYPE_COLNAME => array (NotificationQueuePeer::NOT_UID => 0, NotificationQueuePeer::DEV_TYPE => 1, NotificationQueuePeer::DEV_UID => 2, NotificationQueuePeer::NOT_MSG => 3, NotificationQueuePeer::NOT_DATA => 4, NotificationQueuePeer::NOT_STATUS => 5, NotificationQueuePeer::NOT_SEND_DATE => 6, NotificationQueuePeer::APP_UID => 7, NotificationQueuePeer::DEL_INDEX => 8, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('NOT_UID' => 0, 'DEV_TYPE' => 1, 'DEV_UID' => 2, 'NOT_MSG' => 3, 'NOT_DATA' => 4, 'NOT_STATUS' => 5, 'NOT_SEND_DATE' => 6, 'APP_UID' => 7, 'DEL_INDEX' => 8, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -194,6 +200,10 @@ abstract class BaseNotificationQueuePeer
|
||||
|
||||
$criteria->addSelectColumn(NotificationQueuePeer::NOT_SEND_DATE);
|
||||
|
||||
$criteria->addSelectColumn(NotificationQueuePeer::APP_UID);
|
||||
|
||||
$criteria->addSelectColumn(NotificationQueuePeer::DEL_INDEX);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(NOTIFICATION_QUEUE.NOT_UID)';
|
||||
|
||||
@@ -250,10 +250,10 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
||||
protected $pro_unit_cost = '';
|
||||
|
||||
/**
|
||||
* The value for the pro_debug field.
|
||||
* The value for the pro_itee field.
|
||||
* @var int
|
||||
*/
|
||||
protected $pro_itee = 1;
|
||||
protected $pro_itee = 0;
|
||||
|
||||
/**
|
||||
* The value for the pro_action_done field.
|
||||
@@ -727,7 +727,7 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
||||
/**
|
||||
* Get the [pro_itee] column value.
|
||||
*
|
||||
* @return string
|
||||
* @return int
|
||||
*/
|
||||
public function getProItee()
|
||||
{
|
||||
@@ -1577,7 +1577,7 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->pro_itee !== $v || $v === 1) {
|
||||
if ($this->pro_itee !== $v || $v === 0) {
|
||||
$this->pro_itee = $v;
|
||||
$this->modifiedColumns[] = ProcessPeer::PRO_ITEE;
|
||||
}
|
||||
@@ -1697,7 +1697,7 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
||||
|
||||
$this->pro_unit_cost = $rs->getString($startcol + 36);
|
||||
|
||||
$this->pro_itee = $rs->getString($startcol + 37);
|
||||
$this->pro_itee = $rs->getInt($startcol + 37);
|
||||
|
||||
$this->pro_action_done = $rs->getString($startcol + 38);
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ abstract class BaseTimerEvent extends BaseObject implements Persistent
|
||||
* The value for the tmrevn_configuration_data field.
|
||||
* @var string
|
||||
*/
|
||||
protected $tmrevn_configuration_data = '';
|
||||
protected $tmrevn_configuration_data;
|
||||
|
||||
/**
|
||||
* The value for the tmrevn_next_run_date field.
|
||||
@@ -611,7 +611,7 @@ abstract class BaseTimerEvent extends BaseObject implements Persistent
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->tmrevn_configuration_data !== $v || $v === '') {
|
||||
if ($this->tmrevn_configuration_data !== $v) {
|
||||
$this->tmrevn_configuration_data = $v;
|
||||
$this->modifiedColumns[] = TimerEventPeer::TMREVN_CONFIGURATION_DATA;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
</index>
|
||||
</table>
|
||||
<table name="APP_SEQUENCE" idMethod="native">
|
||||
<column name="ID" type="INTEGER" required="true" primaryKey="true"/>
|
||||
<column name="ID" type="INTEGER" required="true" primaryKey="true" autoIncrement="true" />
|
||||
</table>
|
||||
<table name="APP_DELEGATION">
|
||||
<vendor type="mysql">
|
||||
@@ -2014,7 +2014,7 @@
|
||||
</vendor>
|
||||
</index>
|
||||
</table>
|
||||
<table name="CASE_CONSOLIDATED">
|
||||
<table name="CASE_CONSOLIDATED" referenceOnly="true">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="CASE_CONSOLIDATED"/>
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
@@ -5378,6 +5378,8 @@
|
||||
<column name="NOT_DATA" type="LONGVARCHAR" required="true" />
|
||||
<column name="NOT_STATUS" type="VARCHAR" size="150" required="true"/>
|
||||
<column name="NOT_SEND_DATE" type="TIMESTAMP" required="true" />
|
||||
<column name="APP_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="DEL_INDEX" type="INTEGER" required="true" default="0"/>
|
||||
<index name="indexNotStatus">
|
||||
<index-column name="NOT_STATUS"/>
|
||||
</index>
|
||||
|
||||
@@ -173,7 +173,9 @@ class Dashboard extends Controller
|
||||
//G::pr($this->pmDashlet->setup( $width ));die;
|
||||
} catch (Exception $error) {
|
||||
//ToDo: Show the error message
|
||||
echo $error->getMessage();
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($error, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2998,6 +2998,8 @@ CREATE TABLE `NOTIFICATION_QUEUE`
|
||||
`NOT_DATA` MEDIUMTEXT NOT NULL,
|
||||
`NOT_STATUS` VARCHAR(150) NOT NULL,
|
||||
`NOT_SEND_DATE` DATETIME NOT NULL,
|
||||
`APP_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
||||
PRIMARY KEY (`NOT_UID`),
|
||||
KEY `indexNotStatus`(`NOT_STATUS`)
|
||||
)ENGINE=InnoDB ;
|
||||
|
||||
@@ -185,6 +185,8 @@ switch ($action) {
|
||||
$oContent->addContent( 'DBS_DESCRIPTION', '', $newid, SYS_LANG, $_POST['desc'] );
|
||||
break;
|
||||
case 'deleteDbConnection':
|
||||
$result = new stdclass();
|
||||
|
||||
try {
|
||||
$oDBSource = new DbSource();
|
||||
$oContent = new Content();
|
||||
@@ -343,8 +345,6 @@ switch ($action) {
|
||||
}
|
||||
break;
|
||||
case 'showEncodes':
|
||||
//G::LoadThirdParty( 'pear/json', 'class.json' );
|
||||
//$oJSON =
|
||||
G::LoadSystem('inputfilter');
|
||||
$filter = new InputFilter();
|
||||
$engine = $_POST['engine'];
|
||||
@@ -352,10 +352,10 @@ switch ($action) {
|
||||
if ($engine != "0") {
|
||||
$dbs = new dbConnections();
|
||||
$var = Bootstrap::json_encode($dbs->getEncondeList($filter->xssFilterHard($engine)));
|
||||
echo $var;
|
||||
G::outRes($var);
|
||||
|
||||
} else {
|
||||
echo '[["0","..."]]';
|
||||
G::outRes('[["0","..."]]');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -49,12 +49,15 @@ try {
|
||||
//refresh dbarray with the last change in outputDocument
|
||||
$oMap = new processMap();
|
||||
$oCriteria = $oMap->getOutputDocumentsCriteria( $fields['PRO_UID'] );
|
||||
|
||||
$result = new stdClass();
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation( 'ID_OUTPUTDOCUMENT_REMOVED' );
|
||||
} catch (Exception $e) {
|
||||
$result = new stdClass();
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
//die($oException->getMessage());
|
||||
}
|
||||
|
||||
print G::json_encode( $result );
|
||||
|
||||
|
||||
@@ -174,7 +174,10 @@ if (isset( $_REQUEST['action'] )) {
|
||||
$varEcho = '{success: true}';
|
||||
G::outRes( $varEcho );
|
||||
} catch (Exception $ex) {
|
||||
echo '{success: false, error: ' . $ex->getMessage() . '}';
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($ex, $token);
|
||||
$resJson = '{success: false, error: ' . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . '}';
|
||||
G::outRes( $resJson );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -993,6 +993,9 @@ try {
|
||||
die($sOutput);
|
||||
}
|
||||
} catch (Exception $oException) {
|
||||
die($oException->getMessage() . "\n" . $oException->getTraceAsString());
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($oException, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,9 @@ if (isset( $_FILES ) && $_FILES["ATTACH_FILE"]["error"] == 0) {
|
||||
}
|
||||
//End plugin
|
||||
} catch (Exception $e) {
|
||||
print ($e->getMessage()) ;
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,12 +92,12 @@ try {
|
||||
switch ((int) $_POST['TU_RELATION']) {
|
||||
case 1:
|
||||
$resh = htmlentities($oTasks->assignUser($_POST['TAS_UID'], $_POST['USR_UID'], $_POST['TU_TYPE']), ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
echo $res;
|
||||
G::outRes($resh);
|
||||
G::auditlog("AssignUserTask","Assign a User to a Task -> ".$_POST['TAS_UID'].' User UID -> '.$_POST['USR_UID']);
|
||||
break;
|
||||
case 2:
|
||||
$resh = htmlentities($oTasks->assignGroup($_POST['TAS_UID'], $_POST['USR_UID'], $_POST['TU_TYPE']), ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
echo $resh;
|
||||
G::outRes($resh);
|
||||
G::auditlog("AssignGroupTask","Assign a Group to a Task -> ".$_POST['TAS_UID'].' User UID -> '.$_POST['USR_UID']);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -302,6 +302,8 @@ class Light
|
||||
$response['caseIndex'] = $aData['INDEX'];
|
||||
$response['caseNumber'] = $aData['CASE_NUMBER'];
|
||||
|
||||
//Log
|
||||
\Bootstrap::registerMonolog('create-case', 200, "Create case", ['application_uid' => $aData['APPLICATION'], 'usr_uid' => $userId], SYS_SYS, 'mobileLogs.log');
|
||||
} catch (Exception $e) {
|
||||
$response['status'] = 'failure';
|
||||
$response['message'] = $e->getMessage();
|
||||
@@ -535,6 +537,9 @@ class Light
|
||||
unset($array['message']);
|
||||
unset($array['timestamp']);
|
||||
}
|
||||
|
||||
//Log
|
||||
\Bootstrap::registerMonolog('route-case', 200, 'Route case', ['application_uid' => $applicationUid, 'usr_uid' => $userUid], SYS_SYS, 'mobileLogs.log');
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
@@ -226,6 +226,8 @@ class NotificationDevice
|
||||
$arrayData['NOT_MSG'] = $message;
|
||||
$arrayData['NOT_DATA'] = serialize($data);
|
||||
$arrayData['NOT_STATUS'] = "pending";
|
||||
$arrayData['APP_UID'] = $appFields['APP_UID'];
|
||||
$arrayData['DEL_INDEX'] = $iNewDelIndex;
|
||||
$notQueue = new \NotificationQueue();
|
||||
$notQueue->create($arrayData);
|
||||
}
|
||||
@@ -237,6 +239,8 @@ class NotificationDevice
|
||||
$arrayData['NOT_MSG'] = $message;
|
||||
$arrayData['NOT_DATA'] = serialize($data);
|
||||
$arrayData['NOT_STATUS'] = "pending";
|
||||
$arrayData['APP_UID'] = $appFields['APP_UID'];
|
||||
$arrayData['DEL_INDEX'] = $iNewDelIndex;
|
||||
$notQueue = new \NotificationQueue();
|
||||
$notQueue->create($arrayData);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace ProcessMaker\BusinessModel\Migrator;
|
||||
|
||||
use ProcessMaker\BusinessModel;
|
||||
/**
|
||||
* The assignment rules migrator class.
|
||||
* The container class that stores the import and export rules for assignment rules.
|
||||
@@ -37,13 +38,22 @@ class AssignmentRulesMigrator implements Importable, Exportable
|
||||
public function import($data, $replace)
|
||||
{
|
||||
try {
|
||||
$workflowTaks = array();
|
||||
$dummyTaskTypes = BusinessModel\Task::getDummyTypes();
|
||||
foreach ($data['tasks'] as $key => $value) {
|
||||
$arrayTaskData = $value;
|
||||
if (!in_array($arrayTaskData["TAS_TYPE"], $dummyTaskTypes)) {
|
||||
$workflowTaks[] = $arrayTaskData;
|
||||
}
|
||||
}
|
||||
|
||||
if ($replace) {
|
||||
$this->processes->createTaskRows($data['tasks']);
|
||||
$this->processes->createTaskRows($workflowTaks);
|
||||
$this->processes->addNewGroupRow($data['groupwfs']);
|
||||
$this->processes->removeTaskUserRows($data['tasks']);
|
||||
$this->processes->createTaskUserRows($data['taskusers']);
|
||||
} else {
|
||||
$this->processes->addNewTaskRows($data['tasks']);
|
||||
$this->processes->addNewTaskRows($workflowTaks);
|
||||
$this->processes->addNewGroupRow($data['groupwfs']);
|
||||
$this->processes->addNewTaskUserRows($data['taskusers']);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace ProcessMaker\BusinessModel\Migrator;
|
||||
|
||||
use ProcessMaker\Project\Adapter;
|
||||
use ProcessMaker\BusinessModel;
|
||||
use Symfony\Component\Config\Definition\Exception\Exception;
|
||||
|
||||
class ProcessDefinitionMigrator implements Importable, Exportable
|
||||
@@ -53,7 +54,15 @@ class ProcessDefinitionMigrator implements Importable, Exportable
|
||||
try {
|
||||
//Workflow elements
|
||||
$this->processes->updateProcessRow($data['workflow']['process']);
|
||||
$this->processes->createTaskRows($data['workflow']['tasks']);
|
||||
$workflowTaks = array();
|
||||
$dummyTaskTypes = BusinessModel\Task::getDummyTypes();
|
||||
foreach ($data['workflow']['tasks'] as $key => $value) {
|
||||
$arrayTaskData = $value;
|
||||
if (!in_array($arrayTaskData["TAS_TYPE"], $dummyTaskTypes)) {
|
||||
$workflowTaks[] = $arrayTaskData;
|
||||
}
|
||||
}
|
||||
$this->processes->createTaskRows($workflowTaks);
|
||||
$this->processes->createLaneRows($data['workflow']['lanes']);
|
||||
$this->processes->createGatewayRows($data['workflow']['gateways']);
|
||||
$this->processes->createStepRows($data['workflow']['steps']);
|
||||
|
||||
@@ -1949,4 +1949,27 @@ class Task
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of Dummy Types
|
||||
*
|
||||
* return array
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public static function getDummyTypes(){
|
||||
$aTypes = array(
|
||||
"GATEWAYTOGATEWAY",
|
||||
"WEBENTRYEVENT",
|
||||
"END-MESSAGE-EVENT",
|
||||
"START-MESSAGE-EVENT",
|
||||
"INTERMEDIATE-THROW-MESSAGE-EVENT",
|
||||
"INTERMEDIATE-CATCH-MESSAGE-EVENT",
|
||||
"START-TIMER-EVENT",
|
||||
"INTERMEDIATE-CATCH-TIMER-EVENT",
|
||||
"END-EMAIL-EVENT",
|
||||
"INTERMEDIATE-THROW-EMAIL-EVENT"
|
||||
);
|
||||
return $aTypes;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,23 +531,11 @@ abstract class Importer
|
||||
|
||||
//Update
|
||||
$workflow = \ProcessMaker\Project\Workflow::load($projectUid);
|
||||
$dummyTaskTypes = \ProcessMaker\BusinessModel\Task::getDummyTypes();
|
||||
|
||||
foreach ($arrayWorkflowTables["tasks"] as $key => $value) {
|
||||
$arrayTaskData = $value;
|
||||
|
||||
if (!in_array($arrayTaskData["TAS_TYPE"], array(
|
||||
"GATEWAYTOGATEWAY",
|
||||
"WEBENTRYEVENT",
|
||||
"END-MESSAGE-EVENT",
|
||||
"START-MESSAGE-EVENT",
|
||||
"INTERMEDIATE-THROW-MESSAGE-EVENT",
|
||||
"INTERMEDIATE-CATCH-MESSAGE-EVENT",
|
||||
"START-TIMER-EVENT",
|
||||
"INTERMEDIATE-CATCH-TIMER-EVENT",
|
||||
"END-EMAIL-EVENT",
|
||||
"INTERMEDIATE-THROW-EMAIL-EVENT"
|
||||
))
|
||||
) {
|
||||
if ( !in_array($arrayTaskData["TAS_TYPE"], $dummyTaskTypes) ) {
|
||||
$result = $workflow->updateTask($arrayTaskData["TAS_UID"], $arrayTaskData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases To Do
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -79,8 +79,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases To Do with paged
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -125,8 +125,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases Draft
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -171,8 +171,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases Draft with paged
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -217,8 +217,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases Participated
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -263,8 +263,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases Participated with paged
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -309,8 +309,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases Unassigned
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -355,8 +355,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases Unassigned with paged
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -401,8 +401,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases Paused
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -447,8 +447,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases Paused with paged
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -493,8 +493,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases Advanced Search
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -551,8 +551,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get list Cases Advanced Search with Paged
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
@@ -862,7 +862,7 @@ class Cases extends Api
|
||||
* @param string $app_uid {@min 1}{@max 32}
|
||||
* @param array $request_data
|
||||
* @param string $dyn_uid {@from path}
|
||||
* @param string $del_index {@from path}
|
||||
* @param int $del_index {@from path}
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
@@ -884,8 +884,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get Case Notes
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $usr_uid {@from path}
|
||||
@@ -934,8 +934,8 @@ class Cases extends Api
|
||||
/**
|
||||
* Get Case Notes with Paged
|
||||
*
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $usr_uid {@from path}
|
||||
|
||||
@@ -84,8 +84,8 @@ class Consolidated extends Api
|
||||
* @param string $tas_uid {@min 1} {@max 32}
|
||||
* @param string $dyn_uid {@min 1} {@max 32}
|
||||
* @param string $pro_uid {@min 1} {@max 32}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -94,7 +94,7 @@ class Consolidated extends Api
|
||||
*
|
||||
* @url GET /cases/:tas_uid/:dyn_uid/:pro_uid
|
||||
*/
|
||||
public function doGetCasesConsolidated($tas_uid, $dyn_uid, $pro_uid, $start = '', $limit = '', $search = '')
|
||||
public function doGetCasesConsolidated($tas_uid, $dyn_uid, $pro_uid, $start = 0, $limit = 0, $search = '')
|
||||
{
|
||||
try {
|
||||
$usr_uid = $this->getUserId();
|
||||
@@ -135,7 +135,7 @@ class Consolidated extends Api
|
||||
*
|
||||
* @param string $app_uid {@min 1} {@max 32}
|
||||
* @param string $app_number
|
||||
* @param string $del_index
|
||||
* @param int $del_index
|
||||
* @param string $field_grid
|
||||
* @param string $field_grid_val
|
||||
* @return array
|
||||
|
||||
@@ -1264,8 +1264,8 @@ class Light extends Api
|
||||
* Get Case Notes
|
||||
*
|
||||
* @param string $app_uid {@min 1}{@max 32}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $usr_uid {@from path}
|
||||
@@ -1535,7 +1535,7 @@ class Light extends Api
|
||||
* @param string $app_uid {@min 1}{@max 32}
|
||||
* @param array $request_data
|
||||
* @param string $dyn_uid {@from path}
|
||||
* @param string $del_index {@from path}
|
||||
* @param int $del_index {@from path}
|
||||
*
|
||||
* @url PUT /:app_uid/variable
|
||||
*/
|
||||
|
||||
@@ -28,10 +28,10 @@ class Lists extends Api
|
||||
/**
|
||||
* Get list Inbox
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param boolean $count {@from path}
|
||||
* @param boolean $paged {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
@@ -137,10 +137,10 @@ class Lists extends Api
|
||||
/**
|
||||
* Get list Participated Last
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param boolean $count {@from path}
|
||||
* @param boolean $paged {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
@@ -243,10 +243,10 @@ class Lists extends Api
|
||||
/**
|
||||
* Get list Participated History
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param boolean $count {@from path}
|
||||
* @param boolean $paged {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
@@ -350,10 +350,10 @@ class Lists extends Api
|
||||
/**
|
||||
* Get list Paused
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param boolean $count {@from path}
|
||||
* @param boolean $paged {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
@@ -456,10 +456,10 @@ class Lists extends Api
|
||||
/**
|
||||
* Get list Canceled
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param boolean $count {@from path}
|
||||
* @param boolean $paged {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
@@ -561,10 +561,10 @@ class Lists extends Api
|
||||
/**
|
||||
* Get List Completed
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param boolean $count {@from path}
|
||||
* @param boolean $paged {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
@@ -666,10 +666,10 @@ class Lists extends Api
|
||||
/**
|
||||
* Get List Completed
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param boolean $count {@from path}
|
||||
* @param boolean $paged {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
@@ -770,10 +770,10 @@ class Lists extends Api
|
||||
/**
|
||||
* Get list Unassigned
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param boolean $count {@from path}
|
||||
* @param boolean $paged {@from path}
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
|
||||
Reference in New Issue
Block a user