Medco
INACT for Medco, version 3. One of the big five. Medco ran INACT v2 before, and the v3 fork carries the history of that upgrade.
At a glance
| Jira | INA28, INACT Medco Upgrade. Clones from INA27 are common. |
| INA05 INACT Instance value | Medco. Medco Bangkanai is a separate value and a separate repository. |
| Repository | binari-digital/ina-medco-v3 |
| Encrypted twin | binari-digital/ina-medco-v3-encrypted |
| INARTS GitLab | inact/inact-medco-v3. Only the encrypted twin is pushed there, not the plain repository. |
| Permanent branches on origin | main, staging, development. Only development and main deploy. |
| Database | SQL Server |
| Production | The client's own Linux server, no internet access. Releases are uploaded as a zip. |
| Staging | none |
| Dev (QA) | inact-medco-v3-encrypted.bdt.dev and inact-medco-v3-encrypted-testable.bdt.dev on the Lab box |
| Previous version | binari-digital/ina-medco-v2 |
TODO: production SQL Server version.
Repositories and remotes
Unlike the other instances, Medco pushes only the encrypted twin to INARTS. The plain repository lives on GitHub alone. The encrypted twin differs from the plain repository in two files: main.php, which is ionCube-encoded, and setting.php, which keeps display_errors on for troubleshooting on production.
Environments and deploy
| Push to | Script | What happens |
|---|---|---|
development | deploy/dev.sh | Producer on the Rumah box syncs plain to encrypted and pushes. The consumer runs on the Lab box, not the Rumah box, because Medco QA uses SQL Server that is reachable only from the office LAN. It pulls both served roots, ~/www/inact-medco-v3-encrypted and ~/www/inact-medco-v3-encrypted-testable, and runs phinx migrate on each. |
main | deploy/prod.sh | Sync plain main to encrypted main, push to GitHub and INARTS. No consumer, on purpose. The client's box has no internet. Production is delivered as a release zip cut with deploy/lib/inact-release.sh and applied by hand on site. Migrations travel with the zip. |
Database
| Driver | SQL Server, DB_CONNECTION=mssql |
| QA databases | SQL Server on the shared dev DB host 192.168.1.52, databases inact-medco-v3-encrypted and inact-medco-v3-encrypted-testable, one per QA site |
| Test database | Shared dev DB host 192.168.1.52, port 1433, database inact-medco-v3-prod-20260819. A production snapshot from 2026-08-19. |
This snapshot is the best place to check whether a bug bites real data. The master test databases are nearly empty, so a query that depends on a rarely filled table looks fine there and is still wrong in production.
How this fork differs from master
Measured on 2026-09-05.
| Module files that differ | 93 |
| Modules with the most changes | routing 16, documents_master 9, documents 9, adms 8, adms_reference 7, member 6, dms_reference 6 |
| Libraries that differ | InactPDO.php, additional_global_variables.inc.php, inweb.lib.php, reference_function.inc.php, tracking_function.inc.php |
| Top-level files that differ | auto_logout.php, db_config.php, setting.php |
| Migrations | 450 in total. 39 only here, 20 in master not taken. Newest 2026-07-16. |
Files only in this fork
modules/dms_reference/business_unit.phpmodules/dms_reference/code_package_identifier.phpmodules/dms_reference/file_name_setting.phpmodules/dms_reference/location.phpmodules/dms_reference/region.phpmodules/dms_reference/sdrl_code.phpmodules/dms_reference/sub_discipline.phpmodules/dms_reference/vendor_package.phpmodules/routing/routing_handler_ext_reviewer_download.phpmodules/routing/routing_handler_ext_reviewer_upload.phpmodules/routing/routing_handler_ext_reviewer_upload_form.phpmodules/routing/routing_handler_print_commentsummary.php
Two backup copies of the multi-upload handler also sit in modules/documents_master/. They are not part of the feature.
Files in master that this fork lacks
modules/adms/adms_rev_sort.inc.phpmodules/adms_reference/adms_reference_import.inc.php
inweb_config keys
| Keys | |
|---|---|
| Only in this fork | enable_code_package_identifier, enable_location, enable_ref_business_unit, enable_region, enable_sdrl_code, enable_vendor_package |
| Missing here | enable_last_login_wins, enable_routing_overdue_notif_digest |
From v2 to v3
Medco ran INACT v2 (binari-digital/ina-medco-v2) before the v3 fork. v3 is not a rewrite: every v2 module still exists with the same folder name, so the document-management steps are the same for users. What changed is the scaffolding around the modules and a set of new modules on top. Summarised from the comparison pages that used to live in the v3 repository, verified June 2026.
Under the hood
| Dimension | v2 | v3 |
|---|---|---|
| Dependencies | none, vendored libraries | Composer, PSR-4 autoloading, src/ |
| Environment config | hard-coded in PHP | .env via symfony/dotenv plus db_config.php |
| Database access | mysql_*, mysqli_*, iw_mysql_query only | $pdo (InactPDO / PDOLogActivity) alongside the legacy path; the legacy helper now throws |
| Schema | one SQL patch file | phinx migrations and seeds under db/; one-off data backfills under migrations/scripts/ |
| Theming | per-company templates | "flavour" classes under src/{basic,custom,resindo,minerba}, picked by the Feature\PrintDoc\Html config key |
| Libraries | PHPExcel, FPDF | PhpSpreadsheet, TCPDF, HTML2PDF, PHPMailer, illuminate/database, Slim |
For users
- Permissions are per project. Group-based
ts_privilegesbecame resource-group-basedts_privileges_resource. See Users and Privileges. - LDAP login, idle auto-logout, finer action types (
upload,archive,ready_to_return), dashboard privileges. - Modular menus built from the module registry, so two installs can show different menus.
- New modules: Draft PO, AP Invoices, Rekom Handak, Vendor Management, Work Order Progress, ADMS, Master Stamp, and the DMS / Procurement / Cost Control / ADMS reference areas.
- Auto Folder Creation replaced the three fixed
project_east_javalibrary layouts. See Auto Folder Creation. - Upload lost its options dialog and SPRD / VOID watermarking; the two old bugs stayed. Medco later brought the dialog back with Force Upload only. See Upload.
- Upload Transmittal fails on an unmatched row and no longer imports remarks. Return is gated by
enable_return_on_auditand has a Ready to Return view. Clear Return Status lost its button; the bug was never fixed. - Nothing was removed apart from that button.
_proto_202205191643_is leftover prototype code, not a feature.
One-off data scripts for the v1 to v3 migration live under migrations/scripts/ in the v3 repository, 63 files. No other fork has that folder.
Customizations documented so far
None yet. Feature pages arrive in phase 3 of the docs plan.
Known gotchas
stagingexists but does not deploy. The workflow only mapsdevelopmentandmain. A PR merged intostagingchanges nothing anywhere.- Production cannot be pulled. Nothing on our side reaches it. A fix is not live until the release zip has been applied on site.
- SQL Server rules bite here first.
LIMITdoes not exist; useInactPDO::getLimit()after anORDER BY. Identity inserts needSET IDENTITY_INSERT.