Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #113 #93

Open
wants to merge 425 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
425 commits
Select commit Hold shift + click to select a range
3b83bc6
Update formit utility snippets to use the new chunk names
joeke Mar 24, 2017
de2631c
Add pdo getChunk method
joeke Mar 24, 2017
a7c6578
Update all the getChunk calls to use the new chunk names + update con…
joeke Mar 24, 2017
2d4f5ec
Update changelog
joeke Mar 24, 2017
8ba80b1
Update changelog + fix coding standards in fistateoptions file
joeke Mar 26, 2017
320406c
Add encryption_type field to tables resolver
joeke Mar 26, 2017
53c3014
Add setupoptions and stercextra resolvers
joeke Mar 26, 2017
14cc9b8
Update config + add new transport zip
joeke Mar 26, 2017
453ff4e
Update setupoptions resolver + add new transport zip
joeke Mar 26, 2017
d4fbe1f
Update table resolver + setupoptions resolver + add new transport zip
joeke Mar 26, 2017
3f52b78
Add check to FormItSaveForm to store filename when files are posted
joeke Mar 29, 2017
de012e9
[in progress] Saving posted files to tmp directory to allow rememberi…
joeke Apr 11, 2017
6ce2bfa
Add todo for removing saved files
joeke Apr 11, 2017
a3da160
Update readme.md
gpsietzema Apr 12, 2017
5d6cb65
Add method_exists check to plugin to prevent 500 errors when method n…
joeke Apr 13, 2017
4f337ba
Merge branch 'develop' of https://github.com/Sterc/FormIt into develop
joeke Apr 13, 2017
dd1d866
Update changelog
joeke Apr 13, 2017
35d2082
[in progress] Add checks for encryption methods
joeke Apr 18, 2017
beb89d1
Add more checks for encryption methods
joeke Apr 19, 2017
b047e62
Add filetype/filesize check to file upload function + remove old file…
joeke Apr 21, 2017
338078d
Add check for allowFiles and update changelog + config
joeke Apr 21, 2017
e0b2363
Set correct placeholders from FILES array when uploading file
joeke Apr 23, 2017
863f0da
Remove logging of file upload errors to prevent unnecessary logging w…
joeke Apr 24, 2017
e5bd13a
Merge branch 'develop' into limit-country-option
joeke Apr 24, 2017
5eb3d86
Merge pull request #123 from gadgetto/limit-country-option
joeke Apr 24, 2017
b609acf
Update changelog + fix coding standards
joeke Apr 24, 2017
6bbcf4f
Add missing property + fix coding standards
joeke Apr 24, 2017
8327e20
Update temporary saving of files to allow for multiple file upload fi…
joeke Apr 24, 2017
90a54c9
Release 3.0.1
gpsietzema Apr 25, 2017
bec543d
Fix openssl check
joeke Apr 25, 2017
975d11f
Release 3.0.1
gpsietzema Apr 25, 2017
98bf8d5
Fix form encryption when formEncrypt parameter is enabled
joeke Apr 26, 2017
7abe4e7
Fix migrate processor + grid getlist to check decrypted values for co…
joeke Apr 26, 2017
426469f
Fix grid to show error when decrypting encrypted forms fails
joeke Apr 26, 2017
052c899
Update build config + changelog + add new transport zip
joeke Apr 26, 2017
dbc811c
Fix form export for PHP 7
May 17, 2017
9874df9
Add property ‘saveTmpFiles’ to allow/disallow saving submitted files …
joeke May 30, 2017
3306401
Added Spanish Lexicons
gborjon Aug 18, 2017
4c72875
Remove list() for better PHP compatibility
joeke Aug 30, 2017
6b2c207
Fix some coding standards and PHP7 issues
joeke Sep 4, 2017
d063635
Fix PHP7 by-reference errors
joeke Sep 4, 2017
a4fbd70
Fix PHP7 issue with deprecated ereg() function, replacing with preg_r…
joeke Sep 4, 2017
8149a53
Update changelog
joeke Sep 5, 2017
4fbc586
Increase precision on FormItForm ip field for IPV6
joeke Sep 5, 2017
5d76390
Remove checkListPermission from FormItForm export
joeke Sep 5, 2017
bde24e2
Optimize FormItSaveForm export class
joeke Sep 5, 2017
dbdd7e3
Add property to control if files are added as attachment to sent emails.
joeke Sep 5, 2017
334d94a
Correct Email Validation
BobRay Sep 14, 2017
9e622b5
Fix problem with array values in mail chunks #139
Jako Sep 29, 2017
8dbb05f
Merge pull request #140 from Jako/fix-array-values
joeke Oct 2, 2017
cb2451d
Merge pull request #138 from BobRay/patch-1
joeke Oct 2, 2017
dfc3540
Merge pull request #134 from gborjon/spanish_lexicons
joeke Oct 2, 2017
79dbe0c
Adding the filters specified in prepareQueryBeforeCount method to the…
joeke Oct 2, 2017
5294777
Getting checkbox values for email
MrRoco Oct 23, 2017
7e6c0a0
Add "Form Name" as a default key/column
kctech Feb 13, 2018
4f2c635
Completed the German translation
enigmatic-user Feb 17, 2018
28241a8
Add new classes and composer
Mar 22, 2018
10c1e93
Add autoloader and restructure new classes
Mar 22, 2018
7e7b428
Refactor snippets to use getService + fix some coding standards
joeke Mar 22, 2018
acf8b8c
Merge branch 'formit-4' of https://github.com/Sterc/FormIt into formit-4
joeke Mar 22, 2018
460a98a
Move request class functions
Mar 22, 2018
558623d
Move dictionary class functions
Mar 22, 2018
1ff3297
Move hook class functions
Mar 22, 2018
5a9cfb0
Refactor fivalidator.class.php
joeke Mar 22, 2018
7017572
Merge branch 'formit-4' of https://github.com/Sterc/FormIt into formit-4
joeke Mar 22, 2018
c821f26
Minor tweaks
Mar 22, 2018
79e7371
Refactor modules
joeke Mar 22, 2018
d5392cf
Move stopforumspam class functions
Mar 22, 2018
074df6f
Update stopforumspam api url
Mar 22, 2018
6a11b16
Refactor stopforumspam and recaptcha classes
joeke Mar 22, 2018
e443c3b
Merge branch 'formit-4' of https://github.com/Sterc/FormIt into formit-4
joeke Mar 22, 2018
374119b
Remove loadclass from spam function in hook class
Mar 22, 2018
21db54f
Fix class instance in Module
joeke Mar 22, 2018
5dcb08d
Merge branch 'formit-4' of https://github.com/Sterc/FormIt into formit-4
joeke Mar 22, 2018
c7a2b22
Add helper functions for hooks/preHooks
joeke Mar 26, 2018
4c5e903
Add helper functions for all the Formit base parameters
joeke Mar 26, 2018
1a2a3f2
Remove scalar type hints for PHP5 compatibility
joeke Mar 26, 2018
b97109a
Add helper for validate param + add method for collecting all formit …
joeke Mar 27, 2018
bbadbf1
Move the email hook to separate class + reference it in the main Hook…
joeke Mar 27, 2018
c3a564e
Fix some coding standards
joeke Mar 28, 2018
c1a5499
Move the FormItAutoResponder hook to separate class
joeke Mar 28, 2018
dc6d1b4
finish autoresponder + fix some php warnings/errors
joeke Mar 28, 2018
1714e33
Add FormItSaveForm hook to separate class
joeke Mar 28, 2018
be504ab
Move redirect hook to separate class
joeke Mar 28, 2018
23513f3
Move spam and math hooks to separate classes
joeke Mar 28, 2018
5c9cd67
Refactor Recaptcha classes
joeke Mar 28, 2018
29b7549
Remove recaptcha method from main Hook class
joeke Mar 28, 2018
78dffd1
Add helper functions for email, autoresponder and saveform hook prope…
joeke Mar 28, 2018
c5b574f
Fix php-doc indentation
joeke Mar 29, 2018
677c71a
Add transport zips + updated config
joeke Mar 29, 2018
f8c0640
Email output update for PHP 7.1 - Fixing #148
pmh1 Apr 2, 2018
2278a4e
Add processForm method and new beta transport zip
joeke Apr 4, 2018
55cf42e
Rename return message key + fix if check
joeke Apr 11, 2018
3583cdb
Remove travis yaml file
joeke Apr 11, 2018
e78cfed
Update config, remove FormitAutoresponder + FormitSaveform snippets, …
joeke Apr 11, 2018
6cb5bc0
Merge pull request #129 from Sterc/fix-export-php-7
joeke Apr 16, 2018
b92b0a1
Merge pull request #149 from kctech/patch-1
joeke Apr 16, 2018
88eace0
Merge pull request #150 from enigmatic-user/german_translation
joeke Apr 16, 2018
e341c5c
Merge pull request #156 from pmh1/email-php71-148
joeke Apr 16, 2018
c9f7b77
Merge commit '6cb5bc0c0cd9c33a4a8d9f149609746ba979271e' into formit-4
joeke Apr 16, 2018
dd1faf2
Merge commit 'b92b0a1428f76676b3e64b6abdd24b11d6c21a39' into formit-4
joeke Apr 16, 2018
a4255da
Merge commit '88eace0d8922e449a9c079475ba8abba7019caf7' into formit-4
joeke Apr 16, 2018
718f46e
Add PR's from develop + update changelog + add new transport zip
joeke Apr 16, 2018
93be3ca
Merge branch 'formit-4' into develop
joeke Apr 16, 2018
02bdff2
Issue https://github.com/Sterc/FormIt/issues/154 but without encrypti…
wax100 Apr 17, 2018
7208682
Return 3 beta zip
wax100 Apr 17, 2018
c250508
Fix modx log calls to prevent errors + update changelog
joeke Apr 18, 2018
ec9d110
update changelog
joeke Apr 18, 2018
dc8a181
Allow empty isDate, :required should be used to prevent blank field.
Apr 19, 2018
2424477
Fixed formatting.
Apr 19, 2018
df401bf
Fix hasHook function to get correct hookname
joeke Apr 23, 2018
b6e2679
Delete leftover formitautoresponder + formitsaveform snippet files
joeke Apr 23, 2018
e701471
Fix modx log calls to prevent errors + update changelog
joeke Apr 18, 2018
ddb2bbe
update changelog
joeke Apr 18, 2018
2fafb84
Fix hasHook function to get correct hookname
joeke Apr 23, 2018
1d6d819
Delete leftover formitautoresponder + formitsaveform snippet files
joeke Apr 23, 2018
7e1e8dd
Moving hasHook / getHookName methods to main Formit class
joeke Apr 24, 2018
0be5082
Remove commented code, set storeAttachments property to false by defa…
joeke Apr 24, 2018
6e97d4b
.
wax100 Apr 24, 2018
62aff2c
Add encrypting of saved files
wax100 Apr 25, 2018
db88ca5
Fix merge conflict + convert dynamic field var to normal var
joeke Apr 25, 2018
7964ecc
Fix typo
joeke Apr 25, 2018
8bc0eb7
Encrypting the name of the file
wax100 Apr 26, 2018
2cb2f2e
Fix bug with multiple FormIt calls on one page
joeke Apr 29, 2018
75b96c0
Fix storeAttachments & formEncrypt params work
wax100 Apr 30, 2018
233899a
Merge branch 'wax100-issue-154' into develop
joeke May 1, 2018
393eb9d
Merge pull request #164 from JoshuaLuckers/develop
joeke May 1, 2018
2c7cc07
Fix some psr2 coding standards + phpdoc
joeke May 1, 2018
f1f5dd1
Add option to specify csv delimiter for export
joeke May 1, 2018
2ff8829
Fix setting redirectParams variable (#165)
joeke May 1, 2018
6c39302
Update changelog + add transport packages
joeke May 1, 2018
b5388a4
Save fieldnames with storefiles function
MrRoco May 2, 2018
fa8a9c8
Added option for cleaning up forms for GDPR compliance
May 29, 2018
90d759e
Dutch translations
May 29, 2018
771a70a
Fix for missing System Setting
BertKooij May 30, 2018
34c1dfe
Fix for default value System Setting
Jun 1, 2018
8681fd5
Fix for error while installing
Jun 1, 2018
221f4be
Merge pull request #176 from CensusNL/Dutch-translations
gpsietzema Jun 6, 2018
43d46f8
Merge pull request #172 from Sterc/fieldnames-savefile
gpsietzema Jun 6, 2018
051e61a
Moved cron to assets directory
Jun 6, 2018
7b49320
Merge pull request #175 from CensusNL/GDPR-clean-up
gpsietzema Jun 6, 2018
29936e4
Updated to 4.1.0
gpsietzema Jun 6, 2018
beec568
Bug on strpos
lokamaya Jul 25, 2018
45d6baf
Merge pull request #182 from lokamaya/patch-2
MrRoco Oct 18, 2018
f2730ef
Update snippet.formitloadsavedform.php
Nov 11, 2018
a5755b2
New version
Dec 4, 2018
8236f9e
FormIt 4.1.1-pl
gpsietzema Dec 4, 2018
54031be
Merge pull request #1 from Sterc/develop
kristk Dec 4, 2018
f1efb52
Fix reference to the addError method
kristk Dec 4, 2018
a3f4169
Cast xml result to string
kristk Dec 4, 2018
8f63505
Fix Swedish translations
kristk Dec 4, 2018
83dc6fb
Fix English translation
kristk Dec 4, 2018
f6bfa38
Missing definition of $spamFields
MrRoco Dec 14, 2018
9c7980c
Merge pull request #191 from kristk/develop
MrRoco Dec 14, 2018
2a259c6
Merge pull request #189 from devlanda/patch-1
MrRoco Dec 14, 2018
a08533d
Release formit 4.1.2
MrRoco Dec 14, 2018
cafbf15
FormIt 4.2.0
Feb 15, 2019
5906330
FormIt 4.2.0
Feb 15, 2019
73d875b
Remove .DS_Store files
Feb 15, 2019
f91cce8
FormIt 4.2.1
Feb 15, 2019
890fcd5
Added russian translate
webinmd Mar 29, 2019
8810a03
Added russian translate
webinmd Mar 29, 2019
4a6e1bb
Fix update issue with fields
MrRoco Apr 12, 2019
c8231c5
Fix form migrations
MrRoco Apr 19, 2019
0061512
Add back the possibility to export all forms
JoshuaLuckers May 29, 2019
60f4271
remove php notice message
intersel Jun 24, 2019
25e62d2
Update readme.md
gpsietzema Jul 2, 2019
26e3831
Fix path to clean processor for cronjob
bennyb Sep 24, 2019
7357b7d
Add three properties to the email hook
Jako Oct 19, 2019
0eb71f9
Update getlist.class.php
andronex Nov 1, 2019
fa800c9
Adds support for UTF-8 encoding when exporting
Ibochkarev Dec 13, 2019
29db345
Add issues, feature requests, PR templates
Ibochkarev Dec 14, 2019
daec946
Minor update README.md
Ibochkarev Dec 14, 2019
c1355e7
Merge pull request #210 from JoshuaLuckers/develop
gpsietzema Dec 23, 2019
0206ebf
Merge pull request #223 from Ibochkarev/readme
Jan 3, 2020
47b84a6
Merge pull request #215 from bennyb/fix-cron-clean-path
Jan 3, 2020
edfc705
Merge pull request #208 from webinmd/develop
Jan 3, 2020
6d91955
Add paging to form select for export
Jan 3, 2020
c69bd4b
Merge pull request #225 from Sterc/devlanda-patch-1
Jan 3, 2020
a1795ae
Merge pull request #216 from Jako/emailselect
Jan 3, 2020
abdde83
Fix #218
Jan 3, 2020
6a9c7fa
Merge pull request #226 from Sterc/devlanda-patch-2
Jan 3, 2020
56fd13d
Release FormIt v4.2.4
Jan 3, 2020
bc09d80
Update bug_report.md
Ibochkarev Jan 3, 2020
09c9771
Update feature_request.md
Ibochkarev Jan 3, 2020
3988a2f
Merge pull request #227 from Sterc/release-formIt-v4.2.4
Jan 3, 2020
c96fd6c
Merge pull request #222 from Ibochkarev/pr-templates
Jan 6, 2020
212cbff
Small change, 'FormIt'
Jan 6, 2020
d7d1797
Small change, 'FormIt'
Jan 6, 2020
c9d0b8f
Fix link to website
Jan 6, 2020
cce434f
Merge pull request #212 from intersel/patch-1
Jan 10, 2020
318f644
Revert "Add emailSelect... properties to the email hook"
Jan 10, 2020
805c691
Merge pull request #228 from Sterc/revert-216-emailselect
Jan 10, 2020
e791422
FormIt 4.2.4
Jan 10, 2020
15076dc
Credits in changelog
Jan 10, 2020
8ac0b58
Add three properties to the email hook
Jako Jan 10, 2020
26ec080
Merge pull request #229 from Jako/emailselect
Jan 10, 2020
4e4cbbc
FormIt 4.2.5
Jan 10, 2020
aceaf1a
Fix Dutch lexicons
Jan 16, 2020
5d110e0
Call to a member function isError() on string
wax100 Jan 29, 2020
87f339a
Small fix to display all forms in a combo.
Oetzie Jan 30, 2020
f615117
Put the limit in the query
Jako Mar 10, 2020
4f357be
Don't reset $modx->mail
Jako Jul 3, 2020
a550757
Change the stopforumspam api url
Jako Jul 21, 2020
11f85da
Added Ukrainian lexicon. Some changes in the Russian lexicon and mino…
rolecs Nov 29, 2020
dd9b194
Update autoloader, based on Composer 1.10.19
Mark-H Jan 20, 2021
4b017b2
Merge pull request #221 from Ibochkarev/patch-1
joeke Jan 22, 2021
b451ba9
Merge pull request #236 from Jako/patch-1
joeke Jan 22, 2021
5c6484a
Merge pull request #240 from Jako/patch-2
joeke Jan 22, 2021
94c6596
Merge pull request #242 from rolecs/develop
joeke Jan 22, 2021
d61c96d
Merge pull request #243 from Mark-H/update-autoloader
joeke Jan 22, 2021
9fb6104
Add database back to build config
joeke Jan 22, 2021
de51f81
FormIt 4.2.6
joeke Jan 22, 2021
745562c
new RU translations for country and state lists
ant-tar Mar 24, 2021
cedc534
Fix for MODX3
Jako May 17, 2021
b33db94
IT translation for country list
kinaz Nov 24, 2021
520eaaa
Merge pull request #219 from andronex/develop
ilyautkin Nov 30, 2021
94b23a0
Type conversion for server_offset_time
ilyautkin Nov 30, 2021
eed13b6
Merge pull request #230 from Sterc/wax100-patch-1
ilyautkin Nov 30, 2021
09d94ee
Merge pull request #245 from ant-tar/develop
ilyautkin Nov 30, 2021
1de5e6a
Merge pull request #257 from kinaz/develop
ilyautkin Nov 30, 2021
985787a
Merge pull request #248 from Jako/patch-3
ilyautkin Nov 30, 2021
cdb0047
Fix empty request for StopForumSpam
ilyautkin Nov 30, 2021
95e4f4c
Merge pull request #247 from Jako/patch-1
ilyautkin Nov 30, 2021
ea06b1c
Release 4.2.7
ilyautkin Nov 30, 2021
ae302e2
Feature: Multi Page Form Support
Dec 1, 2021
21a6635
fix(math hook): undefined variable $operator error
gitrequests Jan 5, 2022
688c0b7
Fix for multiple checked boxes/multiselect on FormItLoadSavedForm
smaddock Mar 26, 2022
2694ec5
Fix missing parsing for formalicious
MrRoco May 16, 2022
24a0224
Change modRest to http client
bYemma Jun 25, 2022
9cc0dc7
Add second line after namespace
bYemma Jun 25, 2022
13fe6eb
Merge pull request #268 from bYemma/develop
joeke Aug 18, 2022
f2a88c1
Add ID of the form to the export csv file
jdaehne Nov 10, 2022
79a117a
Fix Argument 2 must be of type string
Jako Dec 2, 2022
49d5abf
Fix PHP warning: Undefined array key
Ibochkarev Dec 5, 2022
9bfe5a2
Fix error SELECT list is not in GROUP BY clause
Ibochkarev Dec 16, 2022
dcd5974
Set tmp cleanup via system setting
MrRoco Jan 24, 2024
6f39a19
Merge pull request #281 from Ibochkarev/fix-278
MrRoco Feb 10, 2024
3e33d53
Merge pull request #280 from Ibochkarev/fix-277
MrRoco Feb 10, 2024
3ff68a4
Merge pull request #279 from Jako/patch-1
MrRoco Feb 10, 2024
b632179
Merge pull request #275 from jdaehne/patch-1
MrRoco Feb 10, 2024
7f16ea2
Merge pull request #264 from smaddock/ischecked-fix
MrRoco Feb 10, 2024
2f3ead4
Merge pull request #261 from gitrequests/patch-1
MrRoco Feb 10, 2024
9a56fea
Merge pull request #259 from smg6511/feature-multistep-post
MrRoco Feb 10, 2024
44c8a9f
Fix issue 271 for loading chunks via PDO
MrRoco Feb 10, 2024
3768b99
Merge pull request #289 from Sterc/issue-271
MrRoco Feb 10, 2024
2d7fe07
Update default
MrRoco Feb 10, 2024
8d9f91f
Set allowFiles to false per default
MrRoco Feb 10, 2024
0a7d70c
Add formAction handling for formalicious\
MrRoco Apr 30, 2024
6a23338
Add error handling & changelog
MrRoco Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help us improve FormIt
---

## Bug report

### Summary

Quick summary what's this issue about.

### Step to reproduce

How to reproduce the issue, including custom code if needed.

### Observed behavior

How it behaved after following steps above.

### Expected behavior

How it should behave after following steps above.

### Environment

Apache/NGINX and version, MySQL version, browser, etc. Any relevant information.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea that makes FormIt
---

## Feature request

### Summary

Quick summary what's this feature request about.

### Why is it needed?

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

### Suggested solution(s)

A clear and concise description of what you want to happen.

### Related issue(s)/PR(s)

Let us know if this is related to any issue/pull request.
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### What does it do?
Describe the technical changes you did.

### Why is it needed?
Describe the issue you are solving.

### Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request (see https://github.com/blog/1506-closing-issues-via-pull-requests)
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
_build/build.config.php
config.core.php
.idea
.DS_Store

core/components/formit/test/properties.inc.php
core/components/formit/test/config.inc.php

assets/components/formit/*.log
assets/components/formit/tmp

_packages/*.*
!_packages/.gitignore
!_packages/*.zip
File renamed without changes.
File renamed without changes.
40 changes: 37 additions & 3 deletions _build/build.transport.php → _build/_archive/build.transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/* set package defines */
define('PKG_ABBR','formit');
define('PKG_NAME','FormIt');
define('PKG_VERSION','2.2.0');
define('PKG_VERSION','4.0.0');
define('PKG_RELEASE','pl');

/* override with your own defines here (see build.config.sample.php) */
Expand Down Expand Up @@ -66,7 +66,7 @@
$modx->loadClass('transport.modPackageBuilder','',false, true);
$builder = new modPackageBuilder($modx);
$builder->createPackage(PKG_ABBR,PKG_VERSION,PKG_RELEASE);
$builder->registerNamespace(PKG_ABBR,false,true,'{core_path}components/'.PKG_ABBR.'/');
$builder->registerNamespace(PKG_ABBR,false,true,'{core_path}components/'.PKG_ABBR.'/','{assets_path}components/'.PKG_ABBR.'/');

/* create category */
$category= $modx->newObject('modCategory');
Expand Down Expand Up @@ -122,6 +122,10 @@
'source' => $sources['source_core'],
'target' => "return MODX_CORE_PATH . 'components/';",
));
$vehicle->resolve('file',array(
'source' => $sources['source_assets'],
'target' => "return MODX_ASSETS_PATH . 'components/';",
));
$builder->putVehicle($vehicle);

/* load system settings */
Expand All @@ -139,6 +143,36 @@
$modx->log(modX::LOG_LEVEL_INFO,'Packaged in '.count($settings).' system settings.'); flush();
unset($settings,$setting,$attributes);

/* load menu */
$menu = include $sources['data'].'transport.menu.php';
if (empty($menu)) {
$modx->log(modX::LOG_LEVEL_ERROR,'Could not package in menu.');
} else {
$vehicle= $builder->createVehicle($menu,array (
xPDOTransport::PRESERVE_KEYS => true,
xPDOTransport::UPDATE_OBJECT => true,
xPDOTransport::UNIQUE_KEY => 'text',
xPDOTransport::RELATED_OBJECTS => true,
xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array (
'Action' => array (
xPDOTransport::PRESERVE_KEYS => false,
xPDOTransport::UPDATE_OBJECT => true,
xPDOTransport::UNIQUE_KEY => array ('namespace','controller'),
),
),
));
$modx->log(modX::LOG_LEVEL_INFO,'Adding in PHP resolvers...');
$vehicle->resolve('php',array(
'source' => $sources['resolvers'] . 'resolve.tables.php',
));
// $vehicle->resolve('php',array(
// 'source' => $sources['resolvers'] . 'resolve.paths.php',
// ));
$builder->putVehicle($vehicle);
$modx->log(modX::LOG_LEVEL_INFO,'Packaged in menu.');
}
unset($vehicle,$menu);

/* now pack in the license file, readme and setup options */
$builder->setPackageAttributes(array(
'license' => file_get_contents($sources['docs'] . 'license.txt'),
Expand All @@ -157,4 +191,4 @@

$modx->log(modX::LOG_LEVEL_INFO,"\n<br />Package Built.<br />\nExecution time: {$totalTime}\n");

exit ();
exit ();
Loading